classQuotedSpan
final class QuotedSpan
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Recognizes the boundaries of PostgreSQL quoted lexical spans.
Methods§
public static function quotedLength(string $sql, string $quote, bool $escapeBackslash): intMeasures a quoted span, including doubled quotes and optional backslash escapes.
Parameters
$sql | string | |
$quote | string | |
$escapeBackslash | bool |
Returns
intTest cases 1
Called from 6
- static-call ZtdQuery\Platform\Postgres\Connection\Parameter\QuotedInput::consumeQuoted() packages/ztd-query-postgres/src/Connection/Parameter/QuotedInput.php:49
- static-call ZtdQuery\Platform\Postgres\Schema\Definition\TableBody::splitTableBody() packages/ztd-query-postgres/src/Schema/Definition/TableBody.php:94
- static-call ZtdQuery\Platform\Postgres\Sql\Dml\Insert\InsertClauseParser::extractParenthesizedList() packages/ztd-query-postgres/src/Sql/Dml/Insert/InsertClauseParser.php:103
- static-call ZtdQuery\Platform\Postgres\Sql\PostgreSqlLexicalMasker::maskStringLiterals() packages/ztd-query-postgres/src/Sql/PostgreSqlLexicalMasker.php:27
- static-call ZtdQuery\Platform\Postgres\Sql\PostgreSqlLexicalMasker::maskComments() packages/ztd-query-postgres/src/Sql/PostgreSqlLexicalMasker.php:64
- static-call ZtdQuery\Platform\Postgres\Sql\Statement\SelectColumns::splitByTopLevelComma() packages/ztd-query-postgres/src/Sql/Statement/SelectColumns.php:66
public static function dollarQuotedLength(string $sql): ?intMeasures a dollar-quoted span, or returns null when no delimiter begins here.
Parameters
$sql | string |
Returns
?intTest cases 1
Called from 2
- static-call ZtdQuery\Platform\Postgres\Sql\PostgreSqlLexicalMasker::maskStringLiterals() packages/ztd-query-postgres/src/Sql/PostgreSqlLexicalMasker.php:35
- static-call ZtdQuery\Platform\Postgres\Sql\PostgreSqlLexicalMasker::maskComments() packages/ztd-query-postgres/src/Sql/PostgreSqlLexicalMasker.php:72
Calls 3
- static-call QuotedSpan::dollarQuoteDelimiter() line 47
- function-call
strposline 52 - function-call
strlenline 52
public static function dollarQuoteDelimiter(string $sql): ?stringReads a PostgreSQL dollar-quote delimiter at the beginning of a string.
Parameters
$sql | string |
Returns
?stringTest cases 1
Called from 1
public static function isEscapeStringStart(string $sql, int $quotePosition): boolRecognizes an E prefix separated from an identifier before a quote.
Parameters
$sql | string | |
$quotePosition | int |
Returns
boolTest cases 1
Called from 2
- static-call ZtdQuery\Platform\Postgres\Sql\PostgreSqlLexicalMasker::maskStringLiterals() packages/ztd-query-postgres/src/Sql/PostgreSqlLexicalMasker.php:27
- static-call ZtdQuery\Platform\Postgres\Sql\PostgreSqlLexicalMasker::maskComments() packages/ztd-query-postgres/src/Sql/PostgreSqlLexicalMasker.php:64
Test cases 37§
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 33
PgSqlPdoParameterBindingCompilerTestcallsPgSqlPdoPlaceholderEscaperTestcallsQuotedInputTestcallsPgSqlSessionFactoryTestcallsTableContextTestcallsPgSqlQueryGuardTestcallsPgSqlRewriterTestcallsStatementRewriterTestcallsDeleteTransformerTestcallsSelectProjectionTestcallsUpsertProjectionTestcallsValueProjectionTestcallsInsertSelectRendererTestcallsInsertTransformerTestcallsPgSqlTransformerTestcallsUpdateTransformerTestcallsTableBodyTestcallsPgSqlSchemaParserTestcallsSchemaInitializerTestcallsRowMutationResolverTestcallsTableMutationResolverTestcallsPgSqlMutationResolverTestcallsDeleteClauseParserTestcallsInsertClauseParserTestcallsUpdateClauseParserTestcallsIdentifierDecoderTestcallsPgSqlParserTestcallsPostgreSqlLexicalMaskerTestcallsConflictClauseTestcallsSelectColumnsTestcallsStatementClassifierTestcallsTableDefinitionClausesTestcallsTargetTableParserTestcalls
Relations§
Static calls 10
- static-call ZtdQuery\Platform\Postgres\Connection\Parameter\QuotedInput::consumeQuoted() packages/ztd-query-postgres/src/Connection/Parameter/QuotedInput.php:49
- static-call ZtdQuery\Platform\Postgres\Schema\Definition\TableBody::splitTableBody() packages/ztd-query-postgres/src/Schema/Definition/TableBody.php:94
- static-call ZtdQuery\Platform\Postgres\Sql\Dml\Insert\InsertClauseParser::extractParenthesizedList() packages/ztd-query-postgres/src/Sql/Dml/Insert/InsertClauseParser.php:103
- static-call ZtdQuery\Platform\Postgres\Sql\PostgreSqlLexicalMasker::maskStringLiterals() packages/ztd-query-postgres/src/Sql/PostgreSqlLexicalMasker.php:27
- static-call ZtdQuery\Platform\Postgres\Sql\PostgreSqlLexicalMasker::maskStringLiterals() packages/ztd-query-postgres/src/Sql/PostgreSqlLexicalMasker.php:27
- static-call ZtdQuery\Platform\Postgres\Sql\PostgreSqlLexicalMasker::maskStringLiterals() packages/ztd-query-postgres/src/Sql/PostgreSqlLexicalMasker.php:35
- static-call ZtdQuery\Platform\Postgres\Sql\PostgreSqlLexicalMasker::maskComments() packages/ztd-query-postgres/src/Sql/PostgreSqlLexicalMasker.php:64
- static-call ZtdQuery\Platform\Postgres\Sql\PostgreSqlLexicalMasker::maskComments() packages/ztd-query-postgres/src/Sql/PostgreSqlLexicalMasker.php:64
- static-call ZtdQuery\Platform\Postgres\Sql\PostgreSqlLexicalMasker::maskComments() packages/ztd-query-postgres/src/Sql/PostgreSqlLexicalMasker.php:72
- static-call ZtdQuery\Platform\Postgres\Sql\Statement\SelectColumns::splitByTopLevelComma() packages/ztd-query-postgres/src/Sql/Statement/SelectColumns.php:66