enumOnCommit
enum OnCommit: string
Public API: explicitly declared with
@visibility public.What happens to a temporary table at the end of each transaction.
Mirrors OnCommitAction (ONCOMMIT_DROP, DELETE_ROWS, PRESERVE_ROWS). PRESERVE ROWS is the default and is kept when written. Source: https://www.postgresql.org/docs/17/sql-createtable.html.
$create = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE TEMP TABLE t (a int) ON COMMIT DELETE ROWS');
$create->statement->onCommit // => \SqlSemantics\Platform\PostgreSql\Statement\Table\OnCommit::DeleteRowsCases§
case PreserveRows = 'PRESERVE ROWS'case DeleteRows = 'DELETE ROWS'case Drop = 'DROP'Methods§
public function keywords(): list<string>Test cases 2§
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 1
Relations§
Constant reads 3
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Table\CreateTableRule::onCommit() packages/sql-semantics-postgres/src/Lowering/Table/CreateTableRule.php:217
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Table\CreateTableRule::onCommit() packages/sql-semantics-postgres/src/Lowering/Table/CreateTableRule.php:218
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Table\CreateTableRule::onCommit() packages/sql-semantics-postgres/src/Lowering/Table/CreateTableRule.php:219
Type declarations 3
- type SqlSemantics\Platform\PostgreSql\Lowering\Table\CreateTableRule packages/sql-semantics-postgres/src/Lowering/Table/CreateTableRule.php:212
- type SqlSemantics\Platform\PostgreSql\Statement\Table\CreateTable packages/sql-semantics-postgres/src/Statement/Table/CreateTable.php:72
- type SqlSemantics\Platform\PostgreSql\Statement\Table\CreateTarget packages/sql-semantics-postgres/src/Statement/Table/CreateTarget.php:58