final class ColumnDefinitionParser
Restricted visibility: declared "@visibility ZtdQuery\Platform\Sqlite". Code outside that scope must not name this declaration.

Parses column declarations, defaults, types and generated expressions.

Methods§

public function parseColumnDefinition(string $def): array{name: string, type: string|null, notNull: bool, primaryKey: bool, unique: bool, default: string|null, generatedExpression: string|null}|null

Parse a single column definition.

Parameters

$defstring

Returns

array{name: string, type: string|null, notNull: bool, primaryKey: bool, unique: bool, default: string|null, generatedExpression: string|null}|null
Test cases 1
Called from 1
Calls 11
public function leadingKeyword(string $sql): string
public function extractColumnType(string $rest): ?string

Extract the column type from the rest of a column definition.

Parameters

$reststring

Returns

?string
Test cases 1
Called from 1
Calls 5
public function declaredType(string $rest): ?string

Test cases 13§

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

Dedicated tests 5
Other tests reaching this symbol 8

Relations§

Instantiated in 3
Method calls 4