Skip to content

SQL-S2 — SQLite Schema Resolver (Catalog Parser) #199

Description

@ZhuchkaTriplesix

Epic: #194
Depends on: #198 (SQL-S1)
Source: docs/planned-0.4.5.md

Goal

Read and parse metadata for tables, views, and indexes from the SQLite catalog tables (sqlite_master) and column definitions using PRAGMA table_info.

Files

  • lib/core/database/drivers/sqlite/sqlite_schema_resolver.dart (new)
  • test/core/database/drivers/sqlite/sqlite_schema_resolver_test.dart (new)

Implementation

  • Execute queries against sqlite_master to retrieve list of user tables, system tables, views, and indexes.
  • Resolve columns for each table/view using PRAGMA table_info(table_name).
  • Retrieve index details using PRAGMA index_list(table_name) and PRAGMA index_info(index_name).
  • Map the metadata to standard Querya schema representation (DatabaseSchema, TableSchema, ColumnSchema).

Acceptance Criteria

  • Tables, views, and indexes are successfully parsed from a test database.
  • Columns are resolved with correct types, nullability, and primary key flags.
  • Empty or complex schemas do not crash the resolver.
  • Code is clean and passes flutter analyze.

Metadata

Metadata

Labels

coreCore library logic and servicessqliteSQLite database driver and workspace

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions