enumSortDirection
enum SortDirection: string
Public API: explicitly declared with
@visibility public.The direction written after an ordering term or an indexed column.
Source: https://sqlite.org/lang_select.html#the_order_by_clause.
$query = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('SELECT a FROM t ORDER BY a DESC');
$query->statement->orderBy[0]->direction // => \SqlSemantics\Platform\Sqlite\Statement\Query\Ordering\SortDirection::DescendingCases§
case Ascending = 'ASC'case Descending = 'DESC'Test cases 13§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 12
KeyTermRuleTest::testKeyTermsWrapAStringUnderAnyParenthesesAndCollationscallsKeyTermRuleTest::testTermLeavesEveryOtherTermAsItIscallsCallRuleTest::testExpressionKeepsTheArgumentOrderingOfAnAggregatecallsUpsertRuleTest::testTailLowersTargetedDoUpdateAndDoNothingClausesInWrittenOrdercallsSortRuleTest::testColumnsLowersTheNamesOfAColumnListWithCollationAndDirectioncallsSortRuleTest::testDirectionLowersAscDescOrNonecallsSortRuleTest::testTermsLowersEachTermWithItsDirectionAndNullPlacementcallsListedColumnTest::testRenderWritesTheNameTheCollationAndTheDirectioncallsSortTermTest::testRenderWritesANewlyBuiltTermcallsSortTermTest::testRenderWritesTheDirectionAndTheNullPlacementcallsColumnPrimaryKeyTest::testRenderKeepsTheSortOrderTheConflictResolutionAndAutoincrementcallsTablePrimaryKeyTest::testRenderWritesAutoincrementInsideTheParenthesescalls
Relations§
Constant reads 3
- class-const SqlSemantics\Platform\Sqlite\Lowering\Query\SortRule::direction() packages/sql-semantics-sqlite/src/Lowering/Query/SortRule.php:94
- class-const SqlSemantics\Platform\Sqlite\Lowering\Query\SortRule::direction() packages/sql-semantics-sqlite/src/Lowering/Query/SortRule.php:95
- class-const SqlSemantics\Platform\Sqlite\Rules\Definition\PrimaryKeyRule::key() packages/sql-semantics-sqlite/src/Rules/Definition/PrimaryKeyRule.php:46
Type declarations 4
- type SqlSemantics\Platform\Sqlite\Lowering\Query\SortRule packages/sql-semantics-sqlite/src/Lowering/Query/SortRule.php:88
- type SqlSemantics\Platform\Sqlite\Statement\Query\Ordering\ListedColumn packages/sql-semantics-sqlite/src/Statement/Query/Ordering/ListedColumn.php:35
- type SqlSemantics\Platform\Sqlite\Statement\Query\Ordering\SortTerm packages/sql-semantics-sqlite/src/Statement/Query/Ordering/SortTerm.php:33
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Column\ColumnPrimaryKey packages/sql-semantics-sqlite/src/Statement/Schema/Column/ColumnPrimaryKey.php:42