A pure managed SQLite3 database file toolkit: decodes the database header, B-tree pages, the master table and column types and exposes tables and rows without the native SQLite engine.
Microsoft.VisualBasic.Data.IO.SQLite3 1.0.9762.11310.
01 Namespaces
Microsoft.VisualBasic.Data.IO.ManagedSqlite
| Type | Summary | Members |
|---|---|---|
| Extensions | 1 | |
| Sqlite3Database | MBW.Utilities.ManagedSqlite > https://github.com/LordMike/MBW.Utilities.ManagedSqlite > https://www.sqlite.org/fileformat.html | 6 |
| Sqlite3Settings | 1 |
Microsoft.VisualBasic.Data.IO.ManagedSqlite.Core.Helpers
Low level SQLite file helpers: B-tree navigation tools, the sqlite data stream and general stream helpers.
| Type | Summary | Members |
|---|---|---|
| SqliteDataStream | 1 |
Microsoft.VisualBasic.Data.IO.ManagedSqlite.Core.Internal
Internal reader base classes for the managed SQLite file parser.
| Type | Summary | Members |
|---|---|---|
| ReaderBase | 18 |
Microsoft.VisualBasic.Data.IO.ManagedSqlite.Core.Objects
The SQLite page object model: B-tree pages, interior and leaf table pages, cells and column data metadata.
| Type | Summary | Members |
|---|---|---|
| BTreeInteriorTablePage | SQLite B-Tree datastructure that contains other Interior / Leaf pages | 0 |
| BTreeLeafTablePage | SQLite B-Tree datastructure that cells with data | 0 |
| ColumnDataMeta | 5 |
Microsoft.VisualBasic.Data.IO.ManagedSqlite.Core.Objects.BTreeLeafTablePage
| Type | Summary | Members |
|---|---|---|
| Cell | 8 |
Microsoft.VisualBasic.Data.IO.ManagedSqlite.Core.Objects.Enums
SQLite file format enumerations: B-tree types, file read and write versions, data types and text encodings.
| Type | Summary | Members |
|---|---|---|
| DataTypeParser | 1 | |
| SqliteDataType | 9 |
Microsoft.VisualBasic.Data.IO.ManagedSqlite.Core.Objects.Headers
The SQLite database header and B-tree page header structures.
| Type | Summary | Members |
|---|---|---|
| DatabaseHeader | 23 |
Microsoft.VisualBasic.Data.IO.ManagedSqlite.Core.SQLSchema
The SQLite schema model and the CREATE TABLE SQL parser used to describe tables and their columns.
Microsoft.VisualBasic.Data.IO.ManagedSqlite.Core.Tables
The SQLite table model: the master table, tables, rows and schema rows.
| Type | Summary | Members |
|---|---|---|
| Sqlite3MasterTable | 主表主要是记录用户创建的数据表的结构定义以及在数据库文件之中的读取偏移位置 | 3 |
| Sqlite3SchemaRow | 7 | |
| Sqlite3Table | 8 |
Microsoft.VisualBasic.Data.IO.ManagedSqlite.Writer
The SQLite database writer: column and data row models together with the table and database writers.
| Type | Summary | Members |
|---|---|---|
| Sqlite3Column | SQLite 数据表的列定义。 | 8 |
| Sqlite3DataRow | 写入模块的内存数据行, 取值语义与读取侧 Sqlite3Row 保持一致(可按序号或列名访问)。 | 6 |
| Sqlite3TableWriter | 单张数据表的可写模型, 提供链式的行级增删改查(CRUD)。所有修改在 Sqlite3Writer.Commit() 时落盘。 | 20 |
| Sqlite3Writer | SQLite3 数据库写入器。 采用"内存模型 + 提交时整文件重建"的策略: 全部增删改在内存之中完成, 调用 Sqlite3Writer.Commit() 时一次性序列化重建整个数据库文件, 并以临时文件原子替换目标文件, 保证写入失败不会损坏原库。构建之后可以被本模块的读取器重新打开。 | 13 |
Microsoft.VisualBasic.Data.IO.ManagedSqlite.Writer.Internal
The internal SQLite write path: the B-tree writer, page buffer, record encoder and file serializer.
| Type | Summary | Members |
|---|---|---|
| BTreeNode | 表 B 树的节点(叶节点或内部节点), 页号在结构构建完成之后单独分配。 | 1 |
| BTreeWriter | 表 B 树写入器: 负责容量计算、自底向上建树、cell 编码与页号分配。 | 9 |
| LeafEntry | 表 B 树叶页之中的一条记录(按 rowid 升序排列) | 0 |
| PageBuffer | 单个数据库页的字节缓冲, 提供大端整数写入与 B 树页组装能力。 | 6 |
| RecordEncoder | SQLite 记录体(record)编码器。 与读取侧 Sqlite3Table.ReadValue 严格对称: 记录体 = varint(headerSize) + 各列 serial type(varint) + 各列数据。 > https://www.sqlite.org/fileformat2.html#record_format | 5 |
| SqliteFileSerializer | 把内存模型序列化为一个完整的 SQLite3 数据库文件。 页号分配策略: 用户表从第 2 页起按 pre-order 分配; sqlite_master 的根页固定为第 1 页, 其子页在所有用户表页之后分配; 溢出页最后分配。这样父页始终可以引用已经确定的子页号。 | 3 |
| WriterTableSnapshot | 一张表在提交时的快照数据 | 1 |