final class SqliteSchemaParser
    implements SchemaParser
Public API: explicitly declared with @visibility public.

SQLite implementation of SchemaParser.

Parses CREATE TABLE statements while preserving nested SQL expressions.

Inspect a CREATE TABLE definitiondoctest
$schema = (new \ZtdQuery\Platform\Sqlite\Schema\SqliteSchemaParser())->parse('CREATE TABLE users(id INTEGER PRIMARY KEY)');
    $schema?->primaryKeys // => ['id']

Methods§

public function parse(string $createTableSql): ?TableDefinition
Public API: explicitly declared with @visibility public.

{@inheritDoc}

Parameters

$createTableSqlstring
Reflect declared columns and primary keys from SQLite DDLdoctest
$schema = (new \ZtdQuery\Platform\Sqlite\Schema\SqliteSchemaParser())->parse('CREATE TABLE users(id INTEGER PRIMARY KEY, name TEXT)');
    $schema?->columns // => ['id', 'name']
    $schema?->primaryKeys // => ['id']
Test cases 233
Called from 1
Calls 9

Test cases 573§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 220
Other tests reaching this symbol 353

Relations§

Instantiated in 1
Method calls 1