classQueryMisuse
final class QueryMisuse
implements Diagnostic
uses Snapshot
Public API: explicitly declared with
@visibility public.A query that PostgreSQL rejects because it breaks a rule of the language.
(new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SELECT *') // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\SemanticException: SELECT * with no tables specified is not validProperties§
public QueryMisuseRule $rulepublic Name|null $subject = nullMethods§
public function __construct(public QueryMisuseRule $rule, public Name|null $subject = null)Parameters
$rule | QueryMisuseRule | The broken rule |
$subject | Name|null | The name the problem is about, for the rules that name one |
public function message(): stringDescribes the broken rule in the words of PostgreSQL.
Returns
stringCalls 1
- function-call
str_replaceline 35
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
QueryMisuseTestcalls
Relations§
Instantiated in 38
- new SqlSemantics\Platform\PostgreSql\Rules\Manipulation\Placement::into() packages/sql-semantics-postgres/src/Rules/Manipulation/Placement.php:110
- new SqlSemantics\Platform\PostgreSql\Rules\Query\DistinctOrdering::check() packages/sql-semantics-postgres/src/Rules/Query/DistinctOrdering.php:57
- new SqlSemantics\Platform\PostgreSql\Rules\Query\DistinctOrdering::check() packages/sql-semantics-postgres/src/Rules/Query/DistinctOrdering.php:65
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\CommonTableFacts::bind() packages/sql-semantics-postgres/src/Rules/Query/Facts/CommonTableFacts.php:72
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\CommonTableFacts::bind() packages/sql-semantics-postgres/src/Rules/Query/Facts/CommonTableFacts.php:83
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\CommonTableFacts::bind() packages/sql-semantics-postgres/src/Rules/Query/Facts/CommonTableFacts.php:86
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\CommonTableFacts::bind() packages/sql-semantics-postgres/src/Rules/Query/Facts/CommonTableFacts.php:89
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\CommonTableFacts::order() packages/sql-semantics-postgres/src/Rules/Query/Facts/CommonTableFacts.php:152
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\CommonTableFacts::member() packages/sql-semantics-postgres/src/Rules/Query/Facts/CommonTableFacts.php:236
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\ModifyingCommonTables::check() packages/sql-semantics-postgres/src/Rules/Query/Facts/ModifyingCommonTables.php:46
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\QueryExpressionFacts::derive() packages/sql-semantics-postgres/src/Rules/Query/Facts/QueryExpressionFacts.php:60
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\QueryExpressionFacts::merged() packages/sql-semantics-postgres/src/Rules/Query/Facts/QueryExpressionFacts.php:96
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\QueryRoots::derive() packages/sql-semantics-postgres/src/Rules/Query/Facts/QueryRoots.php:53
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\SelectFacts::derive() packages/sql-semantics-postgres/src/Rules/Query/Facts/SelectFacts.php:93
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Limits::derive() packages/sql-semantics-postgres/src/Rules/Query/Limits.php:49
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Limits::ties() packages/sql-semantics-postgres/src/Rules/Query/Limits.php:84
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Limits::ties() packages/sql-semantics-postgres/src/Rules/Query/Limits.php:87
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Limits::locked() packages/sql-semantics-postgres/src/Rules/Query/Limits.php:103
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Limits::locked() packages/sql-semantics-postgres/src/Rules/Query/Limits.php:111
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Locking::check() packages/sql-semantics-postgres/src/Rules/Query/Locking.php:74
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Locking::check() packages/sql-semantics-postgres/src/Rules/Query/Locking.php:81
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Ordering::outputs() packages/sql-semantics-postgres/src/Rules/Query/Ordering.php:109
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Ordering::outputs() packages/sql-semantics-postgres/src/Rules/Query/Ordering.php:111
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Ordering::term() packages/sql-semantics-postgres/src/Rules/Query/Ordering.php:130
- new SqlSemantics\Platform\PostgreSql\Rules\Query\StarExpansion::all() packages/sql-semantics-postgres/src/Rules/Query/StarExpansion.php:63
- new SqlSemantics\Platform\PostgreSql\Rules\Query\StarExpansion::composite() packages/sql-semantics-postgres/src/Rules/Query/StarExpansion.php:108
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\FunctionShapes::derive() packages/sql-semantics-postgres/src/Rules/Resolution/FunctionShapes.php:63
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\FunctionShapes::defined() packages/sql-semantics-postgres/src/Rules/Resolution/FunctionShapes.php:111
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\Joining::names() packages/sql-semantics-postgres/src/Rules/Resolution/Joining.php:112
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\Joining::locate() packages/sql-semantics-postgres/src/Rules/Resolution/Joining.php:154
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\Joining::locate() packages/sql-semantics-postgres/src/Rules/Resolution/Joining.php:157
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\LateralReach::report() packages/sql-semantics-postgres/src/Rules/Resolution/LateralReach.php:111
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\TableFunctionShapes::xml() packages/sql-semantics-postgres/src/Rules/Resolution/TableFunctionShapes.php:76
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\TableFunctionShapes::options() packages/sql-semantics-postgres/src/Rules/Resolution/TableFunctionShapes.php:102
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\TableFunctionShapes::options() packages/sql-semantics-postgres/src/Rules/Resolution/TableFunctionShapes.php:107
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\TableFunctionShapes::json() packages/sql-semantics-postgres/src/Rules/Resolution/TableFunctionShapes.php:128
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\TableShapes::input() packages/sql-semantics-postgres/src/Rules/Resolution/TableShapes.php:60
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\TableShapes::input() packages/sql-semantics-postgres/src/Rules/Resolution/TableShapes.php:74