app.cash.sqldelight.dialects.sqlite_3_35.grammar.sqlite.bnf Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sqlite-3-35-dialect Show documentation
Show all versions of sqlite-3-35-dialect Show documentation
The SQLite v3.35 Dialect for SQLDelight
{
// 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 = "Sqlite"
parserImports=[
"static com.alecstrong.sql.psi.core.psi.SqlTypes.ABORT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.AS"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.BY"
"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.DELETE"
"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.FAIL"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.FROM"
"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.LIMIT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.LP"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.NOTHING"
"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.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.TO"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.UPDATE"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.WHERE"
]
}
overrides ::= alter_table_rules
| insert_stmt
| update_stmt
| update_stmt_limited
| delete_stmt
| delete_stmt_limited
alter_table_rules ::= (
{alter_table_add_column}
| {alter_table_rename_table}
| alter_table_rename_column
| alter_table_drop_column
) {
extends = "app.cash.sqldelight.dialects.sqlite_3_25.grammar.psi.impl.SqliteAlterTableRulesImpl"
implements = "app.cash.sqldelight.dialects.sqlite_3_25.grammar.psi.SqliteAlterTableRules"
override = true
}
alter_table_rename_column ::= RENAME [ COLUMN ] {column_name} TO {column_alias} {
mixin = "app.cash.sqldelight.dialects.sqlite_3_25.grammar.mixins.AlterTableRenameColumnMixin"
implements = "app.cash.sqldelight.dialects.sqlite_3_25.grammar.psi.SqliteAlterTableRenameColumn"
pin = 1
}
alter_table_drop_column ::= DROP COLUMN {column_name} {
mixin = "app.cash.sqldelight.dialects.sqlite_3_35.grammar.mixins.AlterTableDropColumnMixin"
pin = 1
}
insert_stmt ::= [ {with_clause} ]
( INSERT OR REPLACE | REPLACE | INSERT OR ROLLBACK | INSERT OR ABORT | INSERT OR FAIL | INSERT OR IGNORE | INSERT )
INTO [ {database_name} DOT ] {table_name} [ AS {table_alias} ]
[ LP {column_name} ( COMMA {column_name} ) * RP ] {insert_stmt_values} [ upsert_clause ] [ returning_clause ] {
extends = "app.cash.sqldelight.dialects.sqlite_3_24.grammar.psi.impl.SqliteInsertStmtImpl"
implements = "app.cash.sqldelight.dialects.sqlite_3_24.grammar.psi.SqliteInsertStmt"
pin = 5
override = true
}
upsert_clause ::= ON CONFLICT ( upsert_conflict_target DO UPDATE upsert_do_update | [ upsert_conflict_target ] DO NOTHING ) {
extends = "app.cash.sqldelight.dialects.sqlite_3_24.grammar.psi.impl.SqliteUpsertClauseImpl"
implements = "app.cash.sqldelight.dialects.sqlite_3_24.grammar.psi.SqliteUpsertClause"
}
upsert_conflict_target ::= LP {indexed_column} ( COMMA {indexed_column} ) * RP [ WHERE <> ] {
extends = "app.cash.sqldelight.dialects.sqlite_3_24.grammar.psi.impl.SqliteUpsertConflictTargetImpl"
implements = "app.cash.sqldelight.dialects.sqlite_3_24.grammar.psi.SqliteUpsertConflictTarget"
}
upsert_do_update ::= SET {column_name} EQ {setter_expression} {update_stmt_subsequent_setter} * [ WHERE <> ] {
extends = "app.cash.sqldelight.dialects.sqlite_3_24.grammar.psi.impl.SqliteUpsertDoUpdateImpl"
implements = "app.cash.sqldelight.dialects.sqlite_3_24.grammar.psi.SqliteUpsertDoUpdate"
}
update_stmt_limited ::= [ {with_clause} ] UPDATE [ OR ROLLBACK | OR ABORT | OR REPLACE | OR FAIL | OR IGNORE ] {qualified_table_name}
update_set_clause
[ FROM {join_clause} ]
[ WHERE <> ]
[ returning_clause ]
[ [ ORDER BY {ordering_term} ( COMMA {ordering_term} ) * ]
LIMIT <> [ ( OFFSET | COMMA ) <> ] ] {
extends = "app.cash.sqldelight.dialects.sqlite_3_33.grammar.psi.impl.SqliteUpdateStmtLimitedImpl"
implements = "app.cash.sqldelight.dialects.sqlite_3_33.grammar.psi.SqliteUpdateStmtLimited"
pin = 4
override = true
}
private update_set_clause ::= SET (( {column_name} EQ {setter_expression} {update_stmt_subsequent_setter} * ) | ( LP {column_name} ( COMMA {column_name} ) * RP ) EQ ( LP {setter_expression} ( COMMA {setter_expression} ) * RP )) {
pin(".*") = 1
}
delete_stmt_limited ::= [ {with_clause} ] DELETE FROM {qualified_table_name} [ WHERE <> ] [ returning_clause ] [ [ ORDER BY {ordering_term} ( COMMA {ordering_term} ) * ] LIMIT <> [ ( OFFSET | COMMA ) <> ] ] {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlDeleteStmtLimitedImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlDeleteStmtLimited"
pin = 2
override = true
}
returning_clause ::= 'RETURNING' {result_column} ( COMMA {result_column} ) * {
mixin = "app.cash.sqldelight.dialects.sqlite_3_35.grammar.mixins.ReturningClauseMixin"
implements = "com.alecstrong.sql.psi.core.psi.QueryElement"
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy