Skip to content
Merged
13 changes: 12 additions & 1 deletion ast/alter_database_set_statement.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ func (a *AlterDatabaseAddFileGroupStatement) statement() {}

// AlterDatabaseModifyFileStatement represents ALTER DATABASE ... MODIFY FILE statement
type AlterDatabaseModifyFileStatement struct {
DatabaseName *Identifier
DatabaseName *Identifier
FileDeclaration *FileDeclaration
UseCurrent bool
}

func (a *AlterDatabaseModifyFileStatement) node() {}
Expand Down Expand Up @@ -176,6 +178,15 @@ type AlterDatabaseRemoveFileGroupStatement struct {
func (a *AlterDatabaseRemoveFileGroupStatement) node() {}
func (a *AlterDatabaseRemoveFileGroupStatement) statement() {}

// AlterDatabaseCollateStatement represents ALTER DATABASE ... COLLATE statement
type AlterDatabaseCollateStatement struct {
DatabaseName *Identifier
Collation *Identifier
}

func (a *AlterDatabaseCollateStatement) node() {}
func (a *AlterDatabaseCollateStatement) statement() {}

// AlterDatabaseScopedConfigurationClearStatement represents ALTER DATABASE SCOPED CONFIGURATION CLEAR statement
type AlterDatabaseScopedConfigurationClearStatement struct {
Option *DatabaseConfigurationClearOption
Expand Down
13 changes: 11 additions & 2 deletions ast/alter_table_drop_table_element_statement.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,17 @@ func (*DropClusteredConstraintValueOption) dropClusteredConstraintOption() {}

// FileGroupOrPartitionScheme represents a filegroup or partition scheme reference.
type FileGroupOrPartitionScheme struct {
Name *IdentifierOrValueExpression
PartitionSchemeColumns []*Identifier
Name *IdentifierOrValueExpression
PartitionSchemeColumns []*Identifier
}

func (*FileGroupOrPartitionScheme) node() {}

// DropClusteredConstraintWaitAtLowPriorityLockOption represents a WAIT_AT_LOW_PRIORITY option.
type DropClusteredConstraintWaitAtLowPriorityLockOption struct {
OptionKind string // Always "MaxDop" based on the expected output
Options []LowPriorityLockWaitOption
}

func (*DropClusteredConstraintWaitAtLowPriorityLockOption) node() {}
func (*DropClusteredConstraintWaitAtLowPriorityLockOption) dropClusteredConstraintOption() {}
13 changes: 10 additions & 3 deletions ast/backup_statement.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ package ast

// BackupDatabaseStatement represents a BACKUP DATABASE statement
type BackupDatabaseStatement struct {
DatabaseName *IdentifierOrValueExpression
Devices []*DeviceInfo
Options []*BackupOption
Files []*BackupRestoreFileInfo
DatabaseName *IdentifierOrValueExpression
MirrorToClauses []*MirrorToClause
Devices []*DeviceInfo
Options []*BackupOption
}

// MirrorToClause represents a MIRROR TO clause in a BACKUP statement
type MirrorToClause struct {
Devices []*DeviceInfo
}

func (s *BackupDatabaseStatement) statementNode() {}
Expand Down
11 changes: 11 additions & 0 deletions ast/distinct_predicate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package ast

// DistinctPredicate represents an IS [NOT] DISTINCT FROM expression.
type DistinctPredicate struct {
FirstExpression ScalarExpression
SecondExpression ScalarExpression
IsNot bool
}

func (d *DistinctPredicate) node() {}
func (d *DistinctPredicate) booleanExpression() {}
1 change: 1 addition & 0 deletions ast/merge_statement.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ func (s *MergeStatement) statement() {}
// MergeSpecification represents the specification of a MERGE statement
type MergeSpecification struct {
Target TableReference // The target table
TableAlias *Identifier // Alias for the USING clause table reference (e.g., AS src)
TableReference TableReference // The USING clause table reference
SearchCondition BooleanExpression // The ON clause condition (may be GraphMatchPredicate)
ActionClauses []*MergeActionClause
Expand Down
10 changes: 10 additions & 0 deletions ast/next_value_for_expression.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package ast

// NextValueForExpression represents a NEXT VALUE FOR sequence expression.
type NextValueForExpression struct {
SequenceName *SchemaObjectName
OverClause *OverClause
}

func (n *NextValueForExpression) node() {}
func (n *NextValueForExpression) scalarExpression() {}
Loading
Loading