classTableBodyParser
final class TableBodyParser
Restricted visibility: declared "@visibility ZtdQuery\Platform\Sqlite". Code outside that scope must not name this declaration.
Extracts CREATE TABLE definitions and validates table options.
Methods§
public function tableBody(string $sql): ?stringExtracts CREATE TABLE definitions and validates table options.
Parameters
$sql | string |
Returns
?stringTest cases 1
Called from 1
Calls 7
- function-call
preg_matchline 24 - function-call
strlenline 28 - static-call SqlTokenStream::tokenize() line 30
- static-call SqliteLexerProfile::create() line 30
- class-const SqlTokenKind::Symbol() line 32
- function-call
substrline 43 - static-call TableBodyParser::hasValidTableOptions() line 44
public static function hasValidTableOptions(string $suffix): boolExtracts CREATE TABLE definitions and validates table options.
Parameters
$suffix | string |
Returns
boolCalled from 1
Calls 5
- static-call SqlTokenStream::tokenize() line 56
- static-call SqliteLexerProfile::create() line 56
- function-call
countline 57 - class-const SqlTokenKind::Symbol() line 59
- function-call
array_popline 62
public static function hasWithoutRowid(string $sql): boolExtracts CREATE TABLE definitions and validates table options.
Parameters
$sql | string |
Returns
boolTest cases 1
Called from 1
Calls 2
- static-call SqlTokenStream::tokenize() line 107
- static-call SqliteLexerProfile::create() line 107
public function splitColumnDefinitions(string $body): array<int, string>Split column/constraint definitions by commas, respecting parentheses.
Parameters
$body | string |
Returns
array<int, string>Test cases 1
Called from 1
Calls 5
- function-call
strlenline 124 - method-call ExpressionSpan::end() line 126
- new ExpressionSpan line 126
- function-call
trimline 127 - function-call
substrline 127
Test cases 12§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 4
Other tests reaching this symbol 8
SqliteRewriterTestcallsStatementRewriterTestcallsTableDefinitionBuilderTestcallsSqliteSchemaParserTestcallsAddColumnResolverTestcallsTableMutationResolverTestcallsSqliteMutationResolverTestcallsSqliteSessionFactoryTestcalls