elight.postgresql-dialect.2.0.0-rc02.source-code.PostgreSql_gen.bnf Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of postgresql-dialect Show documentation
Show all versions of postgresql-dialect Show documentation
The PostgreSQL Dialect for SQLDelight
{
parserUtilClass="app.cash.sqldelight.dialects.postgresql.grammar.PostgreSqlParserUtil"
parserClass="app.cash.sqldelight.dialects.postgresql.grammar.PostgreSqlParser"
elementTypeHolderClass="app.cash.sqldelight.dialects.postgresql.grammar.psi.PostgreSqlTypes"
psiPackage="app.cash.sqldelight.dialects.postgresql.grammar.psi"
psiImplPackage="app.cash.sqldelight.dialects.postgresql.grammar.psi.impl"
// Specify the parent parser.
overrides="com.alecstrong.sql.psi.core.SqlParser"
elementTypeClass = "com.alecstrong.sql.psi.core.SqlElementType"
implements="com.alecstrong.sql.psi.core.psi.SqlCompositeElement"
extends="com.alecstrong.sql.psi.core.psi.SqlCompositeElementImpl"
psiClassPrefix = "PostgreSql"
parserImports = [
"static com.alecstrong.sql.psi.core.SqlParser.*"
"static com.alecstrong.sql.psi.core.SqlParserUtil.identifierExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.conflictClauseExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.checkConstraintExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.collationNameExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.foreignKeyClauseExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.signedNumberExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.literalValueExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.indexNameExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.indexedColumnExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.columnNameExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.compoundSelectStmtExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.withClauseExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.qualifiedTableNameExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.orderingTermExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.numericLiteralExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.blobLiteralExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.databaseNameExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.tableNameExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.tableAliasExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.insertStmtValuesExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.joinClauseExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.resultColumnExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.alterTableAddColumnExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.alterTableRenameTableExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.columnTypeExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.generatedClauseExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.selectStmtExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.compoundOperatorExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.limitingTermExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.functionExprExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.setterExpressionExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.updateStmtSubsequentSetterExt"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.ADD"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.ABORT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.ALTER"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.ALWAYS"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.AS"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.ASC"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.BY"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.COLLATE"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.COLUMN"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.COMMA"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.CONFLICT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.CONSTRAINT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.CURRENT_DATE"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.CURRENT_TIME"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.CURRENT_TIMESTAMP"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.DEFAULT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.DELETE"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.DESC"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.DO"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.DOT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.DROP"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.EQ"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.ESCAPE"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.FAIL"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.FALSE"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.FOR"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.FOREIGN"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.FROM"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.GENERATED"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.GROUP"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.ID"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.IGNORE"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.INSERT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.INTO"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.KEY"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.LIMIT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.LP"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.MINUS"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.NOT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.NOTHING"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.NULL"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.OFFSET"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.ON"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.OR"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.ORDER"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.PLUS"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.PRIMARY"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.RENAME"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.REPLACE"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.ROLLBACK"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.RP"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.SET"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.STRING"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.TO"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.TRUE"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.UNIQUE"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.UPDATE"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.USING"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.WHERE"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.WITH"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.WITHOUT"
]
}
root ::= <>
fake overrides ::= type_name
| column_constraint
| string_literal
| bind_parameter
| table_constraint
| default_constraint
| with_clause_auxiliary_stmt
| delete_stmt_limited
| insert_stmt
| update_stmt_limited
| generated_clause
| alter_table_rules
| compound_select_stmt
| extension_expr
| extension_stmt
overrides_real ::= <>
| <>
| <>
| <>
| <>
| <>
| <>
| <>
| <>
| <>
| <>
| <>
| <>
| <>
| <>
{
elementType = overrides
}
fake column_constraint ::= [ CONSTRAINT <>>> ] (
PRIMARY KEY [ ASC | DESC ] <>>> |
[ NOT ] NULL <>>> |
UNIQUE <>>> |
<>>> |
generated_clause |
default_constraint |
COLLATE <>>> |
<>>>
) {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlColumnConstraintImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlColumnConstraint"
override = true
}
column_constraint_real ::= [ CONSTRAINT <>>> ] (
PRIMARY KEY [ ASC | DESC ] <>>> |
[ NOT ] NULL <>>> |
UNIQUE <>>> |
<>>> |
<> |
<> |
COLLATE <>>> |
<>>>
) {
elementType = column_constraint
}
fake current_timestamp_with_optional_interval ::= ( CURRENT_TIMESTAMP | 'NOW()' | interval_expression ) [ [ PLUS | MINUS ] interval_expression ] *
current_timestamp_with_optional_interval_real ::= ( CURRENT_TIMESTAMP | 'NOW()' | <> ) [ [ PLUS | MINUS ] <> ] * {
elementType = current_timestamp_with_optional_interval
}
fake default_constraint ::= [ NOT NULL | NULL ] DEFAULT (
current_timestamp_with_optional_interval |
<>>> |
<>>> |
LP <> RP
) {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlDefaultConstraintImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlDefaultConstraint"
override = true
pin = 2
}
default_constraint_real ::= [ NOT NULL | NULL ] DEFAULT (
<> |
<>>> |
<>>> |
LP <> RP
) {
elementType = default_constraint
pin = 2
}
fake type_name ::= (
small_int_data_type |
int_data_type |
big_int_data_type |
numeric_data_type |
approximate_numeric_data_type |
small_serial_data_type |
serial_data_type |
big_serial_data_type |
string_data_type |
uuid_data_type |
date_data_type |
boolean_data_type |
json_data_type |
blob_data_type
) [ '[]' ] {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlTypeNameImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlTypeName"
override = true
}
type_name_real ::= (
<> |
<> |
<> |
<> |
<> |
<> |
<> |
<> |
<> |
<> |
<> |
<> |
<> |
<>
) [ '[]' ] {
elementType = type_name
}
fake bind_parameter ::= DEFAULT | ( '?' | ':' <>>> ) {
mixin = "app.cash.sqldelight.dialects.postgresql.grammar.mixins.BindParameterMixin"
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlBindParameterImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlBindParameter"
override = true
}
bind_parameter_real ::= DEFAULT | ( '?' | ':' <>>> ) {
elementType = bind_parameter
}
fake table_constraint ::= [ CONSTRAINT <>>> ] (
( PRIMARY KEY | UNIQUE ) [<>>>] LP <>>> [ LP <>>> RP ] ( COMMA <>>> [ LP <>>> RP ] ) * RP <>>> [comment_type] |
<>>> |
FOREIGN KEY LP <>>> ( COMMA <>>> ) * RP <>>>
) {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlTableConstraintImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlTableConstraint"
override = true
}
table_constraint_real ::= [ CONSTRAINT <>>> ] (
( PRIMARY KEY | UNIQUE ) [<>>>] LP <>>> [ LP <>>> RP ] ( COMMA <>>> [ LP <>>> RP ] ) * RP <>>> [comment_type] |
<>>> |
FOREIGN KEY LP <>>> ( COMMA <>>> ) * RP <>>>
) {
elementType = table_constraint
}
fake identity_clause ::= 'IDENTITY'
identity_clause_real ::= 'IDENTITY'
{
elementType = identity_clause
}
fake generated_clause ::= GENERATED ( (ALWAYS AS LP <> RP 'STORED') | ( (ALWAYS | BY DEFAULT) AS identity_clause ) ) {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlGeneratedClauseImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlGeneratedClause"
override = true
}
generated_clause_real ::= GENERATED ( (ALWAYS AS LP <> RP 'STORED') | ( (ALWAYS | BY DEFAULT) AS <> ) ) {
elementType = generated_clause
}
fake small_int_data_type ::= 'SMALLINT' | 'INT2'
small_int_data_type_real ::= 'SMALLINT' | 'INT2' {
elementType = small_int_data_type
}
fake int_data_type ::= 'INTEGER' | 'INT' | 'INT4'
int_data_type_real ::= 'INTEGER' | 'INT' | 'INT4' {
elementType = int_data_type
}
fake big_int_data_type ::= 'BIGINT' | 'INT8'
big_int_data_type_real ::= 'BIGINT' | 'INT8' {
elementType = big_int_data_type
}
fake numeric_data_type ::= ('NUMERIC' | 'DECIMAL') [ LP <>>> RP | LP <>>> COMMA <>>> RP ]
numeric_data_type_real ::= ('NUMERIC' | 'DECIMAL') [ LP <>>> RP | LP <>>> COMMA <>>> RP ]
{
elementType = numeric_data_type
}
fake approximate_numeric_data_type ::= ('REAL' | 'FLOAT4' | ( 'DOUBLE' 'PRECISION' ) | 'FLOAT8') | ('FLOAT' [ LP <>>> RP ])
approximate_numeric_data_type_real ::= ('REAL' | 'FLOAT4' | ( 'DOUBLE' 'PRECISION' ) | 'FLOAT8') | ('FLOAT' [ LP <>>> RP ])
{
elementType = approximate_numeric_data_type
}
fake small_serial_data_type ::= 'SMALLSERIAL' | 'SERIAL2'
small_serial_data_type_real ::= 'SMALLSERIAL' | 'SERIAL2' {
elementType = small_serial_data_type
}
fake serial_data_type ::= 'SERIAL' | 'SERIAL4'
serial_data_type_real ::= 'SERIAL' | 'SERIAL4' {
elementType = serial_data_type
}
fake big_serial_data_type ::= 'BIGSERIAL' | 'SERIAL8'
big_serial_data_type_real ::= 'BIGSERIAL' | 'SERIAL8'
{
elementType = big_serial_data_type
}
fake string_data_type ::= ((( 'CHARACTER' 'VARYING' ) | 'VARCHAR' | 'CHARACTER' | 'CHAR') [ LP <>>> RP ]) | 'TEXT' | 'CITEXT'
string_data_type_real ::= ((( 'CHARACTER' 'VARYING' ) | 'VARCHAR' | 'CHARACTER' | 'CHAR') [ LP <>>> RP ]) | 'TEXT' | 'CITEXT'
{
elementType = string_data_type
}
fake uuid_data_type ::= 'UUID'
uuid_data_type_real ::= 'UUID'
{
elementType = uuid_data_type
}
fake date_data_type ::= 'DATE' | (('TIME' | 'TIMESTAMP') [ LP <>>> RP ] [(WITH | WITHOUT) 'TIME' 'ZONE']) | 'TIMESTAMPTZ' | 'INTERVAL'
date_data_type_real ::= 'DATE' | (('TIME' | 'TIMESTAMP') [ LP <>>> RP ] [(WITH | WITHOUT) 'TIME' 'ZONE']) | 'TIMESTAMPTZ' | 'INTERVAL'
{
elementType = date_data_type
}
fake boolean_data_type ::= 'BOOLEAN' | 'BOOL'
boolean_data_type_real ::= 'BOOLEAN' | 'BOOL'
{
elementType = boolean_data_type
}
fake json_data_type ::= 'JSON' | 'JSONB'
json_data_type_real ::= 'JSON' | 'JSONB'
{
elementType = json_data_type
}
fake blob_data_type ::= 'BYTEA'
blob_data_type_real ::= 'BYTEA'
{
elementType = blob_data_type
}
fake interval_expression ::= 'INTERVAL' string_literal
interval_expression_real ::= 'INTERVAL' <>
{
elementType = interval_expression
}
fake with_clause_auxiliary_stmt ::= <>>> | delete_stmt_limited | insert_stmt | update_stmt_limited {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlWithClauseAuxiliaryStmtImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlWithClauseAuxiliaryStmt"
override = true
}
with_clause_auxiliary_stmt_real ::= <>>> | <> | <> | <> {
elementType = with_clause_auxiliary_stmt
}
fake delete_stmt_limited ::= [ <>>> ] DELETE FROM <>>> [ WHERE <> ] [ [ ORDER BY <>>> ( COMMA <>>> ) * ] LIMIT <> [ ( OFFSET | COMMA ) <> ] ] [ returning_clause ] {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlDeleteStmtLimitedImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlDeleteStmtLimited"
pin = 2
override = true
}
delete_stmt_limited_real ::= [ <>>> ] DELETE FROM <>>> [ WHERE <> ] [ [ ORDER BY <>>> ( COMMA <>>> ) * ] LIMIT <> [ ( OFFSET | COMMA ) <> ] ] [ <> ] {
elementType = delete_stmt_limited
pin = 2
override = true
}
fake string_literal ::= string {
mixin = "app.cash.sqldelight.dialects.postgresql.grammar.mixins.StringLiteralMixin"
implements = "com.alecstrong.sql.psi.core.psi.SqlStringLiteral"
override = true
}
string_literal_real ::= string {
elementType = string_literal
}
fake literal_value ::= ( <>>>
| string_literal
| <>>>
| NULL
| CURRENT_TIME
| CURRENT_DATE
| CURRENT_TIMESTAMP
| interval_expression ) {
mixin = "app.cash.sqldelight.dialects.postgresql.grammar.mixins.LiteralValueMixin"
implements = "com.alecstrong.sql.psi.core.psi.SqlLiteralValue"
override = true
}
literal_value_real ::= ( <>>>
| <>
| <>>>
| NULL
| CURRENT_TIME
| CURRENT_DATE
| CURRENT_TIMESTAMP
| <> ) {
elementType = literal_value
}
fake insert_stmt ::= [ <>>> ]
INSERT INTO [ <>>> DOT ] <>>> [ AS <>>> ]
[ LP <>>> ( COMMA <>>> ) * RP ] <>>>
[ ON CONFLICT ( [conflict_target] DO NOTHING | conflict_target conflict_update ) ]
[ returning_clause ] {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlInsertStmtImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlInsertStmt"
override = true
pin = 5
}
insert_stmt_real ::= [ <>>> ]
INSERT INTO [ <>>> DOT ] <>>> [ AS <>>> ]
[ LP <>>> ( COMMA <>>> ) * RP ] <>>>
[ ON CONFLICT ( [<>] DO NOTHING | <> <> ) ]
[ <> ] {
elementType = insert_stmt
pin = 5
}
fake conflict_target ::= LP <>>> ( COMMA <>>> ) * RP
conflict_target_real ::= LP <>>> ( COMMA <>>> ) * RP
{
elementType = conflict_target
}
fake conflict_update ::= DO UPDATE SET conflict_assign ( COMMA conflict_assign ) *
conflict_update_real ::= DO UPDATE SET <> ( COMMA <> ) *
{
elementType = conflict_update
}
fake conflict_assign ::= <>>> EQ <> {
mixin = "app.cash.sqldelight.dialects.postgresql.grammar.mixins.SqlInsertExcludedTableMixin"
}
conflict_assign_real ::= <>>> EQ <> {
elementType = conflict_assign
}
fake update_stmt_limited ::= [ <>>> ] UPDATE [ OR ROLLBACK | OR ABORT | OR REPLACE | OR FAIL | OR IGNORE ] <>>>
update_set_clause
[ FROM <>>> ]
[ WHERE <> ]
[ [ ORDER BY <>>> ( COMMA <>>> ) * ]
LIMIT <> [ ( OFFSET | COMMA ) <> ] ]
[ returning_clause ]{
implements = "com.alecstrong.sql.psi.core.psi.SqlUpdateStmtLimited"
mixin = "app.cash.sqldelight.dialects.postgresql.grammar.mixins.UpdateStmtLimitedMixin"
override = true
pin = 4
}
update_stmt_limited_real ::= [ <>>> ] UPDATE [ OR ROLLBACK | OR ABORT | OR REPLACE | OR FAIL | OR IGNORE ] <>>>
update_set_clause_real
[ FROM <>>> ]
[ WHERE <> ]
[ [ ORDER BY <>>> ( COMMA <>>> ) * ]
LIMIT <> [ ( OFFSET | COMMA ) <> ] ]
[ <> {
elementType = update_stmt_limited
pin = 4
}
fake returning_clause ::= 'RETURNING' <>>> ( COMMA <>>> ) * {
mixin = "app.cash.sqldelight.dialects.postgresql.grammar.mixins.ReturningClauseMixin"
implements = "com.alecstrong.sql.psi.core.psi.QueryElement"
}
returning_clause_real ::= 'RETURNING' <>>> ( COMMA <>>> ) * {
elementType = returning_clause
}
fake alter_table_rules ::= (
<>>>
| <>>>
| alter_table_rename_column
| alter_table_drop_column
| alter_table_add_constraint
| alter_table_alter_column
) {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlAlterTableRulesImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlAlterTableRules"
override = true
}
alter_table_rules_real ::= (
<>>>
| <>>>
| <>
| <>
| <>
| <>
) {
elementType = alter_table_rules
}
fake alter_table_rename_column ::= RENAME [ COLUMN ] <>>> TO alter_table_column_alias {
mixin = "app.cash.sqldelight.dialects.postgresql.grammar.mixins.AlterTableRenameColumnMixin"
pin = 1
}
alter_table_rename_column_real ::= RENAME [ COLUMN ] <>>> TO <> {
elementType = alter_table_rename_column
pin = 1
}
fake alter_table_column_alias ::= id | string {
mixin = "app.cash.sqldelight.dialects.postgresql.grammar.mixins.AlterTableColumnAliasMixin"
implements = [
"com.alecstrong.sql.psi.core.psi.AliasElement";
"com.alecstrong.sql.psi.core.psi.NamedElement";
"com.alecstrong.sql.psi.core.psi.SqlCompositeElement"
]
}
alter_table_column_alias_real ::= id | string {
elementType = alter_table_column_alias
}
fake alter_table_drop_column ::= DROP [ COLUMN ] <>>> {
mixin = "app.cash.sqldelight.dialects.postgresql.grammar.mixins.AlterTableDropColumnMixin"
pin = 1
}
alter_table_drop_column_real ::= DROP [ COLUMN ] <>>> {
elementType = alter_table_drop_column
pin = 1
}
fake alter_table_add_constraint ::= ADD table_constraint
alter_table_add_constraint_real ::= ADD <>
{
elementType = alter_table_add_constraint
}
fake type_clause ::= 'TYPE'
type_clause_real ::= 'TYPE'
{
elementType = type_clause
}
fake data_clause ::= 'DATA'
data_clause_real ::= 'DATA'
{
elementType = data_clause
}
fake alter_table_alter_column ::= ALTER [COLUMN] <>>>
( [ SET data_clause ] type_clause <>>> [USING <>>>'::'<>>>]
| (SET | DROP) NOT NULL
| SET DEFAULT <> | DROP DEFAULT | DROP identity_clause [ IF EXISTS ] | ADD <>>>
| SET GENERATED (ALWAYS | BY DEFAULT )
) {
mixin = "app.cash.sqldelight.dialects.postgresql.grammar.mixins.AlterTableAlterColumnMixin"
pin = 1
}
alter_table_alter_column_real ::= ALTER [COLUMN] <>>>
( [ SET <> ] <> <>>> [USING <>>>'::'<>>>]
| (SET | DROP) NOT NULL
| SET DEFAULT <> | DROP DEFAULT | DROP <> [ IF EXISTS ] | ADD <>>>
| SET GENERATED (ALWAYS | BY DEFAULT )
) {
elementType = alter_table_alter_column
pin = 1
}
fake compound_select_stmt ::= [ <>>> ] <>>> ( <>>> <>>> ) * [ ORDER BY <>>> ( COMMA <>>> ) * ] [ LIMIT <>>> ] [ ( OFFSET | COMMA ) <>>> ] [ FOR UPDATE [ 'SKIP' 'LOCKED' ] ] {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlCompoundSelectStmtImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlCompoundSelectStmt"
override = true
}
compound_select_stmt_real ::= [ <>>> ] <>>> ( <>>> <>>> ) * [ ORDER BY <>>> ( COMMA <>>> ) * ] [ LIMIT <>>> ] [ ( OFFSET | COMMA ) <>>> ] [ FOR UPDATE [ 'SKIP' 'LOCKED' ] ] {
elementType = compound_select_stmt
}
fake extension_expr ::= json_expression | boolean_literal | boolean_not_expression | window_function_expr {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlExtensionExprImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlExtensionExpr"
override = true
}
extension_expr_real ::= <> | <> | <> | <> {
elementType = extension_expr
}
fake window_function_expr ::= <>>> 'WITHIN' GROUP LP ORDER BY <> ( COMMA <> ) * RP {
mixin = "app.cash.sqldelight.dialects.postgresql.grammar.mixins.WindowFunctionMixin"
}
window_function_expr_real ::= <>>> 'WITHIN' GROUP LP ORDER BY <> ( COMMA <> ) * RP {
elementType = window_function_expr
}
fake boolean_not_expression ::= NOT (boolean_literal | <>>>)
boolean_not_expression_real ::= NOT (<> | <>>>)
{
elementType = boolean_not_expression
}
fake boolean_literal ::= TRUE | FALSE
boolean_literal_real ::= TRUE | FALSE
{
elementType = boolean_literal
}
fake json_expression ::= <>>> ( jsona_binary_operator | jsonb_binary_operator ) <> {
mixin = "app.cash.sqldelight.dialects.postgresql.grammar.mixins.JsonExpressionMixin"
pin = 2
}
json_expression_real ::= <>>> ( <> | <> ) <> {
elementType = json_expression
pin = 2
}
fake jsona_binary_operator ::= '->' | '->>' | '#>'
jsona_binary_operator_real ::= '->' | '->>' | '#>' {
elementType = jsona_binary_operator
}
fake jsonb_binary_operator ::= '@>' | '<@' | '?|' | '?&' | '?' | '#-'
jsonb_binary_operator_real ::= '@>' | '<@' | '?|' | '?&' | '?' | '#-'
{
elementType = jsonb_binary_operator
}
fake extension_stmt ::= copy_stdin {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlExtensionStmtImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlExtensionStmt"
override = true
}
extension_stmt_real ::= <> {
elementType = extension_stmt
}
fake copy_stdin ::= 'COPY' [ <>>> DOT ] <>>> [ AS <>>> ] [ LP <>>> ( COMMA <>>> ) * RP ] FROM 'STDIN' [ [ WITH ] LP copy_option ( COMMA copy_option) * RP ] [ WHERE <> ] {
mixin = "app.cash.sqldelight.dialects.postgresql.grammar.mixins.CopyMixin"
}
copy_stdin_real ::= 'COPY' [ <>>> DOT ] <>>> [ AS <>>> ] [ LP <>>> ( COMMA <>>> ) * RP ] FROM 'STDIN' [ [ WITH ] LP <> ( COMMA <>) * RP ] [ WHERE <> ] {
elementType = copy_stdin
}
fake copy_option ::= copy_option_format | copy_option_freeze | copy_option_delimiter | copy_option_null | copy_option_header | copy_option_quote | copy_option_escape | copy_option_force_not_null | copy_option_force_null | copy_option_encoding
copy_option_real ::= <> | <