should be it
This commit is contained in:
46
external/duckdb/extension/autocomplete/grammar/statements/alter.gram
vendored
Normal file
46
external/duckdb/extension/autocomplete/grammar/statements/alter.gram
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
AlterStatement <- 'ALTER' AlterOptions
|
||||
|
||||
|
||||
AlterOptions <- AlterTableStmt / AlterViewStmt / AlterSequenceStmt / AlterDatabaseStmt / AlterSchemaStmt
|
||||
|
||||
AlterTableStmt <- 'TABLE' IfExists? BaseTableName AlterTableOptions
|
||||
AlterSchemaStmt <- 'SCHEMA' IfExists? QualifiedName RenameAlter
|
||||
|
||||
AlterTableOptions <- AddColumn / DropColumn / AlterColumn / AddConstraint / ChangeNullability / RenameColumn / RenameAlter / SetPartitionedBy / ResetPartitionedBy / SetSortedBy / ResetSortedBy
|
||||
|
||||
AddConstraint <- 'ADD' TopLevelConstraint
|
||||
AddColumn <- 'ADD' 'COLUMN'? IfNotExists? ColumnDefinition
|
||||
DropColumn <- 'DROP' 'COLUMN'? IfExists? NestedColumnName DropBehavior?
|
||||
AlterColumn <- 'ALTER' 'COLUMN'? NestedColumnName AlterColumnEntry
|
||||
RenameColumn <- 'RENAME' 'COLUMN'? NestedColumnName 'TO' Identifier
|
||||
NestedColumnName <- (Identifier '.')* ColumnName
|
||||
RenameAlter <- 'RENAME' 'TO' Identifier
|
||||
SetPartitionedBy <- 'SET' 'PARTITIONED' 'BY' Parens(List(Expression))
|
||||
ResetPartitionedBy <- 'RESET' 'PARTITIONED' 'BY'
|
||||
SetSortedBy <- 'SET' 'SORTED' 'BY' Parens(OrderByExpressions)
|
||||
ResetSortedBy <- 'RESET' 'SORTED' 'BY'
|
||||
|
||||
AlterColumnEntry <- AddOrDropDefault / ChangeNullability / AlterType
|
||||
|
||||
AddOrDropDefault <- AddDefault / DropDefault
|
||||
AddDefault <- 'SET' 'DEFAULT' Expression
|
||||
DropDefault <- 'DROP' 'DEFAULT'
|
||||
|
||||
ChangeNullability <- ('DROP' / 'SET') 'NOT' 'NULL'
|
||||
|
||||
AlterType <- SetData? 'TYPE' Type? UsingExpression?
|
||||
SetData <- 'SET' 'DATA'?
|
||||
UsingExpression <- 'USING' Expression
|
||||
|
||||
AlterViewStmt <- 'VIEW' IfExists? BaseTableName RenameAlter
|
||||
|
||||
AlterSequenceStmt <- 'SEQUENCE' IfExists? QualifiedSequenceName AlterSequenceOptions
|
||||
|
||||
QualifiedSequenceName <- CatalogQualification? SchemaQualification? SequenceName
|
||||
|
||||
AlterSequenceOptions <- RenameAlter / SetSequenceOption
|
||||
SetSequenceOption <- List(SequenceOption)
|
||||
|
||||
AlterDatabaseStmt <- 'DATABASE' IfExists? Identifier RenameDatabaseAlter
|
||||
|
||||
RenameDatabaseAlter <- 'RENAME' 'TO' Identifier
|
||||
Reference in New Issue
Block a user