dissect.sql.sqlite3

Module Contents

Classes

SQLite3

Column

Describes a column of a sqlite table.

Table

Index

Row

Empty

Page

Cell

WAL

WALFrame

WALCheckpoint

Functions

wal_checksum

For future use, will be used when WAL is fully implemented

walk_tree

read_record

varint

class dissect.sql.sqlite3.SQLite3(fh: BinaryIO, wal_fh: BinaryIO | None = None)
fh
wal = None
header
encoding
page_size
usable_page_size
page
open_wal(fh: BinaryIO) None
table(name: str) Table | None
tables() collections.abc.Iterator[Table]
index(name: str) Index | None
indices() collections.abc.Iterator[Index]
raw_page(num: int) bytes
pages() collections.abc.Iterator[Page]
cells() collections.abc.Iterator[Cell]
class dissect.sql.sqlite3.Column(name: str, description: str)

Describes a column of a sqlite table.

SPACE = '\\s'
EXPRESSION = '\\(.+?\\)'
STRING = '[\'\\"].+?[\'\\"]'
TOKENIZER_EXPRESSION
name
default_value = None
__eq__(other: object) bool
__repr__() str
class dissect.sql.sqlite3.Table(sqlite: SQLite3, type_: str, name: str, table_name: str, page: int, sql: str)
sqlite
type
name
table_name
page
sql
columns = []
primary_key = None
__repr__() str
__iter__() collections.abc.Iterator[Row]
row(idx: int) Row
rows() collections.abc.Iterator[Row]
class dissect.sql.sqlite3.Index(sqlite: SQLite3, type_: str, name: str, table_name: str, page: int, sql: str)
sqlite
type
name
table_name
page
sql
__repr__() str
class dissect.sql.sqlite3.Row(table: Table, cell: Cell)
__iter__() collections.abc.Iterator[tuple[str, Any]]
__getitem__(key: str) Any
__getattr__(key: str) Any
__repr__() str
get(key: str, default: Any = None) Any
class dissect.sql.sqlite3.Empty
class dissect.sql.sqlite3.Page(sqlite: SQLite3, num: int)
sqlite
num
data
offset
header
right_page = None
cell_pointers
cell
__repr__() str
open() io.BytesIO
cells() collections.abc.Iterator[Cell]
class dissect.sql.sqlite3.Cell(page: Page, offset: int)
page
offset
size = None
key = None
left_page = None
max_payload_size
min_payload_size
__repr__() str
property data: bytes
property types: list[int]
property values: list[int | float | str | bytes | None]
class dissect.sql.sqlite3.WAL(fh: BinaryIO)
fh
header
checksum_endian = '<'
frame
frames() collections.abc.Iterator[WALFrame]
checkpoints() list[WALCheckpoint]
class dissect.sql.sqlite3.WALFrame(wal: WAL, offset: int)
wal
offset
fh
header
__repr__() str
property valid: bool
property data: bytes
property page_number: int
property page_count: int
class dissect.sql.sqlite3.WALCheckpoint(wal: WAL, frames: list[WALFrame])
wal
frames
__contains__(page: int) bool
__getitem__(page: int) WALFrame
__repr__() str
property page_map: dict[int, WALFrame]
get(page: int, default: Any = None) WALFrame
dissect.sql.sqlite3.wal_checksum(buf: bytes, endian: str = '>') tuple[int, int]

For future use, will be used when WAL is fully implemented

dissect.sql.sqlite3.walk_tree(sqlite: SQLite3, page: Page) collections.abc.Iterator[Cell]
dissect.sql.sqlite3.read_record(fh: BinaryIO, encoding: str) tuple[list[int], list[int | float | str | bytes | None]]
dissect.sql.sqlite3.varint(fh: BinaryIO) int