ast

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package ast provides AST types for T-SQL parsing.

Package ast defines the AST types for T-SQL parsing.

Package ast provides AST types for T-SQL parsing.

Package ast provides AST types for T-SQL parsing.

Package ast provides AST types for T-SQL parsing.

Index

Constants

View Source
const (
	PrincipalTypeIdentifier = "Identifier"
	PrincipalTypePublic     = "Public"
	PrincipalTypeNull       = "Null"
)

PrincipalType values

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceleratedDatabaseRecoveryDatabaseOption

type AcceleratedDatabaseRecoveryDatabaseOption struct {
	OptionKind  string // "AcceleratedDatabaseRecovery"
	OptionState string // "On" or "Off"
}

AcceleratedDatabaseRecoveryDatabaseOption represents ACCELERATED_DATABASE_RECOVERY option

type AdHocDataSource

type AdHocDataSource struct {
	ProviderName *StringLiteral `json:"ProviderName,omitempty"`
	InitString   *StringLiteral `json:"InitString,omitempty"`
}

AdHocDataSource represents an OPENDATASOURCE or OPENROWSET call for ad-hoc data access.

type AdHocTableReference

type AdHocTableReference struct {
	DataSource *AdHocDataSource                   `json:"DataSource,omitempty"`
	Object     *SchemaObjectNameOrValueExpression `json:"Object,omitempty"`
	Alias      *Identifier                        `json:"Alias,omitempty"`
	ForPath    bool                               `json:"ForPath"`
}

AdHocTableReference represents a table accessed via OPENDATASOURCE Syntax: OPENDATASOURCE('provider', 'connstr').'object' Uses AdHocDataSource from execute_statement.go

type AddAlterFullTextIndexAction

type AddAlterFullTextIndexAction struct {
	Columns          []*FullTextIndexColumn `json:"Columns,omitempty"`
	WithNoPopulation bool                   `json:"WithNoPopulation"`
}

AddAlterFullTextIndexAction represents an ADD action for fulltext index

type AddFileSpec

type AddFileSpec struct {
	File     ScalarExpression `json:"File,omitempty"`     // The file path or binary literal
	FileName *StringLiteral   `json:"FileName,omitempty"` // Optional AS 'filename'
}

AddFileSpec represents an ADD FILE specification.

type AddMemberAlterRoleAction

type AddMemberAlterRoleAction struct {
	Member *Identifier
}

AddMemberAlterRoleAction represents ADD MEMBER action

type AddSearchPropertyListAction

type AddSearchPropertyListAction struct {
	PropertyName *StringLiteral  `json:"PropertyName,omitempty"`
	Guid         *StringLiteral  `json:"Guid,omitempty"`
	Id           *IntegerLiteral `json:"Id,omitempty"`
	Description  *StringLiteral  `json:"Description,omitempty"`
}

AddSearchPropertyListAction represents an ADD action in ALTER SEARCH PROPERTY LIST.

type AddSensitivityClassificationStatement

type AddSensitivityClassificationStatement struct {
	Columns []*ColumnReferenceExpression
	Options []*SensitivityClassificationOption
}

AddSensitivityClassificationStatement represents ADD SENSITIVITY CLASSIFICATION statement

type AddSignatureStatement

type AddSignatureStatement struct {
	IsCounter   bool               `json:"IsCounter,omitempty"`
	ElementKind string             `json:"ElementKind,omitempty"` // "NotSpecified", "Object", "Assembly", "Database"
	Element     *SchemaObjectName  `json:"Element,omitempty"`
	Cryptos     []*CryptoMechanism `json:"Cryptos,omitempty"`
}

AddSignatureStatement represents an ADD SIGNATURE statement.

type AlgorithmKeyOption

type AlgorithmKeyOption struct {
	Algorithm  string `json:"Algorithm,omitempty"`
	OptionKind string `json:"OptionKind,omitempty"`
}

AlgorithmKeyOption represents an ALGORITHM key option.

type AlterApplicationRoleStatement

type AlterApplicationRoleStatement struct {
	Name                   *Identifier              `json:"Name,omitempty"`
	ApplicationRoleOptions []*ApplicationRoleOption `json:"ApplicationRoleOptions,omitempty"`
}

AlterApplicationRoleStatement represents an ALTER APPLICATION ROLE statement.

type AlterAssemblyStatement

type AlterAssemblyStatement struct {
	Name       *Identifier          `json:"Name,omitempty"`
	Parameters []ScalarExpression   `json:"Parameters,omitempty"` // FROM 'path' parameters
	Options    []AssemblyOptionBase `json:"Options,omitempty"`
	AddFiles   []*AddFileSpec       `json:"AddFiles,omitempty"`
	DropFiles  []*StringLiteral     `json:"DropFiles,omitempty"`
	IsDropAll  bool                 `json:"IsDropAll"`
}

AlterAssemblyStatement represents an ALTER ASSEMBLY statement.

type AlterAsymmetricKeyStatement

type AlterAsymmetricKeyStatement struct {
	Name               *Identifier      `json:"Name,omitempty"`
	Kind               string           `json:"Kind,omitempty"`
	AttestedBy         ScalarExpression `json:"AttestedBy,omitempty"`
	EncryptionPassword ScalarExpression `json:"EncryptionPassword,omitempty"`
	DecryptionPassword ScalarExpression `json:"DecryptionPassword,omitempty"`
}

AlterAsymmetricKeyStatement represents an ALTER ASYMMETRIC KEY statement.

type AlterAuthorizationStatement

type AlterAuthorizationStatement struct {
	SecurityTargetObject *SecurityTargetObject
	ToSchemaOwner        bool
	PrincipalName        *Identifier
}

AlterAuthorizationStatement represents an ALTER AUTHORIZATION statement

type AlterAvailabilityGroupAction

type AlterAvailabilityGroupAction struct {
	ActionType string // "Join", "ForceFailoverAllowDataLoss", "Online", "Offline"
}

AlterAvailabilityGroupAction represents simple actions like JOIN, ONLINE, OFFLINE

type AlterAvailabilityGroupFailoverAction

type AlterAvailabilityGroupFailoverAction struct {
	ActionType string // "Failover"
	Options    []*AlterAvailabilityGroupFailoverOption
}

AlterAvailabilityGroupFailoverAction represents FAILOVER action with options

type AlterAvailabilityGroupFailoverOption

type AlterAvailabilityGroupFailoverOption struct {
	OptionKind string           // "Target"
	Value      ScalarExpression // StringLiteral for target server
}

AlterAvailabilityGroupFailoverOption represents an option for failover action

type AlterAvailabilityGroupStatement

type AlterAvailabilityGroupStatement struct {
	Name          *Identifier
	StatementType string // "Action", "AddDatabase", "RemoveDatabase", "AddReplica", "ModifyReplica", "RemoveReplica", "Set"
	Action        AvailabilityGroupAction
	Databases     []*Identifier
	Replicas      []*AvailabilityReplica
	Options       []AvailabilityGroupOption
}

AlterAvailabilityGroupStatement represents ALTER AVAILABILITY GROUP statement

type AlterBrokerPriorityStatement

type AlterBrokerPriorityStatement struct {
	Name                     *Identifier                `json:"Name,omitempty"`
	BrokerPriorityParameters []*BrokerPriorityParameter `json:"BrokerPriorityParameters,omitempty"`
}

AlterBrokerPriorityStatement represents ALTER BROKER PRIORITY statement.

type AlterCertificateStatement

type AlterCertificateStatement struct {
	Name                 *Identifier    `json:"Name,omitempty"`
	Kind                 string         `json:"Kind,omitempty"`                 // RemovePrivateKey, WithActiveForBeginDialog, WithPrivateKey, RemoveAttestedOption, AttestedBy
	ActiveForBeginDialog string         `json:"ActiveForBeginDialog,omitempty"` // NotSet, On, Off
	PrivateKeyPath       *StringLiteral `json:"PrivateKeyPath,omitempty"`
	DecryptionPassword   *StringLiteral `json:"DecryptionPassword,omitempty"`
	EncryptionPassword   *StringLiteral `json:"EncryptionPassword,omitempty"`
	AttestedBy           *StringLiteral `json:"AttestedBy,omitempty"`
}

AlterCertificateStatement represents an ALTER CERTIFICATE statement.

type AlterColumnAlterFullTextIndexAction

type AlterColumnAlterFullTextIndexAction struct {
	Column           *FullTextIndexColumn `json:"Column,omitempty"`
	WithNoPopulation bool                 `json:"WithNoPopulation"`
}

AlterColumnAlterFullTextIndexAction represents an ALTER COLUMN action for fulltext index

type AlterColumnEncryptionKeyStatement

type AlterColumnEncryptionKeyStatement struct {
	Name                      *Identifier
	AlterType                 string // "Add" or "Drop"
	ColumnEncryptionKeyValues []*ColumnEncryptionKeyValue
}

AlterColumnEncryptionKeyStatement represents ALTER COLUMN ENCRYPTION KEY statement

type AlterCredentialStatement

type AlterCredentialStatement struct {
	Name             *Identifier
	Identity         ScalarExpression
	Secret           ScalarExpression
	IsDatabaseScoped bool
}

AlterCredentialStatement represents an ALTER CREDENTIAL statement.

type AlterCryptographicProviderStatement

type AlterCryptographicProviderStatement struct {
	Name   *Identifier
	Option string // "None", "Enable", "Disable"
	File   ScalarExpression
}

AlterCryptographicProviderStatement represents ALTER CRYPTOGRAPHIC PROVIDER statement

type AlterDatabaseAddFileGroupStatement

type AlterDatabaseAddFileGroupStatement struct {
	DatabaseName                *Identifier
	FileGroupName               *Identifier
	ContainsFileStream          bool
	ContainsMemoryOptimizedData bool
	UseCurrent                  bool
}

AlterDatabaseAddFileGroupStatement represents ALTER DATABASE ... ADD FILEGROUP statement

type AlterDatabaseAddFileStatement

type AlterDatabaseAddFileStatement struct {
	DatabaseName     *Identifier
	FileDeclarations []*FileDeclaration
	FileGroup        *Identifier
	IsLog            bool
	UseCurrent       bool
}

AlterDatabaseAddFileStatement represents ALTER DATABASE ... ADD FILE statement

type AlterDatabaseAuditSpecificationStatement

type AlterDatabaseAuditSpecificationStatement struct {
	SpecificationName *Identifier
	AuditName         *Identifier
	Parts             []*AuditSpecificationPart
	AuditState        string // NotSet, On, Off
}

AlterDatabaseAuditSpecificationStatement represents an ALTER DATABASE AUDIT SPECIFICATION statement

type AlterDatabaseCollateStatement

type AlterDatabaseCollateStatement struct {
	DatabaseName *Identifier
	Collation    *Identifier
}

AlterDatabaseCollateStatement represents ALTER DATABASE ... COLLATE statement

type AlterDatabaseEncryptionKeyStatement

type AlterDatabaseEncryptionKeyStatement struct {
	Regenerate bool             `json:"Regenerate"`
	Algorithm  string           `json:"Algorithm,omitempty"`
	Encryptor  *CryptoMechanism `json:"Encryptor,omitempty"`
}

AlterDatabaseEncryptionKeyStatement represents an ALTER DATABASE ENCRYPTION KEY statement.

type AlterDatabaseModifyFileGroupStatement

type AlterDatabaseModifyFileGroupStatement struct {
	DatabaseName       *Identifier
	FileGroupName      *Identifier
	MakeDefault        bool
	UpdatabilityOption string // "ReadOnly", "ReadWrite", "ReadOnlyOld", "ReadWriteOld", or ""
	NewFileGroupName   *Identifier
	Termination        *AlterDatabaseTermination
	UseCurrent         bool
}

AlterDatabaseModifyFileGroupStatement represents ALTER DATABASE ... MODIFY FILEGROUP statement

type AlterDatabaseModifyFileStatement

type AlterDatabaseModifyFileStatement struct {
	DatabaseName    *Identifier
	FileDeclaration *FileDeclaration
	UseCurrent      bool
}

AlterDatabaseModifyFileStatement represents ALTER DATABASE ... MODIFY FILE statement

type AlterDatabaseModifyNameStatement

type AlterDatabaseModifyNameStatement struct {
	DatabaseName *Identifier
	NewName      *Identifier
}

AlterDatabaseModifyNameStatement represents ALTER DATABASE ... MODIFY NAME statement

type AlterDatabaseRebuildLogStatement

type AlterDatabaseRebuildLogStatement struct {
	DatabaseName    *Identifier
	FileDeclaration *FileDeclaration
	UseCurrent      bool
}

AlterDatabaseRebuildLogStatement represents ALTER DATABASE ... REBUILD LOG statement

type AlterDatabaseRemoveFileGroupStatement

type AlterDatabaseRemoveFileGroupStatement struct {
	DatabaseName  *Identifier
	FileGroupName *Identifier
	UseCurrent    bool
}

AlterDatabaseRemoveFileGroupStatement represents ALTER DATABASE ... REMOVE FILEGROUP statement

type AlterDatabaseRemoveFileStatement

type AlterDatabaseRemoveFileStatement struct {
	DatabaseName *Identifier
	FileName     *Identifier
}

AlterDatabaseRemoveFileStatement represents ALTER DATABASE ... REMOVE FILE statement

type AlterDatabaseScopedConfigurationClearStatement

type AlterDatabaseScopedConfigurationClearStatement struct {
	Option    *DatabaseConfigurationClearOption
	Secondary bool
}

AlterDatabaseScopedConfigurationClearStatement represents ALTER DATABASE SCOPED CONFIGURATION CLEAR statement

type AlterDatabaseScopedConfigurationSetStatement

type AlterDatabaseScopedConfigurationSetStatement struct {
	Secondary bool
	Option    DatabaseConfigurationSetOption
}

AlterDatabaseScopedConfigurationSetStatement represents ALTER DATABASE SCOPED CONFIGURATION SET statement

type AlterDatabaseSetStatement

type AlterDatabaseSetStatement struct {
	DatabaseName      *Identifier
	UseCurrent        bool
	WithManualCutover bool
	Options           []DatabaseOption
	Termination       *AlterDatabaseTermination
}

AlterDatabaseSetStatement represents ALTER DATABASE ... SET statement

type AlterDatabaseTermination

type AlterDatabaseTermination struct {
	NoWait            bool
	ImmediateRollback bool
	RollbackAfter     ScalarExpression
}

AlterDatabaseTermination represents the termination clause (WITH NO_WAIT, WITH ROLLBACK AFTER N, WITH ROLLBACK IMMEDIATE)

type AlterEndpointStatement

type AlterEndpointStatement struct {
	Name            *Identifier              `json:"Name,omitempty"`
	State           string                   `json:"State,omitempty"` // Started, Disabled, NotSpecified
	Affinity        *EndpointAffinity        `json:"Affinity,omitempty"`
	Protocol        string                   `json:"Protocol,omitempty"` // None, Tcp, Http
	ProtocolOptions []EndpointProtocolOption `json:"ProtocolOptions,omitempty"`
	EndpointType    string                   `json:"EndpointType,omitempty"` // NotSpecified, Soap, ServiceBroker, etc.
	PayloadOptions  []PayloadOption          `json:"PayloadOptions,omitempty"`
}

AlterEndpointStatement represents an ALTER ENDPOINT statement.

type AlterEventSessionStatement

type AlterEventSessionStatement struct {
	Name                   *Identifier
	SessionScope           string // "Server" or "Database"
	StatementType          string // "AddEventDeclarationOptionalSessionOptions", "DropEventSpecificationOptionalSessionOptions", "AddTargetDeclarationOptionalSessionOptions", "DropTargetSpecificationOptionalSessionOptions", "RequiredSessionOptions", "AlterStateIsStart", "AlterStateIsStop"
	EventDeclarations      []*EventDeclaration
	DropEventDeclarations  []*EventSessionObjectName
	TargetDeclarations     []*TargetDeclaration
	DropTargetDeclarations []*EventSessionObjectName
	SessionOptions         []SessionOption
}

AlterEventSessionStatement represents ALTER EVENT SESSION statement

type AlterExternalDataSourceStatement

type AlterExternalDataSourceStatement struct {
	Name                      *Identifier
	Location                  ScalarExpression
	DataSourceType            string // HADOOP, etc.
	PreviousPushDownOption    string // ON, OFF
	ExternalDataSourceOptions []*ExternalDataSourceLiteralOrIdentifierOption
}

AlterExternalDataSourceStatement represents ALTER EXTERNAL DATA SOURCE statement

type AlterExternalLanguageStatement

type AlterExternalLanguageStatement struct {
	Name                  *Identifier
	Owner                 *Identifier
	Operation             *Identifier
	Platform              *Identifier
	ExternalLanguageFiles []*ExternalLanguageFileOption
}

AlterExternalLanguageStatement represents ALTER EXTERNAL LANGUAGE statement

type AlterExternalLibraryStatement

type AlterExternalLibraryStatement struct {
	Name                 *Identifier
	Owner                *Identifier
	Language             *StringLiteral
	ExternalLibraryFiles []*ExternalLibraryFileOption
	Options              []*ExternalLibraryOption
}

AlterExternalLibraryStatement represents ALTER EXTERNAL LIBRARY statement

type AlterExternalResourcePoolStatement

type AlterExternalResourcePoolStatement struct {
	Name                           *Identifier                      `json:"Name,omitempty"`
	ExternalResourcePoolParameters []*ExternalResourcePoolParameter `json:"ExternalResourcePoolParameters,omitempty"`
}

AlterExternalResourcePoolStatement represents an ALTER EXTERNAL RESOURCE POOL statement

type AlterFederationStatement

type AlterFederationStatement struct {
	Name             *Identifier
	Kind             string // "Split", "DropLow", "DropHigh"
	DistributionName *Identifier
	Boundary         ScalarExpression
}

AlterFederationStatement represents ALTER FEDERATION statement

type AlterFullTextIndexActionOption

type AlterFullTextIndexActionOption interface {
	// contains filtered or unexported methods
}

AlterFullTextIndexActionOption is an interface for fulltext index actions

type AlterFullTextStopListStatement

type AlterFullTextStopListStatement struct {
	Name   *Identifier             `json:"Name,omitempty"`
	Action *FullTextStopListAction `json:"Action,omitempty"`
}

AlterFullTextStopListStatement represents ALTER FULLTEXT STOPLIST statement

type AlterFulltextCatalogStatement

type AlterFulltextCatalogStatement struct {
	Name    *Identifier                   `json:"Name,omitempty"`
	Action  string                        `json:"Action,omitempty"` // Rebuild, Reorganize, AsDefault
	Options []*OnOffFullTextCatalogOption `json:"Options,omitempty"`
}

AlterFulltextCatalogStatement represents an ALTER FULLTEXT CATALOG statement.

type AlterFulltextIndexStatement

type AlterFulltextIndexStatement struct {
	OnName *SchemaObjectName              `json:"OnName,omitempty"`
	Action AlterFullTextIndexActionOption `json:"Action,omitempty"`
}

AlterFulltextIndexStatement represents an ALTER FULLTEXT INDEX statement.

type AlterFunctionStatement

type AlterFunctionStatement struct {
	Name          *SchemaObjectName
	Parameters    []*ProcedureParameter
	ReturnType    FunctionReturnType
	Options       []FunctionOptionBase
	StatementList *StatementList
}

AlterFunctionStatement represents an ALTER FUNCTION statement

type AlterIndexStatement

type AlterIndexStatement struct {
	Name           *Identifier
	All            bool
	OnName         *SchemaObjectName
	AlterIndexType string // "Rebuild", "Reorganize", "Disable", "Set", "UpdateSelectiveXmlPaths", etc.
	Partition      *PartitionSpecifier
	IndexOptions   []IndexOption
	PromotedPaths  []*SelectiveXmlIndexPromotedPath
	XmlNamespaces  *XmlNamespaces
}

AlterIndexStatement represents ALTER INDEX statement

type AlterLoginAddDropCredentialStatement

type AlterLoginAddDropCredentialStatement struct {
	Name           *Identifier
	CredentialName *Identifier
	IsAdd          bool
}

AlterLoginAddDropCredentialStatement represents an ALTER LOGIN ADD/DROP CREDENTIAL statement.

type AlterLoginEnableDisableStatement

type AlterLoginEnableDisableStatement struct {
	Name     *Identifier `json:"Name,omitempty"`
	IsEnable bool        `json:"IsEnable"`
}

AlterLoginEnableDisableStatement represents ALTER LOGIN name ENABLE/DISABLE

type AlterLoginOptionsStatement

type AlterLoginOptionsStatement struct {
	Name    *Identifier       `json:"Name,omitempty"`
	Options []PrincipalOption `json:"Options,omitempty"`
}

AlterLoginOptionsStatement represents ALTER LOGIN name WITH options

type AlterMasterKeyStatement

type AlterMasterKeyStatement struct {
	Option   string
	Password ScalarExpression
}

AlterMasterKeyStatement represents an ALTER MASTER KEY statement.

type AlterMessageTypeStatement

type AlterMessageTypeStatement struct {
	Name                    *Identifier
	ValidationMethod        string // "Empty", "None", "WellFormedXml", "ValidXml"
	XmlSchemaCollectionName *SchemaObjectName
}

AlterMessageTypeStatement represents ALTER MESSAGE TYPE statement

type AlterPartitionFunctionStatement

type AlterPartitionFunctionStatement struct {
	Name      *Identifier      `json:"Name,omitempty"`
	HasAction bool             `json:"-"` // Internal: true if SPLIT or MERGE was specified
	IsSplit   bool             `json:"IsSplit,omitempty"`
	Boundary  ScalarExpression `json:"Boundary,omitempty"`
}

AlterPartitionFunctionStatement represents an ALTER PARTITION FUNCTION statement.

type AlterPartitionSchemeStatement

type AlterPartitionSchemeStatement struct {
	Name      *Identifier                  `json:"Name,omitempty"`
	FileGroup *IdentifierOrValueExpression `json:"FileGroup,omitempty"`
}

AlterPartitionSchemeStatement represents an ALTER PARTITION SCHEME statement.

type AlterProcedureStatement

type AlterProcedureStatement struct {
	ProcedureReference *ProcedureReference
	Parameters         []*ProcedureParameter
	Options            []ProcedureOptionBase
	StatementList      *StatementList
	IsForReplication   bool
}

AlterProcedureStatement represents an ALTER PROCEDURE statement.

type AlterQueueStatement

type AlterQueueStatement struct {
	Name         *SchemaObjectName `json:"Name,omitempty"`
	QueueOptions []QueueOption     `json:"QueueOptions,omitempty"`
}

AlterQueueStatement represents an ALTER QUEUE statement.

type AlterRemoteServiceBindingStatement

type AlterRemoteServiceBindingStatement struct {
	Name    *Identifier
	Options []RemoteServiceBindingOption
}

AlterRemoteServiceBindingStatement represents ALTER REMOTE SERVICE BINDING.

type AlterResourceGovernorStatement

type AlterResourceGovernorStatement struct {
	Command            string
	ClassifierFunction *SchemaObjectName
}

type AlterResourcePoolStatement

type AlterResourcePoolStatement struct {
	Name                   *Identifier              `json:"Name,omitempty"`
	ResourcePoolParameters []*ResourcePoolParameter `json:"ResourcePoolParameters,omitempty"`
}

AlterResourcePoolStatement represents an ALTER RESOURCE POOL statement

type AlterRoleAction

type AlterRoleAction interface {
	Node
	// contains filtered or unexported methods
}

AlterRoleAction is an interface for role actions

type AlterRoleStatement

type AlterRoleStatement struct {
	Name   *Identifier
	Action AlterRoleAction
}

AlterRoleStatement represents an ALTER ROLE statement

type AlterRouteStatement

type AlterRouteStatement struct {
	Name         *Identifier    `json:"Name,omitempty"`
	RouteOptions []*RouteOption `json:"RouteOptions,omitempty"`
}

AlterRouteStatement represents an ALTER ROUTE statement.

type AlterSchemaStatement

type AlterSchemaStatement struct {
	Name       *Identifier
	ObjectName *SchemaObjectName
	ObjectKind string
}

AlterSchemaStatement represents an ALTER SCHEMA statement.

type AlterSearchPropertyListStatement

type AlterSearchPropertyListStatement struct {
	Name   *Identifier              `json:"Name,omitempty"`
	Action SearchPropertyListAction `json:"Action,omitempty"`
}

AlterSearchPropertyListStatement represents an ALTER SEARCH PROPERTY LIST statement.

type AlterSecurityPolicyStatement

type AlterSecurityPolicyStatement struct {
	Name                      *SchemaObjectName
	NotForReplication         bool
	NotForReplicationModified bool // tracks if NOT FOR REPLICATION was changed
	SecurityPolicyOptions     []*SecurityPolicyOption
	SecurityPredicateActions  []*SecurityPredicateAction
	ActionType                string // "Alter"
}

AlterSecurityPolicyStatement represents ALTER SECURITY POLICY

type AlterSequenceStatement

type AlterSequenceStatement struct {
	Name            *SchemaObjectName
	SequenceOptions []interface{} // Can be SequenceOption or ScalarExpressionSequenceOption
}

AlterSequenceStatement represents an ALTER SEQUENCE statement.

type AlterServerAuditSpecificationStatement

type AlterServerAuditSpecificationStatement struct {
	SpecificationName *Identifier
	AuditName         *Identifier
	Parts             []*AuditSpecificationPart
	AuditState        string // NotSet, On, Off
}

AlterServerAuditSpecificationStatement represents an ALTER SERVER AUDIT SPECIFICATION statement

type AlterServerAuditStatement

type AlterServerAuditStatement struct {
	AuditName           *Identifier
	NewName             *Identifier
	AuditTarget         *AuditTarget
	Options             []AuditOption
	PredicateExpression BooleanExpression
	RemoveWhere         bool
}

AlterServerAuditStatement represents an ALTER SERVER AUDIT statement

type AlterServerConfigurationBufferPoolExtensionContainerOption

type AlterServerConfigurationBufferPoolExtensionContainerOption struct {
	OptionKind  string                                                  // "OnOff"
	OptionValue *OnOffOptionValue                                       // ON or OFF
	Suboptions  []AlterServerConfigurationBufferPoolExtensionOptionBase // suboptions inside parentheses
}

AlterServerConfigurationBufferPoolExtensionContainerOption represents the container option for buffer pool extension

type AlterServerConfigurationBufferPoolExtensionOption

type AlterServerConfigurationBufferPoolExtensionOption struct {
	OptionKind  string // "FileName"
	OptionValue *LiteralOptionValue
}

AlterServerConfigurationBufferPoolExtensionOption represents a buffer pool extension option

type AlterServerConfigurationBufferPoolExtensionOptionBase

type AlterServerConfigurationBufferPoolExtensionOptionBase interface {
	Node
	// contains filtered or unexported methods
}

AlterServerConfigurationBufferPoolExtensionOptionBase is the interface for buffer pool extension options

type AlterServerConfigurationBufferPoolExtensionSizeOption

type AlterServerConfigurationBufferPoolExtensionSizeOption struct {
	OptionKind  string // "Size"
	OptionValue *LiteralOptionValue
	SizeUnit    string // "KB", "MB", "GB"
}

AlterServerConfigurationBufferPoolExtensionSizeOption represents SIZE option with size unit

type AlterServerConfigurationDiagnosticsLogMaxSizeOption

type AlterServerConfigurationDiagnosticsLogMaxSizeOption struct {
	OptionKind  string // "MaxSize"
	OptionValue *LiteralOptionValue
	SizeUnit    string // "KB", "MB", "GB", "Unspecified"
}

AlterServerConfigurationDiagnosticsLogMaxSizeOption represents MAX_SIZE option with size unit

type AlterServerConfigurationDiagnosticsLogOption

type AlterServerConfigurationDiagnosticsLogOption struct {
	OptionKind  string      // "OnOff", "MaxFiles", "Path"
	OptionValue interface{} // *OnOffOptionValue or *LiteralOptionValue
}

AlterServerConfigurationDiagnosticsLogOption represents a diagnostics log option

type AlterServerConfigurationDiagnosticsLogOptionBase

type AlterServerConfigurationDiagnosticsLogOptionBase interface {
	Node
	// contains filtered or unexported methods
}

AlterServerConfigurationDiagnosticsLogOptionBase is the interface for diagnostics log options

type AlterServerConfigurationExternalAuthenticationContainerOption

type AlterServerConfigurationExternalAuthenticationContainerOption struct {
	OptionKind  string                                                  // "OnOff"
	OptionValue *OnOffOptionValue                                       // ON or OFF
	Suboptions  []*AlterServerConfigurationExternalAuthenticationOption // suboptions inside parentheses
}

AlterServerConfigurationExternalAuthenticationContainerOption represents the container option for external authentication

type AlterServerConfigurationExternalAuthenticationOption

type AlterServerConfigurationExternalAuthenticationOption struct {
	OptionKind  string              // "UseIdentity", "CredentialName"
	OptionValue *LiteralOptionValue // optional, for CredentialName
}

AlterServerConfigurationExternalAuthenticationOption represents an external authentication suboption

type AlterServerConfigurationFailoverClusterPropertyOption

type AlterServerConfigurationFailoverClusterPropertyOption struct {
	OptionKind  string // "VerboseLogging", "SqlDumperDumpFlags", etc.
	OptionValue *LiteralOptionValue
}

AlterServerConfigurationFailoverClusterPropertyOption represents a failover cluster property option

type AlterServerConfigurationHadrClusterOption

type AlterServerConfigurationHadrClusterOption struct {
	OptionKind  string              // "Context"
	OptionValue *LiteralOptionValue // string literal for context name
	IsLocal     bool                // true if LOCAL was specified
}

AlterServerConfigurationHadrClusterOption represents a HADR cluster option

type AlterServerConfigurationSetBufferPoolExtensionStatement

type AlterServerConfigurationSetBufferPoolExtensionStatement struct {
	Options []*AlterServerConfigurationBufferPoolExtensionContainerOption
}

AlterServerConfigurationSetBufferPoolExtensionStatement represents ALTER SERVER CONFIGURATION SET BUFFER POOL EXTENSION statement

type AlterServerConfigurationSetDiagnosticsLogStatement

type AlterServerConfigurationSetDiagnosticsLogStatement struct {
	Options []AlterServerConfigurationDiagnosticsLogOptionBase
}

AlterServerConfigurationSetDiagnosticsLogStatement represents ALTER SERVER CONFIGURATION SET DIAGNOSTICS LOG statement

type AlterServerConfigurationSetExternalAuthenticationStatement

type AlterServerConfigurationSetExternalAuthenticationStatement struct {
	Options []*AlterServerConfigurationExternalAuthenticationContainerOption
}

AlterServerConfigurationSetExternalAuthenticationStatement represents ALTER SERVER CONFIGURATION SET EXTERNAL AUTHENTICATION statement

type AlterServerConfigurationSetFailoverClusterPropertyStatement

type AlterServerConfigurationSetFailoverClusterPropertyStatement struct {
	Options []*AlterServerConfigurationFailoverClusterPropertyOption
}

AlterServerConfigurationSetFailoverClusterPropertyStatement represents ALTER SERVER CONFIGURATION SET FAILOVER CLUSTER PROPERTY statement

type AlterServerConfigurationSetHadrClusterStatement

type AlterServerConfigurationSetHadrClusterStatement struct {
	Options []*AlterServerConfigurationHadrClusterOption
}

AlterServerConfigurationSetHadrClusterStatement represents ALTER SERVER CONFIGURATION SET HADR CLUSTER statement

type AlterServerConfigurationSetSoftNumaStatement

type AlterServerConfigurationSetSoftNumaStatement struct {
	Options []*AlterServerConfigurationSoftNumaOption
}

AlterServerConfigurationSetSoftNumaStatement represents ALTER SERVER CONFIGURATION SET SOFTNUMA statement

type AlterServerConfigurationSoftNumaOption

type AlterServerConfigurationSoftNumaOption struct {
	OptionKind  string // "OnOff"
	OptionValue *OnOffOptionValue
}

AlterServerConfigurationSoftNumaOption represents SOFTNUMA option

type AlterServerConfigurationStatement

type AlterServerConfigurationStatement struct {
	ProcessAffinity       string                  // "CpuAuto", "Cpu", "NumaNode"
	ProcessAffinityRanges []*ProcessAffinityRange // for Cpu or NumaNode
}

AlterServerConfigurationStatement represents ALTER SERVER CONFIGURATION SET PROCESS AFFINITY statement

type AlterServerRoleStatement

type AlterServerRoleStatement struct {
	Name   *Identifier
	Action AlterRoleAction // Reuses the same action types as AlterRoleStatement
}

AlterServerRoleStatement represents an ALTER SERVER ROLE statement

type AlterServiceMasterKeyStatement

type AlterServiceMasterKeyStatement struct {
	Kind     string         `json:"Kind,omitempty"`
	Account  *StringLiteral `json:"Account,omitempty"`
	Password *StringLiteral `json:"Password,omitempty"`
}

AlterServiceMasterKeyStatement represents an ALTER SERVICE MASTER KEY statement.

type AlterServiceStatement

type AlterServiceStatement struct {
	Name             *Identifier        `json:"Name,omitempty"`
	QueueName        *SchemaObjectName  `json:"QueueName,omitempty"`
	ServiceContracts []*ServiceContract `json:"ServiceContracts,omitempty"`
}

AlterServiceStatement represents an ALTER SERVICE statement.

type AlterSymmetricKeyStatement

type AlterSymmetricKeyStatement struct {
	Name                 *Identifier        `json:"Name,omitempty"`
	IsAdd                bool               `json:"IsAdd"`
	EncryptingMechanisms []*CryptoMechanism `json:"EncryptingMechanisms,omitempty"`
}

AlterSymmetricKeyStatement represents an ALTER SYMMETRIC KEY statement.

type AlterTableAddTableElementStatement

type AlterTableAddTableElementStatement struct {
	SchemaObjectName             *SchemaObjectName
	ExistingRowsCheckEnforcement string // "NotSpecified", "Check", "NoCheck"
	Definition                   *TableDefinition
}

AlterTableAddTableElementStatement represents an ALTER TABLE ... ADD statement

type AlterTableAlterColumnStatement

type AlterTableAlterColumnStatement struct {
	SchemaObjectName            *SchemaObjectName
	ColumnIdentifier            *Identifier
	DataType                    DataTypeReference
	AlterTableAlterColumnOption string // "NoOptionDefined", "AddRowGuidCol", "DropRowGuidCol", "Null", "NotNull", "AddSparse", "DropSparse", etc.
	StorageOptions              *ColumnStorageOptions
	IsHidden                    bool
	Collation                   *Identifier
	IsMasked                    bool
	Encryption                  *ColumnEncryptionDefinition
	MaskingFunction             ScalarExpression
	Options                     []IndexOption
	GeneratedAlways             string // UserIdStart, UserIdEnd, UserNameStart, UserNameEnd, etc.
}

AlterTableAlterColumnStatement represents ALTER TABLE ... ALTER COLUMN statement

type AlterTableAlterIndexStatement

type AlterTableAlterIndexStatement struct {
	SchemaObjectName *SchemaObjectName
	IndexIdentifier  *Identifier
	AlterIndexType   string // "Rebuild", "Disable", etc.
	IndexOptions     []*IndexExpressionOption
}

AlterTableAlterIndexStatement represents an ALTER TABLE ... ALTER INDEX statement

type AlterTableAlterPartitionStatement

type AlterTableAlterPartitionStatement struct {
	SchemaObjectName *SchemaObjectName
	BoundaryValue    ScalarExpression
	IsSplit          bool
}

AlterTableAlterPartitionStatement represents ALTER TABLE table SPLIT/MERGE RANGE (value)

type AlterTableChangeTrackingModificationStatement

type AlterTableChangeTrackingModificationStatement struct {
	SchemaObjectName    *SchemaObjectName
	IsEnable            bool   // true for ENABLE, false for DISABLE
	TrackColumnsUpdated string // "NotSet", "On", "Off"
}

AlterTableChangeTrackingModificationStatement represents ALTER TABLE ... ENABLE/DISABLE CHANGE_TRACKING

type AlterTableConstraintModificationStatement

type AlterTableConstraintModificationStatement struct {
	SchemaObjectName             *SchemaObjectName
	ExistingRowsCheckEnforcement string // "NotSpecified", "Check", "NoCheck"
	ConstraintEnforcement        string // "Check", "NoCheck"
	All                          bool
	ConstraintNames              []*Identifier
}

AlterTableConstraintModificationStatement represents ALTER TABLE ... CHECK/NOCHECK CONSTRAINT

type AlterTableDropTableElement

type AlterTableDropTableElement struct {
	TableElementType               string
	Name                           *Identifier
	IsIfExists                     bool
	DropClusteredConstraintOptions []DropClusteredConstraintOption
}

AlterTableDropTableElement represents an element being dropped from a table.

type AlterTableDropTableElementStatement

type AlterTableDropTableElementStatement struct {
	SchemaObjectName            *SchemaObjectName
	AlterTableDropTableElements []*AlterTableDropTableElement
}

AlterTableDropTableElementStatement represents an ALTER TABLE ... DROP statement.

type AlterTableFileTableNamespaceStatement

type AlterTableFileTableNamespaceStatement struct {
	SchemaObjectName *SchemaObjectName `json:"SchemaObjectName,omitempty"`
	IsEnable         bool              `json:"IsEnable,omitempty"`
}

AlterTableFileTableNamespaceStatement represents ALTER TABLE ... ENABLE/DISABLE FILETABLE_NAMESPACE

type AlterTableRebuildStatement

type AlterTableRebuildStatement struct {
	SchemaObjectName *SchemaObjectName
	Partition        *PartitionSpecifier
	IndexOptions     []IndexOption
}

AlterTableRebuildStatement represents ALTER TABLE ... REBUILD statement

type AlterTableSetStatement

type AlterTableSetStatement struct {
	SchemaObjectName *SchemaObjectName
	Options          []TableOption
}

AlterTableSetStatement represents ALTER TABLE ... SET statement

type AlterTableSwitchStatement

type AlterTableSwitchStatement struct {
	SchemaObjectName    *SchemaObjectName
	SourcePartition     ScalarExpression
	TargetTable         *SchemaObjectName
	TargetPartition     ScalarExpression
	Options             []TableSwitchOption
	LowPriorityLockWait *LowPriorityLockWait
}

AlterTableSwitchStatement represents ALTER TABLE ... SWITCH

type AlterTableTriggerModificationStatement

type AlterTableTriggerModificationStatement struct {
	SchemaObjectName   *SchemaObjectName
	TriggerEnforcement string // "Enable" or "Disable"
	All                bool
	TriggerNames       []*Identifier
}

AlterTableTriggerModificationStatement represents ALTER TABLE ... ENABLE/DISABLE TRIGGER

type AlterTriggerStatement

type AlterTriggerStatement struct {
	Name                *SchemaObjectName
	TriggerObject       *TriggerObject
	TriggerType         string // "For", "After", "InsteadOf"
	TriggerActions      []*TriggerAction
	Options             []TriggerOptionType
	WithAppend          bool
	IsNotForReplication bool
	MethodSpecifier     *MethodSpecifier
	StatementList       *StatementList
}

AlterTriggerStatement represents an ALTER TRIGGER statement

type AlterUserStatement

type AlterUserStatement struct {
	Name        *Identifier  `json:"Name,omitempty"`
	UserOptions []UserOption `json:"UserOptions,omitempty"`
}

AlterUserStatement represents an ALTER USER statement.

type AlterViewStatement

type AlterViewStatement struct {
	SchemaObjectName *SchemaObjectName `json:"SchemaObjectName,omitempty"`
	Columns          []*Identifier     `json:"Columns,omitempty"`
	SelectStatement  *SelectStatement  `json:"SelectStatement,omitempty"`
	WithCheckOption  bool              `json:"WithCheckOption"`
	ViewOptions      []ViewOption      `json:"ViewOptions,omitempty"`
	IsMaterialized   bool              `json:"IsMaterialized"`
	IsRebuild        bool              `json:"IsRebuild"`
	IsDisable        bool              `json:"IsDisable"`
}

AlterViewStatement represents an ALTER VIEW statement.

type AlterWorkloadGroupStatement

type AlterWorkloadGroupStatement struct {
	Name                    *Identifier
	PoolName                *Identifier
	ExternalPoolName        *Identifier
	WorkloadGroupParameters []interface{} // Can be WorkloadGroupResourceParameter or WorkloadGroupImportanceParameter
}

AlterWorkloadGroupStatement represents an ALTER WORKLOAD GROUP statement.

type AlterXmlSchemaCollectionStatement

type AlterXmlSchemaCollectionStatement struct {
	Name       *SchemaObjectName
	Expression ScalarExpression
}

AlterXmlSchemaCollectionStatement represents ALTER XML SCHEMA COLLECTION.

type ApplicationRoleOption

type ApplicationRoleOption struct {
	OptionKind string                       `json:"OptionKind,omitempty"`
	Value      *IdentifierOrValueExpression `json:"Value,omitempty"`
}

ApplicationRoleOption represents an option in CREATE/ALTER APPLICATION ROLE

type AssemblyEncryptionSource

type AssemblyEncryptionSource struct {
	Assembly *Identifier `json:"Assembly,omitempty"`
}

AssemblyEncryptionSource represents a certificate source from an assembly.

type AssemblyName

type AssemblyName struct {
	Name      *Identifier
	ClassName *Identifier
}

AssemblyName represents an assembly name reference

type AssemblyOption

type AssemblyOption struct {
	OptionKind string `json:"OptionKind,omitempty"` // "UncheckedData"
}

AssemblyOption represents a basic assembly option.

type AssemblyOptionBase

type AssemblyOptionBase interface {
	Node
	// contains filtered or unexported methods
}

AssemblyOptionBase is an interface for assembly options.

type AssignmentSetClause

type AssignmentSetClause struct {
	Variable       *VariableReference         `json:"Variable,omitempty"`
	Column         *ColumnReferenceExpression `json:"Column,omitempty"`
	NewValue       ScalarExpression           `json:"NewValue,omitempty"`
	AssignmentKind string                     `json:"AssignmentKind,omitempty"`
}

AssignmentSetClause represents column = value in UPDATE.

type AsymmetricKeyCreateLoginSource

type AsymmetricKeyCreateLoginSource struct {
	Key        *Identifier `json:"Key,omitempty"`
	Credential *Identifier `json:"Credential,omitempty"`
}

AsymmetricKeyCreateLoginSource represents FROM ASYMMETRIC KEY source

type AtTimeZoneCall

type AtTimeZoneCall struct {
	DateValue ScalarExpression
	TimeZone  ScalarExpression
}

AtTimeZoneCall represents an AT TIME ZONE expression

type AtomicBlockOption

type AtomicBlockOption interface {
	// contains filtered or unexported methods
}

AtomicBlockOption is an interface for atomic block options.

type AuditActionGroupReference

type AuditActionGroupReference struct {
	Group string
}

AuditActionGroupReference represents a reference to an audit action group

type AuditActionSpecification

type AuditActionSpecification struct {
	Actions      []*DatabaseAuditAction
	Principals   []*SecurityPrincipal
	TargetObject *SecurityTargetObject
}

AuditActionSpecification represents an action specification in audit parts Example: (select, INSERT, update ON t1 BY dbo)

type AuditGuidAuditOption

type AuditGuidAuditOption struct {
	OptionKind string
	Guid       ScalarExpression
}

AuditGuidAuditOption represents the AUDIT_GUID option

type AuditOption

type AuditOption interface {
	// contains filtered or unexported methods
}

AuditOption is an interface for audit options

type AuditSpecificationDetail

type AuditSpecificationDetail interface {
	Node
	// contains filtered or unexported methods
}

AuditSpecificationDetail is an interface for audit specification details

type AuditSpecificationPart

type AuditSpecificationPart struct {
	IsDrop  bool
	Details AuditSpecificationDetail
}

AuditSpecificationPart represents an ADD or DROP part in an audit specification

type AuditTarget

type AuditTarget struct {
	TargetKind    string // File, ApplicationLog, SecurityLog
	TargetOptions []AuditTargetOption
}

AuditTarget represents the target of a server audit

type AuditTargetOption

type AuditTargetOption interface {
	// contains filtered or unexported methods
}

AuditTargetOption is an interface for audit target options

type AuthenticationEndpointProtocolOption

type AuthenticationEndpointProtocolOption struct {
	AuthenticationTypes string `json:"AuthenticationTypes,omitempty"` // Comma-separated list: Basic, Digest, Integrated, Ntlm, Kerberos
	Kind                string `json:"Kind,omitempty"`                // HttpAuthentication
}

AuthenticationEndpointProtocolOption represents HTTP authentication option.

type AuthenticationPayloadOption

type AuthenticationPayloadOption struct {
	Protocol            string      `json:"Protocol,omitempty"` // Windows, WindowsNtlm, WindowsKerberos, WindowsNegotiate, Certificate
	Certificate         *Identifier `json:"Certificate,omitempty"`
	TryCertificateFirst bool        `json:"TryCertificateFirst"`
	Kind                string      `json:"Kind,omitempty"` // Authentication
}

AuthenticationPayloadOption represents an authentication option for service_broker/database_mirroring.

type AutoCleanupChangeTrackingOptionDetail

type AutoCleanupChangeTrackingOptionDetail struct {
	IsOn bool
}

AutoCleanupChangeTrackingOptionDetail represents AUTO_CLEANUP option

type AutoCreateStatisticsDatabaseOption

type AutoCreateStatisticsDatabaseOption struct {
	OptionKind       string // "AutoCreateStatistics"
	OptionState      string // "On" or "Off"
	HasIncremental   bool   // Whether INCREMENTAL is specified
	IncrementalState string // "On" or "Off"
}

AutoCreateStatisticsDatabaseOption represents AUTO_CREATE_STATISTICS option with optional INCREMENTAL

type AutomaticTuningCreateIndexOption

type AutomaticTuningCreateIndexOption struct {
	OptionKind string // "Create_Index"
	Value      string // "On", "Off", "Default"
}

AutomaticTuningCreateIndexOption represents CREATE_INDEX option

type AutomaticTuningDatabaseOption

type AutomaticTuningDatabaseOption struct {
	OptionKind           string                  // "AutomaticTuning"
	AutomaticTuningState string                  // "Inherit", "Custom", "Auto", "NotSet"
	Options              []AutomaticTuningOption // Sub-options like CREATE_INDEX, DROP_INDEX, etc.
}

AutomaticTuningDatabaseOption represents AUTOMATIC_TUNING option

type AutomaticTuningDropIndexOption

type AutomaticTuningDropIndexOption struct {
	OptionKind string // "Drop_Index"
	Value      string // "On", "Off", "Default"
}

AutomaticTuningDropIndexOption represents DROP_INDEX option

type AutomaticTuningForceLastGoodPlanOption

type AutomaticTuningForceLastGoodPlanOption struct {
	OptionKind string // "Force_Last_Good_Plan"
	Value      string // "On", "Off", "Default"
}

AutomaticTuningForceLastGoodPlanOption represents FORCE_LAST_GOOD_PLAN option

type AutomaticTuningMaintainIndexOption

type AutomaticTuningMaintainIndexOption struct {
	OptionKind string // "Maintain_Index"
	Value      string // "On", "Off", "Default"
}

AutomaticTuningMaintainIndexOption represents MAINTAIN_INDEX option

type AutomaticTuningOption

type AutomaticTuningOption interface {
	Node
	// contains filtered or unexported methods
}

AutomaticTuningOption is an interface for automatic tuning sub-options

type AvailabilityGroupAction

type AvailabilityGroupAction interface {
	// contains filtered or unexported methods
}

AvailabilityGroupAction is an interface for availability group actions

type AvailabilityGroupOption

type AvailabilityGroupOption interface {
	// contains filtered or unexported methods
}

AvailabilityGroupOption is an interface for availability group options

type AvailabilityModeReplicaOption

type AvailabilityModeReplicaOption struct {
	OptionKind string // "AvailabilityMode"
	Value      string // "SynchronousCommit", "AsynchronousCommit"
}

AvailabilityModeReplicaOption represents AVAILABILITY_MODE option

type AvailabilityReplica

type AvailabilityReplica struct {
	ServerName *StringLiteral
	Options    []AvailabilityReplicaOption
}

AvailabilityReplica represents a replica in an availability group

type AvailabilityReplicaOption

type AvailabilityReplicaOption interface {
	// contains filtered or unexported methods
}

AvailabilityReplicaOption is an interface for availability replica options

type BackupCertificateStatement

type BackupCertificateStatement struct {
	Name                 *Identifier
	File                 ScalarExpression
	PrivateKeyPath       ScalarExpression
	EncryptionPassword   ScalarExpression
	DecryptionPassword   ScalarExpression
	ActiveForBeginDialog string // "NotSet", "Active", "Inactive"
}

BackupCertificateStatement represents a BACKUP CERTIFICATE statement

type BackupDatabaseStatement

type BackupDatabaseStatement struct {
	Files           []*BackupRestoreFileInfo
	DatabaseName    *IdentifierOrValueExpression
	MirrorToClauses []*MirrorToClause
	Devices         []*DeviceInfo
	Options         []BackupOptionBase
}

BackupDatabaseStatement represents a BACKUP DATABASE statement

type BackupEncryptionOption

type BackupEncryptionOption struct {
	Algorithm  string // Aes128, Aes192, Aes256, TripleDes3Key
	Encryptor  *CryptoMechanism
	OptionKind string // typically "None"
}

BackupEncryptionOption represents an ENCRYPTION(...) backup option

type BackupMasterKeyStatement

type BackupMasterKeyStatement struct {
	File     ScalarExpression
	Password ScalarExpression
}

BackupMasterKeyStatement represents a BACKUP MASTER KEY statement

type BackupOption

type BackupOption struct {
	OptionKind string // Compression, NoCompression, StopOnError, ContinueAfterError, etc.
	Value      ScalarExpression
}

BackupOption represents a backup option

type BackupOptionBase

type BackupOptionBase interface {
	// contains filtered or unexported methods
}

BackupOptionBase is an interface for backup options

type BackupRestoreFileInfo

type BackupRestoreFileInfo struct {
	Items    []ScalarExpression
	ItemKind string // "Files", "FileGroups", "Page", "Read-Write"
}

BackupRestoreFileInfo represents file information for backup/restore

type BackupServiceMasterKeyStatement

type BackupServiceMasterKeyStatement struct {
	File     ScalarExpression
	Password ScalarExpression
}

BackupServiceMasterKeyStatement represents a BACKUP SERVICE MASTER KEY statement

type BackupTransactionLogStatement

type BackupTransactionLogStatement struct {
	DatabaseName *IdentifierOrValueExpression
	Devices      []*DeviceInfo
	Options      []BackupOptionBase
}

BackupTransactionLogStatement represents a BACKUP LOG statement

type Batch

type Batch struct {
	Statements []Statement `json:"Statements,omitempty"`
}

Batch represents a T-SQL batch of statements.

type BeginConversationTimerStatement

type BeginConversationTimerStatement struct {
	Handle  ScalarExpression `json:"Handle,omitempty"`
	Timeout ScalarExpression `json:"Timeout,omitempty"`
}

BeginConversationTimerStatement represents a BEGIN CONVERSATION TIMER statement.

type BeginDialogStatement

type BeginDialogStatement struct {
	IsConversation       bool                         `json:"IsConversation,omitempty"`
	Handle               ScalarExpression             `json:"Handle,omitempty"`
	InitiatorServiceName *IdentifierOrValueExpression `json:"InitiatorServiceName,omitempty"`
	TargetServiceName    ScalarExpression             `json:"TargetServiceName,omitempty"`
	ContractName         *IdentifierOrValueExpression `json:"ContractName,omitempty"`
	InstanceSpec         ScalarExpression             `json:"InstanceSpec,omitempty"`
	Options              []DialogOption               `json:"Options,omitempty"`
}

BeginDialogStatement represents a BEGIN DIALOG statement for SQL Server Service Broker.

type BeginEndAtomicBlockStatement

type BeginEndAtomicBlockStatement struct {
	Options       []AtomicBlockOption
	StatementList *StatementList
}

BeginEndAtomicBlockStatement represents a BEGIN ATOMIC...END block (for Hekaton/In-Memory OLTP).

type BeginEndBlockStatement

type BeginEndBlockStatement struct {
	StatementList *StatementList `json:"StatementList,omitempty"`
}

BeginEndBlockStatement represents a BEGIN...END block.

type BeginTransactionStatement

type BeginTransactionStatement struct {
	Name            *IdentifierOrValueExpression `json:"Name,omitempty"`
	Distributed     bool                         `json:"Distributed"`
	MarkDefined     bool                         `json:"MarkDefined"`
	MarkDescription ScalarExpression             `json:"MarkDescription,omitempty"`
}

BeginTransactionStatement represents a BEGIN [DISTRIBUTED] [TRAN|TRANSACTION] statement.

type BinaryExpression

type BinaryExpression struct {
	BinaryExpressionType string           `json:"BinaryExpressionType,omitempty"`
	FirstExpression      ScalarExpression `json:"FirstExpression,omitempty"`
	SecondExpression     ScalarExpression `json:"SecondExpression,omitempty"`
}

BinaryExpression represents a binary scalar expression (Add, Subtract, etc.).

type BinaryLiteral

type BinaryLiteral struct {
	LiteralType   string
	Value         string
	IsLargeObject bool
}

BinaryLiteral represents a binary literal like 0xABCD.

type BinaryQueryExpression

type BinaryQueryExpression struct {
	BinaryQueryExpressionType string          `json:"BinaryQueryExpressionType,omitempty"`
	All                       bool            `json:"All"`
	FirstQueryExpression      QueryExpression `json:"FirstQueryExpression,omitempty"`
	SecondQueryExpression     QueryExpression `json:"SecondQueryExpression,omitempty"`
	OrderByClause             *OrderByClause  `json:"OrderByClause,omitempty"`
}

BinaryQueryExpression represents UNION, EXCEPT, or INTERSECT queries.

type BooleanBinaryExpression

type BooleanBinaryExpression struct {
	BinaryExpressionType string            `json:"BinaryExpressionType,omitempty"`
	FirstExpression      BooleanExpression `json:"FirstExpression,omitempty"`
	SecondExpression     BooleanExpression `json:"SecondExpression,omitempty"`
}

BooleanBinaryExpression represents a binary boolean expression (AND, OR).

type BooleanComparisonExpression

type BooleanComparisonExpression struct {
	ComparisonType   string           `json:"ComparisonType,omitempty"`
	FirstExpression  ScalarExpression `json:"FirstExpression,omitempty"`
	SecondExpression ScalarExpression `json:"SecondExpression,omitempty"`
}

BooleanComparisonExpression represents a comparison expression.

type BooleanExpression

type BooleanExpression interface {
	Node
	// contains filtered or unexported methods
}

BooleanExpression is the interface for boolean expressions.

type BooleanInExpression

type BooleanInExpression struct {
	Expression ScalarExpression
	NotDefined bool
	Values     []ScalarExpression
	Subquery   QueryExpression
}

BooleanInExpression represents an IN expression.

type BooleanIsNullExpression

type BooleanIsNullExpression struct {
	IsNot      bool
	Expression ScalarExpression
}

BooleanIsNullExpression represents an IS NULL / IS NOT NULL expression.

type BooleanLikeExpression

type BooleanLikeExpression struct {
	FirstExpression  ScalarExpression
	SecondExpression ScalarExpression
	EscapeExpression ScalarExpression
	NotDefined       bool
	OdbcEscape       bool
}

BooleanLikeExpression represents a LIKE expression.

type BooleanNotExpression

type BooleanNotExpression struct {
	Expression BooleanExpression
}

BooleanNotExpression represents a NOT expression

type BooleanParenthesisExpression

type BooleanParenthesisExpression struct {
	Expression BooleanExpression
}

BooleanParenthesisExpression represents a parenthesized boolean expression.

type BooleanScalarPlaceholder

type BooleanScalarPlaceholder struct {
	Scalar ScalarExpression
}

BooleanScalarPlaceholder is a temporary marker used during parsing when we encounter a scalar expression in a boolean context without a comparison operator. This allows the caller to detect and handle cases like (XACT_STATE()) = -1.

type BooleanTernaryExpression

type BooleanTernaryExpression struct {
	TernaryExpressionType string // "Between", "NotBetween"
	FirstExpression       ScalarExpression
	SecondExpression      ScalarExpression
	ThirdExpression       ScalarExpression
}

BooleanTernaryExpression represents a BETWEEN expression.

type BoundingBoxParameter

type BoundingBoxParameter struct {
	Parameter string // "None", "XMin", "YMin", "XMax", "YMax"
	Value     ScalarExpression
}

BoundingBoxParameter represents a bounding box parameter (XMIN, YMIN, XMAX, YMAX)

type BoundingBoxSpatialIndexOption

type BoundingBoxSpatialIndexOption struct {
	BoundingBoxParameters []*BoundingBoxParameter
}

BoundingBoxSpatialIndexOption represents a BOUNDING_BOX option

type BreakStatement

type BreakStatement struct{}

BreakStatement represents a BREAK statement.

type BrokerPriorityParameter

type BrokerPriorityParameter struct {
	IsDefaultOrAny string                       `json:"IsDefaultOrAny,omitempty"` // None, Default, Any
	ParameterType  string                       `json:"ParameterType,omitempty"`  // PriorityLevel, ContractName, RemoteServiceName, LocalServiceName
	ParameterValue *IdentifierOrValueExpression `json:"ParameterValue,omitempty"`
}

BrokerPriorityParameter represents a parameter in a BROKER PRIORITY statement.

type BrowseForClause

type BrowseForClause struct{}

BrowseForClause represents a FOR BROWSE clause.

type BuiltInFunctionTableReference

type BuiltInFunctionTableReference struct {
	Name       *Identifier        `json:"Name,omitempty"`
	Parameters []ScalarExpression `json:"Parameters,omitempty"`
	Alias      *Identifier        `json:"Alias,omitempty"`
	Columns    []*Identifier      `json:"Columns,omitempty"`
	ForPath    bool               `json:"ForPath"`
}

BuiltInFunctionTableReference represents a built-in function used as a table source Syntax: ::function_name(parameters)

type BulkInsertOption

type BulkInsertOption interface {
	// contains filtered or unexported methods
}

BulkInsertOption is the interface for bulk insert options.

type BulkInsertOptionBase

type BulkInsertOptionBase struct {
	OptionKind string `json:"OptionKind,omitempty"`
}

BulkInsertOptionBase represents a simple bulk insert option.

type BulkInsertStatement

type BulkInsertStatement struct {
	From    *IdentifierOrValueExpression `json:"From,omitempty"`
	To      *SchemaObjectName            `json:"To,omitempty"`
	Options []BulkInsertOption           `json:"Options,omitempty"`
}

BulkInsertStatement represents a BULK INSERT statement.

type BulkOpenRowset

type BulkOpenRowset struct {
	DataFiles   []ScalarExpression            `json:"DataFiles,omitempty"`
	Options     []BulkInsertOption            `json:"Options,omitempty"`
	WithColumns []*OpenRowsetColumnDefinition `json:"WithColumns,omitempty"`
	Columns     []*Identifier                 `json:"Columns,omitempty"`
	Alias       *Identifier                   `json:"Alias,omitempty"`
	ForPath     bool                          `json:"ForPath"`
}

BulkOpenRowset represents an OPENROWSET (BULK ...) table reference.

type CallTarget

type CallTarget interface {
	// contains filtered or unexported methods
}

CallTarget represents a call target for a function call.

type CastCall

type CastCall struct {
	DataType  DataTypeReference `json:"DataType,omitempty"`
	Parameter ScalarExpression  `json:"Parameter,omitempty"`
	Collation *Identifier       `json:"Collation,omitempty"`
}

CastCall represents a CAST expression: CAST(expression AS data_type)

type CellsPerObjectSpatialIndexOption

type CellsPerObjectSpatialIndexOption struct {
	Value ScalarExpression
}

CellsPerObjectSpatialIndexOption represents a CELLS_PER_OBJECT option

type CertificateCreateLoginSource

type CertificateCreateLoginSource struct {
	Certificate *Identifier `json:"Certificate,omitempty"`
	Credential  *Identifier `json:"Credential,omitempty"`
}

CertificateCreateLoginSource represents FROM CERTIFICATE source

type CertificateOption

type CertificateOption struct {
	Kind  string         `json:"Kind,omitempty"` // "Subject", "StartDate", "ExpiryDate"
	Value *StringLiteral `json:"Value,omitempty"`
}

CertificateOption represents an option in a CREATE CERTIFICATE statement.

type ChangeRetentionChangeTrackingOptionDetail

type ChangeRetentionChangeTrackingOptionDetail struct {
	RetentionPeriod ScalarExpression
	Unit            string // "Days", "Hours", "Minutes"
}

ChangeRetentionChangeTrackingOptionDetail represents CHANGE_RETENTION option

type ChangeTableChangesTableReference

type ChangeTableChangesTableReference struct {
	Target       *SchemaObjectName `json:"Target,omitempty"`
	SinceVersion ScalarExpression  `json:"SinceVersion,omitempty"`
	ForceSeek    bool              `json:"ForceSeek"`
	Columns      []*Identifier     `json:"Columns,omitempty"`
	Alias        *Identifier       `json:"Alias,omitempty"`
	ForPath      bool              `json:"ForPath"`
}

ChangeTableChangesTableReference represents CHANGETABLE(CHANGES ...) table reference

type ChangeTableVersionTableReference

type ChangeTableVersionTableReference struct {
	Target            *SchemaObjectName  `json:"Target,omitempty"`
	PrimaryKeyColumns []*Identifier      `json:"PrimaryKeyColumns,omitempty"`
	PrimaryKeyValues  []ScalarExpression `json:"PrimaryKeyValues,omitempty"`
	ForceSeek         bool               `json:"ForceSeek"`
	Columns           []*Identifier      `json:"Columns,omitempty"`
	Alias             *Identifier        `json:"Alias,omitempty"`
	ForPath           bool               `json:"ForPath"`
}

ChangeTableVersionTableReference represents CHANGETABLE(VERSION ...) table reference

type ChangeTrackingDatabaseOption

type ChangeTrackingDatabaseOption struct {
	OptionKind  string                       // "ChangeTracking"
	OptionState string                       // "On", "Off", "NotSet"
	Details     []ChangeTrackingOptionDetail // AUTO_CLEANUP, CHANGE_RETENTION
}

ChangeTrackingDatabaseOption represents the CHANGE_TRACKING database option

type ChangeTrackingFullTextIndexOption

type ChangeTrackingFullTextIndexOption struct {
	Value      string `json:"Value,omitempty"`      // "Auto", "Manual", "Off", "OffNoPopulation"
	OptionKind string `json:"OptionKind,omitempty"` // "ChangeTracking"
}

ChangeTrackingFullTextIndexOption represents a CHANGE_TRACKING option for fulltext index

type ChangeTrackingOptionDetail

type ChangeTrackingOptionDetail interface {
	Node
	// contains filtered or unexported methods
}

ChangeTrackingOptionDetail is an interface for change tracking option details

type CharacterSetPayloadOption

type CharacterSetPayloadOption struct {
	IsSql bool   `json:"IsSql"`
	Kind  string `json:"Kind,omitempty"` // CharacterSet
}

CharacterSetPayloadOption represents a CHARACTER_SET payload option for SOAP.

type CheckConstraintDefinition

type CheckConstraintDefinition struct {
	ConstraintIdentifier *Identifier
	CheckCondition       BooleanExpression
	NotForReplication    bool
}

CheckConstraintDefinition represents a CHECK constraint

type CheckpointStatement

type CheckpointStatement struct {
	Duration ScalarExpression `json:"Duration,omitempty"`
}

type ClassifierEndTimeOption

type ClassifierEndTimeOption struct {
	Time       *WlmTimeLiteral
	OptionType string
}

ClassifierEndTimeOption represents the END_TIME option.

type ClassifierImportanceOption

type ClassifierImportanceOption struct {
	Importance string
	OptionType string
}

ClassifierImportanceOption represents the IMPORTANCE option.

type ClassifierMemberNameOption

type ClassifierMemberNameOption struct {
	MemberName *StringLiteral
	OptionType string
}

ClassifierMemberNameOption represents the MEMBERNAME option.

type ClassifierStartTimeOption

type ClassifierStartTimeOption struct {
	Time       *WlmTimeLiteral
	OptionType string
}

ClassifierStartTimeOption represents the START_TIME option.

type ClassifierWlmContextOption

type ClassifierWlmContextOption struct {
	WlmContext *StringLiteral
	OptionType string
}

ClassifierWlmContextOption represents the WLM_CONTEXT option.

type ClassifierWlmLabelOption

type ClassifierWlmLabelOption struct {
	WlmLabel   *StringLiteral
	OptionType string
}

ClassifierWlmLabelOption represents the WLM_LABEL option.

type ClassifierWorkloadGroupOption

type ClassifierWorkloadGroupOption struct {
	WorkloadGroupName *StringLiteral
	OptionType        string
}

ClassifierWorkloadGroupOption represents the WORKLOAD_GROUP option.

type CloseCursorStatement

type CloseCursorStatement struct {
	Cursor *CursorId `json:"Cursor,omitempty"`
}

CloseCursorStatement represents CLOSE cursor_name.

type CloseMasterKeyStatement

type CloseMasterKeyStatement struct{}

CloseMasterKeyStatement represents CLOSE MASTER KEY statement

type CloseSymmetricKeyStatement

type CloseSymmetricKeyStatement struct {
	Name *Identifier
	All  bool
}

CloseSymmetricKeyStatement represents CLOSE SYMMETRIC KEY statement

type CoalesceExpression

type CoalesceExpression struct {
	Expressions []ScalarExpression
}

CoalesceExpression represents a COALESCE(expr1, expr2, ...) expression.

type ColumnDefinition

type ColumnDefinition struct {
	ColumnIdentifier         *Identifier
	DataType                 DataTypeReference
	ComputedColumnExpression ScalarExpression
	Collation                *Identifier
	DefaultConstraint        *DefaultConstraintDefinition
	IdentityOptions          *IdentityOptions
	Constraints              []ConstraintDefinition
	Index                    *IndexDefinition
	GeneratedAlways          string // RowStart, RowEnd, etc.
	IsPersisted              bool
	IsRowGuidCol             bool
	IsHidden                 bool
	IsMasked                 bool
	MaskingFunction          ScalarExpression
	Encryption               *ColumnEncryptionDefinition
	Nullable                 *NullableConstraintDefinition
	StorageOptions           *ColumnStorageOptions
}

ColumnDefinition represents a column definition in CREATE TABLE

type ColumnDefinitionBase

type ColumnDefinitionBase struct {
	ColumnIdentifier *Identifier       `json:"ColumnIdentifier,omitempty"`
	DataType         DataTypeReference `json:"DataType,omitempty"`
	Collation        *Identifier       `json:"Collation,omitempty"`
}

ColumnDefinitionBase represents a basic column definition.

type ColumnEncryptionAlgorithmNameParameter

type ColumnEncryptionAlgorithmNameParameter struct {
	Algorithm     ScalarExpression
	ParameterKind string // "EncryptionAlgorithmName"
}

ColumnEncryptionAlgorithmNameParameter represents ALGORITHM parameter in CEK

type ColumnEncryptionAlgorithmParameter

type ColumnEncryptionAlgorithmParameter struct {
	EncryptionAlgorithm ScalarExpression // StringLiteral
	ParameterKind       string           // "Algorithm"
}

ColumnEncryptionAlgorithmParameter represents ALGORITHM = 'algorithm_name'

type ColumnEncryptionDefinition

type ColumnEncryptionDefinition struct {
	Parameters []ColumnEncryptionParameter
}

ColumnEncryptionDefinition represents the ENCRYPTED WITH specification

type ColumnEncryptionKeyNameParameter

type ColumnEncryptionKeyNameParameter struct {
	Name          *Identifier
	ParameterKind string // "ColumnEncryptionKey"
}

ColumnEncryptionKeyNameParameter represents COLUMN_ENCRYPTION_KEY = key_name

type ColumnEncryptionKeyValue

type ColumnEncryptionKeyValue struct {
	Parameters []ColumnEncryptionKeyValueParameter
}

ColumnEncryptionKeyValue represents a value in CREATE/ALTER COLUMN ENCRYPTION KEY

type ColumnEncryptionKeyValueParameter

type ColumnEncryptionKeyValueParameter interface {
	// contains filtered or unexported methods
}

ColumnEncryptionKeyValueParameter represents a parameter in column encryption key values

type ColumnEncryptionParameter

type ColumnEncryptionParameter interface {
	// contains filtered or unexported methods
}

ColumnEncryptionParameter is an interface for encryption parameters

type ColumnEncryptionTypeParameter

type ColumnEncryptionTypeParameter struct {
	EncryptionType string // "Deterministic", "Randomized"
	ParameterKind  string // "EncryptionType"
}

ColumnEncryptionTypeParameter represents ENCRYPTION_TYPE = DETERMINISTIC|RANDOMIZED

type ColumnMasterKeyEnclaveComputationsParameter

type ColumnMasterKeyEnclaveComputationsParameter struct {
	Signature     ScalarExpression
	ParameterKind string
}

ColumnMasterKeyEnclaveComputationsParameter represents ENCLAVE_COMPUTATIONS parameter.

type ColumnMasterKeyNameParameter

type ColumnMasterKeyNameParameter struct {
	Name          *Identifier
	ParameterKind string // "ColumnMasterKeyName"
}

ColumnMasterKeyNameParameter represents COLUMN_MASTER_KEY parameter in CEK

type ColumnMasterKeyParameter

type ColumnMasterKeyParameter interface {
	Node
	// contains filtered or unexported methods
}

ColumnMasterKeyParameter is an interface for column master key parameters.

type ColumnMasterKeyPathParameter

type ColumnMasterKeyPathParameter struct {
	Path          ScalarExpression
	ParameterKind string
}

ColumnMasterKeyPathParameter represents KEY_PATH parameter.

type ColumnMasterKeyStoreProviderNameParameter

type ColumnMasterKeyStoreProviderNameParameter struct {
	Name          ScalarExpression
	ParameterKind string
}

ColumnMasterKeyStoreProviderNameParameter represents KEY_STORE_PROVIDER_NAME parameter.

type ColumnReferenceExpression

type ColumnReferenceExpression struct {
	ColumnType          string               `json:"ColumnType,omitempty"`
	MultiPartIdentifier *MultiPartIdentifier `json:"MultiPartIdentifier,omitempty"`
	Collation           *Identifier          `json:"Collation,omitempty"`
}

ColumnReferenceExpression represents a column reference.

type ColumnStorageOptions

type ColumnStorageOptions struct {
	IsFileStream bool   // true if FILESTREAM specified
	SparseOption string // "None", "Sparse", "ColumnSetForAllSparseColumns"
}

ColumnStorageOptions represents storage options for a column (SPARSE, FILESTREAM)

type ColumnWithSortOrder

type ColumnWithSortOrder struct {
	Column    *ColumnReferenceExpression
	SortOrder SortOrder
}

ColumnWithSortOrder represents a column with optional sort order

type CommitTransactionStatement

type CommitTransactionStatement struct {
	Name                    *IdentifierOrValueExpression `json:"Name,omitempty"`
	DelayedDurabilityOption string                       `json:"DelayedDurabilityOption,omitempty"`
}

CommitTransactionStatement represents a COMMIT [TRAN|TRANSACTION] statement.

type CommonTableExpression

type CommonTableExpression struct {
	ExpressionName  *Identifier     `json:"ExpressionName,omitempty"`
	Columns         []*Identifier   `json:"Columns,omitempty"`
	QueryExpression QueryExpression `json:"QueryExpression,omitempty"`
}

CommonTableExpression represents a single CTE definition.

type CompositeGroupingSpecification

type CompositeGroupingSpecification struct {
	Items []GroupingSpecification `json:"Items,omitempty"`
}

CompositeGroupingSpecification represents a parenthesized group of columns like (c2, c3).

type CompressionDelayIndexOption

type CompressionDelayIndexOption struct {
	Expression ScalarExpression
	TimeUnit   string // "Unitless", "Minute", "Minutes"
	OptionKind string // "CompressionDelay"
}

CompressionDelayIndexOption represents a COMPRESSION_DELAY option

type CompressionEndpointProtocolOption

type CompressionEndpointProtocolOption struct {
	IsEnabled bool   `json:"IsEnabled"`
	Kind      string `json:"Kind,omitempty"` // HttpCompression
}

CompressionEndpointProtocolOption represents HTTP compression option.

type CompressionPartitionRange

type CompressionPartitionRange struct {
	From ScalarExpression `json:"From,omitempty"`
	To   ScalarExpression `json:"To,omitempty"`
}

type ConstraintDefinition

type ConstraintDefinition interface {
	Node
	// contains filtered or unexported methods
}

ConstraintDefinition is an interface for constraint definitions

type ContainmentDatabaseOption

type ContainmentDatabaseOption struct {
	Value      string // "None" or "Partial"
	OptionKind string // Always "Containment"
}

ContainmentDatabaseOption represents CONTAINMENT = NONE/PARTIAL

type ContinueStatement

type ContinueStatement struct{}

ContinueStatement represents a CONTINUE statement.

type ContractMessage

type ContractMessage struct {
	Name   *Identifier
	SentBy string // "Initiator", "Target", "Any"
}

ContractMessage represents a message in a contract

type ConvertCall

type ConvertCall struct {
	DataType  DataTypeReference `json:"DataType,omitempty"`
	Parameter ScalarExpression  `json:"Parameter,omitempty"`
	Style     ScalarExpression  `json:"Style,omitempty"`
	Collation *Identifier       `json:"Collation,omitempty"`
}

ConvertCall represents a CONVERT expression: CONVERT(data_type, expression [, style])

type CopyColumnOption

type CopyColumnOption struct {
	ColumnName   *Identifier      `json:"ColumnName,omitempty"`
	DefaultValue ScalarExpression `json:"DefaultValue,omitempty"`
	FieldNumber  ScalarExpression `json:"FieldNumber,omitempty"`
}

CopyColumnOption represents a column option with name, default value, and ordinal

type CopyCredentialOption

type CopyCredentialOption struct {
	Identity ScalarExpression `json:"Identity,omitempty"`
	Secret   ScalarExpression `json:"Secret,omitempty"`
}

CopyCredentialOption represents a credential option with Identity and optional Secret

type CopyOption

type CopyOption struct {
	Kind  string          `json:"Kind,omitempty"`
	Value CopyOptionValue `json:"Value,omitempty"`
}

CopyOption represents an option in COPY INTO

type CopyOptionValue

type CopyOptionValue interface {
	// contains filtered or unexported methods
}

CopyOptionValue is an interface for COPY option values

type CopyStatement

type CopyStatement struct {
	Into    *SchemaObjectName  `json:"Into,omitempty"`
	From    []ScalarExpression `json:"From,omitempty"`
	Options []*CopyOption      `json:"Options,omitempty"`
}

CopyStatement represents a COPY INTO statement for Azure Synapse Analytics

type CreateAggregateStatement

type CreateAggregateStatement struct {
	Name         *SchemaObjectName
	Parameters   []*ProcedureParameter
	ReturnType   DataTypeReference
	AssemblyName *AssemblyName
}

CreateAggregateStatement represents a CREATE AGGREGATE statement

type CreateApplicationRoleStatement

type CreateApplicationRoleStatement struct {
	Name                   *Identifier              `json:"Name,omitempty"`
	ApplicationRoleOptions []*ApplicationRoleOption `json:"ApplicationRoleOptions,omitempty"`
}

CreateApplicationRoleStatement represents a CREATE APPLICATION ROLE statement.

type CreateAssemblyStatement

type CreateAssemblyStatement struct {
	Name       *Identifier          `json:"Name,omitempty"`
	Owner      *Identifier          `json:"Owner,omitempty"`
	Parameters []ScalarExpression   `json:"Parameters,omitempty"`
	Options    []AssemblyOptionBase `json:"Options,omitempty"`
}

CreateAssemblyStatement represents a CREATE ASSEMBLY statement.

type CreateAsymmetricKeyStatement

type CreateAsymmetricKeyStatement struct {
	Name                *Identifier      `json:"Name,omitempty"`
	KeySource           EncryptionSource `json:"KeySource,omitempty"`
	EncryptionAlgorithm string           `json:"EncryptionAlgorithm,omitempty"`
	Owner               *Identifier      `json:"Owner,omitempty"`
	Password            ScalarExpression `json:"Password,omitempty"`
}

CreateAsymmetricKeyStatement represents a CREATE ASYMMETRIC KEY statement.

type CreateAvailabilityGroupStatement

type CreateAvailabilityGroupStatement struct {
	Name      *Identifier
	Options   []AvailabilityGroupOption
	Databases []*Identifier
	Replicas  []*AvailabilityReplica
}

CreateAvailabilityGroupStatement represents a CREATE AVAILABILITY GROUP statement

type CreateBrokerPriorityStatement

type CreateBrokerPriorityStatement struct {
	Name                     *Identifier                `json:"Name,omitempty"`
	BrokerPriorityParameters []*BrokerPriorityParameter `json:"BrokerPriorityParameters,omitempty"`
}

CreateBrokerPriorityStatement represents CREATE BROKER PRIORITY statement.

type CreateCertificateStatement

type CreateCertificateStatement struct {
	Name                 *Identifier          `json:"Name,omitempty"`
	Owner                *Identifier          `json:"Owner,omitempty"`
	CertificateSource    EncryptionSource     `json:"CertificateSource,omitempty"`
	ActiveForBeginDialog string               `json:"ActiveForBeginDialog,omitempty"` // "On", "Off", "NotSet"
	PrivateKeyPath       *StringLiteral       `json:"PrivateKeyPath,omitempty"`
	EncryptionPassword   *StringLiteral       `json:"EncryptionPassword,omitempty"`
	DecryptionPassword   *StringLiteral       `json:"DecryptionPassword,omitempty"`
	CertificateOptions   []*CertificateOption `json:"CertificateOptions,omitempty"`
}

CreateCertificateStatement represents a CREATE CERTIFICATE statement.

type CreateColumnEncryptionKeyStatement

type CreateColumnEncryptionKeyStatement struct {
	Name                      *Identifier
	ColumnEncryptionKeyValues []*ColumnEncryptionKeyValue
}

CreateColumnEncryptionKeyStatement represents CREATE COLUMN ENCRYPTION KEY statement

type CreateColumnMasterKeyStatement

type CreateColumnMasterKeyStatement struct {
	Name       *Identifier
	Parameters []ColumnMasterKeyParameter
}

CreateColumnMasterKeyStatement represents a CREATE COLUMN MASTER KEY statement.

type CreateColumnStoreIndexStatement

type CreateColumnStoreIndexStatement struct {
	Name                         *Identifier
	Clustered                    bool
	ClusteredExplicit            bool // true if CLUSTERED or NONCLUSTERED was explicitly specified
	OnName                       *SchemaObjectName
	Columns                      []*ColumnReferenceExpression
	OrderedColumns               []*ColumnReferenceExpression
	IndexOptions                 []IndexOption
	FilterClause                 BooleanExpression
	OnPartition                  *PartitionSpecifier
	OnFileGroupOrPartitionScheme *FileGroupOrPartitionScheme
}

CreateColumnStoreIndexStatement represents a CREATE COLUMNSTORE INDEX statement

type CreateContractStatement

type CreateContractStatement struct {
	Name     *Identifier
	Messages []*ContractMessage
}

CreateContractStatement represents CREATE CONTRACT statement

type CreateCredentialStatement

type CreateCredentialStatement struct {
	Name                      *Identifier
	Identity                  ScalarExpression
	Secret                    ScalarExpression
	IsDatabaseScoped          bool
	CryptographicProviderName *Identifier
}

CreateCredentialStatement represents a CREATE CREDENTIAL statement.

type CreateCryptographicProviderStatement

type CreateCryptographicProviderStatement struct {
	Name *Identifier
	File ScalarExpression
}

CreateCryptographicProviderStatement represents CREATE CRYPTOGRAPHIC PROVIDER statement

type CreateDatabaseAuditSpecificationStatement

type CreateDatabaseAuditSpecificationStatement struct {
	SpecificationName *Identifier
	AuditName         *Identifier
	Parts             []*AuditSpecificationPart
	AuditState        string // NotSet, On, Off
}

CreateDatabaseAuditSpecificationStatement represents a CREATE DATABASE AUDIT SPECIFICATION statement

type CreateDatabaseEncryptionKeyStatement

type CreateDatabaseEncryptionKeyStatement struct {
	Algorithm string           `json:"Algorithm,omitempty"`
	Encryptor *CryptoMechanism `json:"Encryptor,omitempty"`
}

CreateDatabaseEncryptionKeyStatement represents a CREATE DATABASE ENCRYPTION KEY statement.

type CreateDatabaseOption

type CreateDatabaseOption interface {
	// contains filtered or unexported methods
}

CreateDatabaseOption is an interface for CREATE DATABASE options (can be DatabaseOption)

type CreateDatabaseStatement

type CreateDatabaseStatement struct {
	DatabaseName     *Identifier                `json:"DatabaseName,omitempty"`
	Options          []CreateDatabaseOption     `json:"Options,omitempty"`
	AttachMode       string                     `json:"AttachMode,omitempty"` // "None", "Attach", "AttachRebuildLog", "AttachForceRebuildLog"
	CopyOf           *MultiPartIdentifier       `json:"CopyOf,omitempty"`     // For AS COPY OF syntax
	FileGroups       []*FileGroupDefinition     `json:"FileGroups,omitempty"`
	LogOn            []*FileDeclaration         `json:"LogOn,omitempty"`
	Collation        *Identifier                `json:"Collation,omitempty"`
	Containment      *ContainmentDatabaseOption `json:"Containment,omitempty"`
	DatabaseSnapshot *Identifier                `json:"DatabaseSnapshot,omitempty"` // For AS SNAPSHOT OF syntax
}

CreateDatabaseStatement represents a CREATE DATABASE statement.

type CreateDefaultStatement

type CreateDefaultStatement struct {
	Name       *SchemaObjectName `json:"Name"`
	Expression ScalarExpression  `json:"Expression"`
}

CreateDefaultStatement represents a CREATE DEFAULT statement.

type CreateEndpointStatement

type CreateEndpointStatement struct {
	Owner           *Identifier
	Name            *Identifier
	State           string
	Affinity        *EndpointAffinity
	Protocol        string
	ProtocolOptions []EndpointProtocolOption
	EndpointType    string
	PayloadOptions  []PayloadOption
}

CreateEndpointStatement represents a CREATE ENDPOINT statement.

type CreateEventNotificationStatement

type CreateEventNotificationStatement struct {
	Name                    *Identifier                   `json:"Name,omitempty"`
	Scope                   *EventNotificationObjectScope `json:"Scope,omitempty"`
	WithFanIn               bool                          `json:"WithFanIn,omitempty"`
	EventTypeGroups         []EventTypeGroupContainer     `json:"EventTypeGroups,omitempty"`
	BrokerService           *StringLiteral                `json:"BrokerService,omitempty"`
	BrokerInstanceSpecifier *StringLiteral                `json:"BrokerInstanceSpecifier,omitempty"`
}

CreateEventNotificationStatement represents a CREATE EVENT NOTIFICATION statement.

type CreateEventSessionStatement

type CreateEventSessionStatement struct {
	Name               *Identifier
	SessionScope       string // "Server" or "Database"
	EventDeclarations  []*EventDeclaration
	TargetDeclarations []*TargetDeclaration
	SessionOptions     []SessionOption
}

CreateEventSessionStatement represents CREATE EVENT SESSION statement

type CreateExternalDataSourceStatement

type CreateExternalDataSourceStatement struct {
	Name                      *Identifier
	DataSourceType            string // HADOOP, RDBMS, SHARD_MAP_MANAGER, BLOB_STORAGE, EXTERNAL_GENERICS
	Location                  *StringLiteral
	ExternalDataSourceOptions []*ExternalDataSourceLiteralOrIdentifierOption
}

CreateExternalDataSourceStatement represents CREATE EXTERNAL DATA SOURCE statement

type CreateExternalFileFormatStatement

type CreateExternalFileFormatStatement struct {
	Name                      *Identifier
	FormatType                string
	ExternalFileFormatOptions []ExternalFileFormatOption
}

CreateExternalFileFormatStatement represents CREATE EXTERNAL FILE FORMAT statement

type CreateExternalLanguageStatement

type CreateExternalLanguageStatement struct {
	Name                  *Identifier
	Owner                 *Identifier
	ExternalLanguageFiles []*ExternalLanguageFileOption
}

CreateExternalLanguageStatement represents CREATE EXTERNAL LANGUAGE statement

type CreateExternalLibraryStatement

type CreateExternalLibraryStatement struct {
	Name                 *Identifier
	Owner                *Identifier
	Language             ScalarExpression
	ExternalLibraryFiles []*ExternalLibraryFileOption
}

CreateExternalLibraryStatement represents CREATE EXTERNAL LIBRARY statement

type CreateExternalResourcePoolStatement

type CreateExternalResourcePoolStatement struct {
	Name                           *Identifier                      `json:"Name,omitempty"`
	ExternalResourcePoolParameters []*ExternalResourcePoolParameter `json:"ExternalResourcePoolParameters,omitempty"`
}

CreateExternalResourcePoolStatement represents a CREATE EXTERNAL RESOURCE POOL statement

type CreateExternalTableStatement

type CreateExternalTableStatement struct {
	SchemaObjectName     *SchemaObjectName
	ColumnDefinitions    []*ExternalTableColumnDefinition
	DataSource           *Identifier
	ExternalTableOptions []ExternalTableOptionItem
	SelectStatement      *SelectStatement // For CTAS (CREATE TABLE AS SELECT)
}

CreateExternalTableStatement represents CREATE EXTERNAL TABLE statement

type CreateFederationStatement

type CreateFederationStatement struct {
	Name             *Identifier
	DistributionName *Identifier
	DataType         DataTypeReference
}

CreateFederationStatement represents CREATE FEDERATION statement

type CreateFullTextCatalogStatement

type CreateFullTextCatalogStatement struct {
	Name      *Identifier                   `json:"Name,omitempty"`
	FileGroup *Identifier                   `json:"FileGroup,omitempty"`
	Path      ScalarExpression              `json:"Path,omitempty"`
	Owner     *Identifier                   `json:"Owner,omitempty"`
	Options   []*OnOffFullTextCatalogOption `json:"Options,omitempty"`
	IsDefault bool                          `json:"IsDefault"`
}

CreateFullTextCatalogStatement represents a CREATE FULLTEXT CATALOG statement.

type CreateFullTextStopListStatement

type CreateFullTextStopListStatement struct {
	Name               *Identifier `json:"Name,omitempty"`
	IsSystemStopList   bool        `json:"IsSystemStopList"`
	DatabaseName       *Identifier `json:"DatabaseName,omitempty"`
	SourceStopListName *Identifier `json:"SourceStopListName,omitempty"`
	Owner              *Identifier `json:"Owner,omitempty"`
}

CreateFullTextStopListStatement represents CREATE FULLTEXT STOPLIST statement

type CreateFulltextCatalogStatement

type CreateFulltextCatalogStatement struct {
	Name *Identifier `json:"Name,omitempty"`
}

CreateFulltextCatalogStatement represents a CREATE FULLTEXT CATALOG statement.

type CreateFulltextIndexStatement

type CreateFulltextIndexStatement struct {
	OnName               *SchemaObjectName            `json:"OnName,omitempty"`
	FullTextIndexColumns []*FullTextIndexColumn       `json:"FullTextIndexColumns,omitempty"`
	KeyIndexName         *Identifier                  `json:"KeyIndexName,omitempty"`
	CatalogAndFileGroup  *FullTextCatalogAndFileGroup `json:"CatalogAndFileGroup,omitempty"`
	Options              []FullTextIndexOption        `json:"Options,omitempty"`
}

CreateFulltextIndexStatement represents a CREATE FULLTEXT INDEX statement.

type CreateFunctionStatement

type CreateFunctionStatement struct {
	Name            *SchemaObjectName
	Parameters      []*ProcedureParameter
	ReturnType      FunctionReturnType
	Options         []FunctionOptionBase
	StatementList   *StatementList
	OrderHint       *OrderBulkInsertOption // For CLR table-valued functions
	MethodSpecifier *MethodSpecifier       // For CLR functions (AS EXTERNAL NAME)
}

CreateFunctionStatement represents a CREATE FUNCTION statement

type CreateIndexStatement

type CreateIndexStatement struct {
	Name                         *Identifier                  `json:"Name,omitempty"`
	OnName                       *SchemaObjectName            `json:"OnName,omitempty"`
	Translated80SyntaxTo90       bool                         `json:"Translated80SyntaxTo90,omitempty"`
	Unique                       bool                         `json:"Unique,omitempty"`
	Clustered                    *bool                        `json:"Clustered,omitempty"` // nil = not specified, true = CLUSTERED, false = NONCLUSTERED
	Columns                      []*ColumnWithSortOrder       `json:"Columns,omitempty"`
	IncludeColumns               []*ColumnReferenceExpression `json:"IncludeColumns,omitempty"`
	FilterPredicate              BooleanExpression            `json:"FilterPredicate,omitempty"`
	IndexOptions                 []IndexOption                `json:"IndexOptions,omitempty"`
	OnFileGroupOrPartitionScheme *FileGroupOrPartitionScheme  `json:"OnFileGroupOrPartitionScheme,omitempty"`
	FileStreamOn                 *IdentifierOrValueExpression `json:"FileStreamOn,omitempty"`
}

CreateIndexStatement represents a CREATE INDEX statement.

type CreateLoginSource

type CreateLoginSource interface {
	// contains filtered or unexported methods
}

CreateLoginSource is an interface for login sources

type CreateLoginStatement

type CreateLoginStatement struct {
	Name   *Identifier       `json:"Name,omitempty"`
	Source CreateLoginSource `json:"Source,omitempty"`
}

CreateLoginStatement represents a CREATE LOGIN statement.

type CreateMasterKeyStatement

type CreateMasterKeyStatement struct {
	Password ScalarExpression `json:"Password"`
}

CreateMasterKeyStatement represents a CREATE MASTER KEY ENCRYPTION BY PASSWORD statement.

type CreateMessageTypeStatement

type CreateMessageTypeStatement struct {
	Name                    *Identifier       `json:"Name,omitempty"`
	Owner                   *Identifier       `json:"Owner,omitempty"`
	ValidationMethod        string            `json:"ValidationMethod,omitempty"`
	XmlSchemaCollectionName *SchemaObjectName `json:"XmlSchemaCollectionName,omitempty"`
}

CreateMessageTypeStatement represents a CREATE MESSAGE TYPE statement.

type CreateOrAlterFunctionStatement

type CreateOrAlterFunctionStatement struct {
	Name          *SchemaObjectName
	Parameters    []*ProcedureParameter
	ReturnType    FunctionReturnType
	Options       []FunctionOptionBase
	StatementList *StatementList
}

CreateOrAlterFunctionStatement represents a CREATE OR ALTER FUNCTION statement

type CreateOrAlterProcedureStatement

type CreateOrAlterProcedureStatement struct {
	ProcedureReference *ProcedureReference
	Parameters         []*ProcedureParameter
	StatementList      *StatementList
	IsForReplication   bool
	Options            []ProcedureOptionBase
	MethodSpecifier    *MethodSpecifier
}

CreateOrAlterProcedureStatement represents a CREATE OR ALTER PROCEDURE statement.

type CreateOrAlterTriggerStatement

type CreateOrAlterTriggerStatement struct {
	Name                *SchemaObjectName
	TriggerObject       *TriggerObject
	TriggerType         string // "For", "After", "InsteadOf"
	TriggerActions      []*TriggerAction
	Options             []TriggerOptionType
	WithAppend          bool
	IsNotForReplication bool
	MethodSpecifier     *MethodSpecifier
	StatementList       *StatementList
}

CreateOrAlterTriggerStatement represents a CREATE OR ALTER TRIGGER statement

type CreateOrAlterViewStatement

type CreateOrAlterViewStatement struct {
	SchemaObjectName *SchemaObjectName `json:"SchemaObjectName,omitempty"`
	Columns          []*Identifier     `json:"Columns,omitempty"`
	SelectStatement  *SelectStatement  `json:"SelectStatement,omitempty"`
	WithCheckOption  bool              `json:"WithCheckOption"`
	ViewOptions      []ViewOption      `json:"ViewOptions,omitempty"`
	IsMaterialized   bool              `json:"IsMaterialized"`
}

CreateOrAlterViewStatement represents a CREATE OR ALTER VIEW statement.

type CreatePartitionFunctionStatement

type CreatePartitionFunctionStatement struct {
	Name           *Identifier             `json:"Name,omitempty"`
	ParameterType  *PartitionParameterType `json:"ParameterType,omitempty"`
	Range          string                  `json:"Range,omitempty"` // "Left" or "Right"
	BoundaryValues []ScalarExpression      `json:"BoundaryValues,omitempty"`
}

CreatePartitionFunctionStatement represents a CREATE PARTITION FUNCTION statement.

type CreatePartitionSchemeStatement

type CreatePartitionSchemeStatement struct {
	Name              *Identifier
	PartitionFunction *Identifier
	IsAll             bool
	FileGroups        []*IdentifierOrValueExpression
}

CreatePartitionSchemeStatement represents CREATE PARTITION SCHEME statement

type CreateProcedureStatement

type CreateProcedureStatement struct {
	ProcedureReference *ProcedureReference
	Parameters         []*ProcedureParameter
	StatementList      *StatementList
	IsForReplication   bool
	Options            []ProcedureOptionBase
	MethodSpecifier    *MethodSpecifier
}

CreateProcedureStatement represents a CREATE PROCEDURE statement.

type CreateQueueStatement

type CreateQueueStatement struct {
	Name         *SchemaObjectName            `json:"Name,omitempty"`
	OnFileGroup  *IdentifierOrValueExpression `json:"OnFileGroup,omitempty"`
	QueueOptions []QueueOption                `json:"QueueOptions,omitempty"`
}

CreateQueueStatement represents a CREATE QUEUE statement.

type CreateRemoteServiceBindingStatement

type CreateRemoteServiceBindingStatement struct {
	Name    *Identifier                  `json:"Name,omitempty"`
	Service ScalarExpression             `json:"Service,omitempty"`
	Options []RemoteServiceBindingOption `json:"Options,omitempty"`
}

CreateRemoteServiceBindingStatement represents a CREATE REMOTE SERVICE BINDING statement.

type CreateResourcePoolStatement

type CreateResourcePoolStatement struct {
	Name                   *Identifier              `json:"Name,omitempty"`
	ResourcePoolParameters []*ResourcePoolParameter `json:"ResourcePoolParameters,omitempty"`
}

CreateResourcePoolStatement represents a CREATE RESOURCE POOL statement

type CreateRoleStatement

type CreateRoleStatement struct {
	Name  *Identifier
	Owner *Identifier // via AUTHORIZATION
}

CreateRoleStatement represents a CREATE ROLE statement

type CreateRouteStatement

type CreateRouteStatement struct {
	Name         *Identifier    `json:"Name,omitempty"`
	Owner        *Identifier    `json:"Owner,omitempty"`
	RouteOptions []*RouteOption `json:"RouteOptions,omitempty"`
}

CreateRouteStatement represents a CREATE ROUTE statement.

type CreateRuleStatement

type CreateRuleStatement struct {
	Name       *SchemaObjectName
	Expression BooleanExpression
}

CreateRuleStatement represents CREATE RULE.

type CreateSchemaStatement

type CreateSchemaStatement struct {
	Name          *Identifier    `json:"Name,omitempty"`
	Owner         *Identifier    `json:"Owner,omitempty"`
	StatementList *StatementList `json:"StatementList,omitempty"`
}

CreateSchemaStatement represents a CREATE SCHEMA statement.

type CreateSearchPropertyListStatement

type CreateSearchPropertyListStatement struct {
	Name                     *Identifier
	SourceSearchPropertyList *MultiPartIdentifier
	Owner                    *Identifier
}

CreateSearchPropertyListStatement represents CREATE SEARCH PROPERTY LIST.

type CreateSecurityPolicyStatement

type CreateSecurityPolicyStatement struct {
	Name                     *SchemaObjectName
	NotForReplication        bool
	SecurityPolicyOptions    []*SecurityPolicyOption
	SecurityPredicateActions []*SecurityPredicateAction
	ActionType               string // "Create"
}

CreateSecurityPolicyStatement represents CREATE SECURITY POLICY

type CreateSelectiveXmlIndexStatement

type CreateSelectiveXmlIndexStatement struct {
	Name              *Identifier
	OnName            *SchemaObjectName
	XmlColumn         *Identifier
	IsSecondary       bool
	UsingXmlIndexName *Identifier // For secondary indexes
	PathName          *Identifier // For secondary indexes
	PromotedPaths     []*SelectiveXmlIndexPromotedPath
	XmlNamespaces     *XmlNamespaces
	IndexOptions      []IndexOption
}

CreateSelectiveXmlIndexStatement represents CREATE SELECTIVE XML INDEX statement

type CreateSequenceStatement

type CreateSequenceStatement struct {
	Name            *SchemaObjectName
	SequenceOptions []interface{} // Can be SequenceOption or ScalarExpressionSequenceOption
}

CreateSequenceStatement represents a CREATE SEQUENCE statement.

type CreateServerAuditSpecificationStatement

type CreateServerAuditSpecificationStatement struct {
	SpecificationName *Identifier
	AuditName         *Identifier
	Parts             []*AuditSpecificationPart
	AuditState        string // NotSet, On, Off
}

CreateServerAuditSpecificationStatement represents a CREATE SERVER AUDIT SPECIFICATION statement

type CreateServerAuditStatement

type CreateServerAuditStatement struct {
	AuditName           *Identifier
	AuditTarget         *AuditTarget
	Options             []AuditOption
	PredicateExpression BooleanExpression
}

CreateServerAuditStatement represents a CREATE SERVER AUDIT statement

type CreateServerRoleStatement

type CreateServerRoleStatement struct {
	Name  *Identifier
	Owner *Identifier // via AUTHORIZATION
}

CreateServerRoleStatement represents a CREATE SERVER ROLE statement.

type CreateServiceStatement

type CreateServiceStatement struct {
	Owner            *Identifier        `json:"Owner,omitempty"`
	Name             *Identifier        `json:"Name,omitempty"`
	QueueName        *SchemaObjectName  `json:"QueueName,omitempty"`
	ServiceContracts []*ServiceContract `json:"ServiceContracts,omitempty"`
}

CreateServiceStatement represents a CREATE SERVICE statement.

type CreateSpatialIndexStatement

type CreateSpatialIndexStatement struct {
	Name                  *Identifier
	Object                *SchemaObjectName
	SpatialColumnName     *Identifier
	SpatialIndexingScheme string // "None", "GeometryGrid", "GeographyGrid", "GeometryAutoGrid", "GeographyAutoGrid"
	OnFileGroup           *IdentifierOrValueExpression
	SpatialIndexOptions   []SpatialIndexOption
}

CreateSpatialIndexStatement represents a CREATE SPATIAL INDEX statement

type CreateStatisticsStatement

type CreateStatisticsStatement struct {
	Name              *Identifier                  `json:"Name,omitempty"`
	OnName            *SchemaObjectName            `json:"OnName,omitempty"`
	Columns           []*ColumnReferenceExpression `json:"Columns,omitempty"`
	StatisticsOptions []StatisticsOption           `json:"StatisticsOptions,omitempty"`
	FilterPredicate   BooleanExpression            `json:"FilterPredicate,omitempty"`
}

CreateStatisticsStatement represents a CREATE STATISTICS statement.

type CreateSymmetricKeyStatement

type CreateSymmetricKeyStatement struct {
	KeyOptions           []KeyOption        `json:"KeyOptions,omitempty"`
	Owner                *Identifier        `json:"Owner,omitempty"`
	Provider             *Identifier        `json:"Provider,omitempty"`
	Name                 *Identifier        `json:"Name,omitempty"`
	EncryptingMechanisms []*CryptoMechanism `json:"EncryptingMechanisms,omitempty"`
}

CreateSymmetricKeyStatement represents a CREATE SYMMETRIC KEY statement.

type CreateSynonymStatement

type CreateSynonymStatement struct {
	Name    *SchemaObjectName
	ForName *SchemaObjectName
}

CreateSynonymStatement represents CREATE SYNONYM.

type CreateTableStatement

type CreateTableStatement struct {
	SchemaObjectName             *SchemaObjectName
	AsEdge                       bool
	AsFileTable                  bool
	AsNode                       bool
	Definition                   *TableDefinition
	OnFileGroupOrPartitionScheme *FileGroupOrPartitionScheme
	TextImageOn                  *IdentifierOrValueExpression
	FileStreamOn                 *IdentifierOrValueExpression
	Options                      []TableOption
	FederationScheme             *FederationScheme
	SelectStatement              *SelectStatement // For CTAS: CREATE TABLE ... AS SELECT
	CtasColumns                  []*Identifier    // For CTAS with column names: CREATE TABLE (col1, col2) WITH ... AS SELECT
}

CreateTableStatement represents a CREATE TABLE statement

type CreateTriggerStatement

type CreateTriggerStatement struct {
	Name                *SchemaObjectName
	TriggerObject       *TriggerObject
	TriggerType         string // "For", "After", "InsteadOf"
	TriggerActions      []*TriggerAction
	Options             []TriggerOptionType
	WithAppend          bool
	IsNotForReplication bool
	MethodSpecifier     *MethodSpecifier
	StatementList       *StatementList
}

CreateTriggerStatement represents a CREATE TRIGGER statement

type CreateTypeStatement

type CreateTypeStatement struct {
	Name *SchemaObjectName `json:"Name,omitempty"`
}

CreateTypeStatement represents a CREATE TYPE statement.

type CreateTypeTableStatement

type CreateTypeTableStatement struct {
	Name       *SchemaObjectName `json:"Name,omitempty"`
	Definition *TableDefinition  `json:"Definition,omitempty"`
	Options    []TableOption     `json:"Options,omitempty"`
}

CreateTypeTableStatement represents a CREATE TYPE ... AS TABLE statement (table type).

type CreateTypeUddtStatement

type CreateTypeUddtStatement struct {
	Name               *SchemaObjectName
	DataType           DataTypeReference
	NullableConstraint *NullableConstraintDefinition
}

CreateTypeUddtStatement represents a CREATE TYPE ... FROM statement (user-defined data type).

type CreateTypeUdtStatement

type CreateTypeUdtStatement struct {
	Name         *SchemaObjectName
	AssemblyName *AssemblyName
}

CreateTypeUdtStatement represents a CREATE TYPE ... EXTERNAL NAME statement (CLR user-defined type).

type CreateUserStatement

type CreateUserStatement struct {
	Name            *Identifier
	UserLoginOption *UserLoginOption
	UserOptions     []UserOption
}

CreateUserStatement represents a CREATE USER statement

type CreateViewStatement

type CreateViewStatement struct {
	SchemaObjectName *SchemaObjectName `json:"SchemaObjectName,omitempty"`
	Columns          []*Identifier     `json:"Columns,omitempty"`
	SelectStatement  *SelectStatement  `json:"SelectStatement,omitempty"`
	WithCheckOption  bool              `json:"WithCheckOption"`
	ViewOptions      []ViewOption      `json:"ViewOptions,omitempty"`
	IsMaterialized   bool              `json:"IsMaterialized"`
}

CreateViewStatement represents a CREATE VIEW statement.

type CreateWorkloadClassifierStatement

type CreateWorkloadClassifierStatement struct {
	ClassifierName *Identifier
	Options        []WorkloadClassifierOption
}

CreateWorkloadClassifierStatement represents a CREATE WORKLOAD CLASSIFIER statement.

type CreateWorkloadGroupStatement

type CreateWorkloadGroupStatement struct {
	Name                    *Identifier
	PoolName                *Identifier
	ExternalPoolName        *Identifier
	WorkloadGroupParameters []interface{} // Can be WorkloadGroupResourceParameter or WorkloadGroupImportanceParameter
}

CreateWorkloadGroupStatement represents a CREATE WORKLOAD GROUP statement.

type CreateXmlIndexStatement

type CreateXmlIndexStatement struct {
	Primary               bool              `json:"Primary,omitempty"`
	XmlColumn             *Identifier       `json:"XmlColumn,omitempty"`
	SecondaryXmlIndexName *Identifier       `json:"SecondaryXmlIndexName,omitempty"`
	SecondaryXmlIndexType string            `json:"SecondaryXmlIndexType,omitempty"` // "NotSpecified", "Value", "Path", "Property"
	Name                  *Identifier       `json:"Name,omitempty"`
	OnName                *SchemaObjectName `json:"OnName,omitempty"`
	IndexOptions          []IndexOption     `json:"IndexOptions,omitempty"`
}

CreateXmlIndexStatement represents a CREATE XML INDEX statement.

type CreateXmlSchemaCollectionStatement

type CreateXmlSchemaCollectionStatement struct {
	Name       *SchemaObjectName
	Expression ScalarExpression
}

CreateXmlSchemaCollectionStatement represents CREATE XML SCHEMA COLLECTION.

type CreationDispositionKeyOption

type CreationDispositionKeyOption struct {
	IsCreateNew bool   `json:"IsCreateNew,omitempty"`
	OptionKind  string `json:"OptionKind,omitempty"`
}

CreationDispositionKeyOption represents a CREATION_DISPOSITION key option.

type CryptoMechanism

type CryptoMechanism struct {
	CryptoMechanismType string           `json:"CryptoMechanismType,omitempty"` // "Certificate", "SymmetricKey", "AsymmetricKey", "Password"
	Identifier          *Identifier      `json:"Identifier,omitempty"`
	PasswordOrSignature ScalarExpression `json:"PasswordOrSignature,omitempty"`
}

CryptoMechanism represents an encryption mechanism (CERTIFICATE, KEY, PASSWORD, etc.)

type CubeGroupingSpecification

type CubeGroupingSpecification struct {
	Arguments []GroupingSpecification `json:"Arguments,omitempty"`
}

CubeGroupingSpecification represents GROUP BY CUBE (...) syntax.

type CursorDefaultDatabaseOption

type CursorDefaultDatabaseOption struct {
	OptionKind string // "CursorDefault"
	IsLocal    bool   // true for LOCAL, false for GLOBAL
}

CursorDefaultDatabaseOption represents CURSOR_DEFAULT database option

type CursorDefinition

type CursorDefinition struct {
	Options []*CursorOption  `json:"Options,omitempty"`
	Select  *SelectStatement `json:"Select,omitempty"`
}

CursorDefinition represents a cursor definition.

type CursorId

type CursorId struct {
	IsGlobal bool                         `json:"IsGlobal"`
	Name     *IdentifierOrValueExpression `json:"Name,omitempty"`
}

CursorId represents a cursor identifier.

type CursorOption

type CursorOption struct {
	OptionKind string `json:"OptionKind,omitempty"`
}

CursorOption represents a cursor option like SCROLL or DYNAMIC.

type DataCompressionOption

type DataCompressionOption struct {
	CompressionLevel string // "None", "Row", "Page", "ColumnStore", "ColumnStoreArchive"
	OptionKind       string // "DataCompression"
	PartitionRanges  []*CompressionPartitionRange
}

DataCompressionOption represents a DATA_COMPRESSION option for indexes

type DataModificationSpecification

type DataModificationSpecification interface {
	Node
	// contains filtered or unexported methods
}

DataModificationSpecification is the interface for DML specifications

type DataModificationTableReference

type DataModificationTableReference struct {
	DataModificationSpecification DataModificationSpecification
	Alias                         *Identifier
	Columns                       []*Identifier
	ForPath                       bool
}

DataModificationTableReference represents a DML statement used as a table source in FROM clause This allows using INSERT/UPDATE/DELETE/MERGE with OUTPUT clause as table sources

type DataTypeReference

type DataTypeReference interface {
	Node
	// contains filtered or unexported methods
}

DataTypeReference is an interface for data type references

type DataTypeSequenceOption

type DataTypeSequenceOption struct {
	OptionKind string
	DataType   DataTypeReference
	NoValue    bool
}

DataTypeSequenceOption represents a sequence option with a data type (AS clause).

type DatabaseAuditAction

type DatabaseAuditAction struct {
	ActionKind string // Select, Insert, Update, Delete, Execute, Receive, References
}

DatabaseAuditAction represents a database audit action

type DatabaseConfigurationClearOption

type DatabaseConfigurationClearOption struct {
	OptionKind string           // "ProcedureCache"
	PlanHandle ScalarExpression // Optional binary plan handle
}

DatabaseConfigurationClearOption represents a CLEAR option

type DatabaseConfigurationSetOption

type DatabaseConfigurationSetOption interface {
	Node
	// contains filtered or unexported methods
}

DatabaseConfigurationSetOption is an interface for scoped configuration options

type DatabaseOption

type DatabaseOption interface {
	Node
	// contains filtered or unexported methods
}

DatabaseOption is an interface for database options

type DbccNamedLiteral

type DbccNamedLiteral struct {
	Name  string
	Value ScalarExpression
}

DbccNamedLiteral represents a parameter in a DBCC statement.

type DbccOption

type DbccOption struct {
	OptionKind string
}

DbccOption represents an option in a DBCC statement.

type DbccStatement

type DbccStatement struct {
	DllName             string
	Command             string
	ParenthesisRequired bool
	Literals            []*DbccNamedLiteral
	Options             []*DbccOption
	OptionsUseJoin      bool
}

DbccStatement represents a DBCC statement.

type DeallocateCursorStatement

type DeallocateCursorStatement struct {
	Cursor *CursorId `json:"Cursor,omitempty"`
}

DeallocateCursorStatement represents DEALLOCATE cursor_name.

type DeclareCursorStatement

type DeclareCursorStatement struct {
	Name             *Identifier       `json:"Name,omitempty"`
	CursorDefinition *CursorDefinition `json:"CursorDefinition,omitempty"`
}

DeclareCursorStatement represents DECLARE cursor_name CURSOR FOR SELECT.

type DeclareTableVariableBody

type DeclareTableVariableBody struct {
	VariableName *Identifier      `json:"VariableName,omitempty"`
	AsDefined    bool             `json:"AsDefined,omitempty"`
	Definition   *TableDefinition `json:"Definition,omitempty"`
}

DeclareTableVariableBody represents the body of a table variable declaration.

type DeclareTableVariableStatement

type DeclareTableVariableStatement struct {
	Body *DeclareTableVariableBody `json:"Body,omitempty"`
}

DeclareTableVariableStatement represents a DECLARE @var TABLE statement.

type DeclareVariableElement

type DeclareVariableElement struct {
	VariableName *Identifier                   `json:"VariableName,omitempty"`
	DataType     *SqlDataTypeReference         `json:"DataType,omitempty"`
	Value        ScalarExpression              `json:"Value,omitempty"`
	Nullable     *NullableConstraintDefinition `json:"Nullable,omitempty"`
}

DeclareVariableElement represents a single variable declaration.

type DeclareVariableStatement

type DeclareVariableStatement struct {
	Declarations []*DeclareVariableElement `json:"Declarations,omitempty"`
}

DeclareVariableStatement represents a DECLARE statement.

type DefaultConstraintDefinition

type DefaultConstraintDefinition struct {
	ConstraintIdentifier *Identifier
	Expression           ScalarExpression
	Column               *Identifier // For table-level DEFAULT constraint (DEFAULT ... FOR column)
	WithValues           bool
}

DefaultConstraintDefinition represents a DEFAULT constraint

type DefaultLiteral

type DefaultLiteral struct {
	LiteralType string `json:"LiteralType,omitempty"`
	Value       string `json:"Value,omitempty"`
}

DefaultLiteral represents a DEFAULT literal.

type DefaultSchemaPrincipalOption

type DefaultSchemaPrincipalOption struct {
	OptionKind string
	Identifier *Identifier
}

DefaultSchemaPrincipalOption represents a default schema option

type DelayedDurabilityDatabaseOption

type DelayedDurabilityDatabaseOption struct {
	OptionKind string // "DelayedDurability"
	Value      string // "Disabled", "Allowed", "Forced"
}

DelayedDurabilityDatabaseOption represents DELAYED_DURABILITY option

type DeleteMergeAction

type DeleteMergeAction struct{}

DeleteMergeAction represents DELETE in a MERGE WHEN clause

type DeleteSpecification

type DeleteSpecification struct {
	Target           TableReference    `json:"Target,omitempty"`
	FromClause       *FromClause       `json:"FromClause,omitempty"`
	WhereClause      *WhereClause      `json:"WhereClause,omitempty"`
	TopRowFilter     *TopRowFilter     `json:"TopRowFilter,omitempty"`
	OutputClause     *OutputClause     `json:"OutputClause,omitempty"`
	OutputIntoClause *OutputIntoClause `json:"OutputIntoClause,omitempty"`
}

DeleteSpecification contains the details of a DELETE.

type DeleteStatement

type DeleteStatement struct {
	DeleteSpecification      *DeleteSpecification      `json:"DeleteSpecification,omitempty"`
	WithCtesAndXmlNamespaces *WithCtesAndXmlNamespaces `json:"WithCtesAndXmlNamespaces,omitempty"`
	OptimizerHints           []OptimizerHintBase       `json:"OptimizerHints,omitempty"`
}

DeleteStatement represents a DELETE statement.

type DenyStatement

type DenyStatement struct {
	Permissions          []*Permission
	Principals           []*SecurityPrincipal
	CascadeOption        bool
	SecurityTargetObject *SecurityTargetObject
	AsClause             *Identifier
}

DenyStatement represents a DENY statement

type DeviceInfo

type DeviceInfo struct {
	LogicalDevice      *IdentifierOrValueExpression
	PhysicalDevice     ScalarExpression
	DeviceType         string // "None", "Disk", "Tape", "Pipe", "VirtualDevice", "Database", "URL"
	PhysicalDeviceType string
}

DeviceInfo represents a backup device

type DialogOption

type DialogOption interface {
	// contains filtered or unexported methods
}

DialogOption is an interface for dialog options.

type DistinctPredicate

type DistinctPredicate struct {
	FirstExpression  ScalarExpression
	SecondExpression ScalarExpression
	IsNot            bool
}

DistinctPredicate represents an IS [NOT] DISTINCT FROM expression.

type DropAggregateStatement

type DropAggregateStatement struct {
	IsIfExists bool
	Objects    []*SchemaObjectName
}

DropAggregateStatement represents a DROP AGGREGATE statement

type DropAlterFullTextIndexAction

type DropAlterFullTextIndexAction struct {
	Columns          []*Identifier `json:"Columns,omitempty"`
	WithNoPopulation bool          `json:"WithNoPopulation"`
}

DropAlterFullTextIndexAction represents a DROP action for fulltext index

type DropApplicationRoleStatement

type DropApplicationRoleStatement struct {
	Name       *Identifier `json:"Name,omitempty"`
	IsIfExists bool        `json:"IsIfExists"`
}

DropApplicationRoleStatement represents a DROP APPLICATION ROLE statement

type DropAssemblyStatement

type DropAssemblyStatement struct {
	IsIfExists       bool
	Objects          []*SchemaObjectName
	WithNoDependents bool
}

DropAssemblyStatement represents a DROP ASSEMBLY statement

type DropAsymmetricKeyStatement

type DropAsymmetricKeyStatement struct {
	IsIfExists        bool        `json:"IsIfExists"`
	Name              *Identifier `json:"Name,omitempty"`
	RemoveProviderKey bool        `json:"RemoveProviderKey"`
}

DropAsymmetricKeyStatement represents a DROP ASYMMETRIC KEY statement

type DropAvailabilityGroupStatement

type DropAvailabilityGroupStatement struct {
	Name       *Identifier
	IsIfExists bool
}

DropAvailabilityGroupStatement represents a DROP AVAILABILITY GROUP statement.

type DropBrokerPriorityStatement

type DropBrokerPriorityStatement struct {
	Name       *Identifier `json:"Name,omitempty"`
	IsIfExists bool        `json:"IsIfExists,omitempty"`
}

DropBrokerPriorityStatement represents DROP BROKER PRIORITY statement.

type DropCertificateStatement

type DropCertificateStatement struct {
	Name       *Identifier `json:"Name,omitempty"`
	IsIfExists bool        `json:"IsIfExists"`
}

DropCertificateStatement represents a DROP CERTIFICATE statement

type DropClusteredConstraintMoveOption

type DropClusteredConstraintMoveOption struct {
	OptionKind  string
	OptionValue *FileGroupOrPartitionScheme
}

DropClusteredConstraintMoveOption represents a MOVE TO option.

type DropClusteredConstraintOption

type DropClusteredConstraintOption interface {
	// contains filtered or unexported methods
}

DropClusteredConstraintOption is an interface for options when dropping clustered constraints.

type DropClusteredConstraintStateOption

type DropClusteredConstraintStateOption struct {
	OptionKind  string
	OptionState string
}

DropClusteredConstraintStateOption represents an ON/OFF option like ONLINE = ON.

type DropClusteredConstraintValueOption

type DropClusteredConstraintValueOption struct {
	OptionKind  string
	OptionValue ScalarExpression
}

DropClusteredConstraintValueOption represents a value option like MAXDOP = 21.

type DropClusteredConstraintWaitAtLowPriorityLockOption

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

DropClusteredConstraintWaitAtLowPriorityLockOption represents a WAIT_AT_LOW_PRIORITY option.

type DropColumnEncryptionKeyStatement

type DropColumnEncryptionKeyStatement struct {
	Name       *Identifier
	IsIfExists bool
}

DropColumnEncryptionKeyStatement represents DROP COLUMN ENCRYPTION KEY statement

type DropColumnMasterKeyStatement

type DropColumnMasterKeyStatement struct {
	Name       *Identifier
	IsIfExists bool
}

DropColumnMasterKeyStatement represents a DROP COLUMN MASTER KEY statement.

type DropContractStatement

type DropContractStatement struct {
	Name       *Identifier `json:"Name,omitempty"`
	IsIfExists bool        `json:"IsIfExists"`
}

DropContractStatement represents a DROP CONTRACT statement

type DropCredentialStatement

type DropCredentialStatement struct {
	IsDatabaseScoped bool
	Name             *Identifier
	IsIfExists       bool
}

DropCredentialStatement represents a DROP CREDENTIAL statement.

type DropCryptographicProviderStatement

type DropCryptographicProviderStatement struct {
	Name       *Identifier
	IsIfExists bool
}

DropCryptographicProviderStatement represents DROP CRYPTOGRAPHIC PROVIDER statement

type DropDatabaseAuditSpecificationStatement

type DropDatabaseAuditSpecificationStatement struct {
	Name       *Identifier
	IsIfExists bool
}

DropDatabaseAuditSpecificationStatement represents DROP DATABASE AUDIT SPECIFICATION

type DropDatabaseEncryptionKeyStatement

type DropDatabaseEncryptionKeyStatement struct{}

DropDatabaseEncryptionKeyStatement represents a DROP DATABASE ENCRYPTION KEY statement.

type DropDatabaseStatement

type DropDatabaseStatement struct {
	IsIfExists bool
	Databases  []*Identifier
}

DropDatabaseStatement represents a DROP DATABASE statement

type DropDefaultStatement

type DropDefaultStatement struct {
	IsIfExists bool
	Objects    []*SchemaObjectName
}

DropDefaultStatement represents a DROP DEFAULT statement

type DropEndpointStatement

type DropEndpointStatement struct {
	Name       *Identifier `json:"Name,omitempty"`
	IsIfExists bool        `json:"IsIfExists"`
}

DropEndpointStatement represents a DROP ENDPOINT statement

type DropEventNotificationStatement

type DropEventNotificationStatement struct {
	Notifications []*Identifier                 `json:"Notifications,omitempty"`
	Scope         *EventNotificationObjectScope `json:"Scope,omitempty"`
}

DropEventNotificationStatement represents a DROP EVENT NOTIFICATION statement

type DropEventSessionStatement

type DropEventSessionStatement struct {
	Name         *Identifier
	SessionScope string // "Server" or "Database"
	IsIfExists   bool
}

DropEventSessionStatement represents DROP EVENT SESSION statement

type DropExternalDataSourceStatement

type DropExternalDataSourceStatement struct {
	IsIfExists bool
	Name       *Identifier
}

DropExternalDataSourceStatement represents a DROP EXTERNAL DATA SOURCE statement

type DropExternalFileFormatStatement

type DropExternalFileFormatStatement struct {
	IsIfExists bool
	Name       *Identifier
}

DropExternalFileFormatStatement represents a DROP EXTERNAL FILE FORMAT statement

type DropExternalLanguageStatement

type DropExternalLanguageStatement struct {
	Name          *Identifier
	Authorization *Identifier
	IsIfExists    bool
}

DropExternalLanguageStatement represents a DROP EXTERNAL LANGUAGE statement.

type DropExternalLibraryStatement

type DropExternalLibraryStatement struct {
	Name  *Identifier
	Owner *Identifier // via AUTHORIZATION
}

DropExternalLibraryStatement represents a DROP EXTERNAL LIBRARY statement

type DropExternalModelStatement

type DropExternalModelStatement struct {
	IsIfExists bool
	Name       *SchemaObjectName
}

DropExternalModelStatement represents a DROP EXTERNAL MODEL statement

type DropExternalResourcePoolStatement

type DropExternalResourcePoolStatement struct {
	IsIfExists bool
	Name       *Identifier
}

DropExternalResourcePoolStatement represents a DROP EXTERNAL RESOURCE POOL statement

type DropExternalTableStatement

type DropExternalTableStatement struct {
	IsIfExists bool
	Objects    []*SchemaObjectName
}

DropExternalTableStatement represents a DROP EXTERNAL TABLE statement

type DropFederationStatement

type DropFederationStatement struct {
	Name       *Identifier
	IsIfExists bool
}

DropFederationStatement represents a DROP FEDERATION statement.

type DropFullTextCatalogStatement

type DropFullTextCatalogStatement struct {
	Name       *Identifier `json:"Name,omitempty"`
	IsIfExists bool        `json:"IsIfExists"`
}

DropFullTextCatalogStatement represents DROP FULLTEXT CATALOG statement

type DropFullTextStopListStatement

type DropFullTextStopListStatement struct {
	Name       *Identifier `json:"Name,omitempty"`
	IsIfExists bool        `json:"IsIfExists"`
}

DropFullTextStopListStatement represents DROP FULLTEXT STOPLIST statement

type DropFulltextIndexStatement

type DropFulltextIndexStatement struct {
	TableName *SchemaObjectName `json:"TableName,omitempty"`
}

DropFulltextIndexStatement represents DROP FULLTEXT INDEX statement

type DropFunctionStatement

type DropFunctionStatement struct {
	IsIfExists bool
	Objects    []*SchemaObjectName
}

DropFunctionStatement represents a DROP FUNCTION statement

type DropIndexClause

type DropIndexClause struct {
	Index   *Identifier       // Index name for new syntax
	Object  *SchemaObjectName // Table name for ON clause syntax
	Options []DropIndexOption
	// Legacy fields for backwards-compatible syntax (table.index)
	LegacyIndex *SchemaObjectName
}

DropIndexClause represents a single index to drop

type DropIndexOption

type DropIndexOption interface {
	Node
	// contains filtered or unexported methods
}

DropIndexOption is the interface for DROP INDEX options

type DropIndexStatement

type DropIndexStatement struct {
	IsIfExists       bool
	DropIndexClauses []*DropIndexClause
}

DropIndexStatement represents a DROP INDEX statement

type DropLoginStatement

type DropLoginStatement struct {
	Name       *Identifier `json:"Name,omitempty"`
	IsIfExists bool        `json:"IsIfExists"`
}

DropLoginStatement represents DROP LOGIN name

type DropMasterKeyStatement

type DropMasterKeyStatement struct{}

DropMasterKeyStatement represents a DROP MASTER KEY statement

type DropMemberAlterRoleAction

type DropMemberAlterRoleAction struct {
	Member *Identifier
}

DropMemberAlterRoleAction represents DROP MEMBER action

type DropMessageTypeStatement

type DropMessageTypeStatement struct {
	Name       *Identifier `json:"Name,omitempty"`
	IsIfExists bool        `json:"IsIfExists"`
}

DropMessageTypeStatement represents a DROP MESSAGE TYPE statement

type DropPartitionFunctionStatement

type DropPartitionFunctionStatement struct {
	Name       *Identifier `json:"Name,omitempty"`
	IsIfExists bool        `json:"IsIfExists"`
}

DropPartitionFunctionStatement represents a DROP PARTITION FUNCTION statement

type DropPartitionSchemeStatement

type DropPartitionSchemeStatement struct {
	Name       *Identifier `json:"Name,omitempty"`
	IsIfExists bool        `json:"IsIfExists"`
}

DropPartitionSchemeStatement represents a DROP PARTITION SCHEME statement

type DropProcedureStatement

type DropProcedureStatement struct {
	IsIfExists bool
	Objects    []*SchemaObjectName
}

DropProcedureStatement represents a DROP PROCEDURE statement

type DropQueueStatement

type DropQueueStatement struct {
	Name *SchemaObjectName `json:"Name,omitempty"`
}

DropQueueStatement represents a DROP QUEUE statement

type DropRemoteServiceBindingStatement

type DropRemoteServiceBindingStatement struct {
	Name       *Identifier `json:"Name,omitempty"`
	IsIfExists bool        `json:"IsIfExists"`
}

DropRemoteServiceBindingStatement represents a DROP REMOTE SERVICE BINDING statement

type DropResourcePoolStatement

type DropResourcePoolStatement struct {
	Name       *Identifier
	IsIfExists bool
}

DropResourcePoolStatement represents a DROP RESOURCE POOL statement

type DropRoleStatement

type DropRoleStatement struct {
	IsIfExists bool
	Name       *Identifier
}

DropRoleStatement represents a DROP ROLE statement

type DropRouteStatement

type DropRouteStatement struct {
	Name       *Identifier `json:"Name,omitempty"`
	IsIfExists bool        `json:"IsIfExists"`
}

DropRouteStatement represents a DROP ROUTE statement

type DropRuleStatement

type DropRuleStatement struct {
	IsIfExists bool
	Objects    []*SchemaObjectName
}

DropRuleStatement represents a DROP RULE statement

type DropSchemaStatement

type DropSchemaStatement struct {
	IsIfExists   bool
	Schema       *SchemaObjectName
	DropBehavior string // "None", "Cascade", "Restrict"
}

DropSchemaStatement represents a DROP SCHEMA statement

type DropSearchPropertyListAction

type DropSearchPropertyListAction struct {
	PropertyName *StringLiteral `json:"PropertyName,omitempty"`
}

DropSearchPropertyListAction represents a DROP action in ALTER SEARCH PROPERTY LIST.

type DropSearchPropertyListStatement

type DropSearchPropertyListStatement struct {
	Name       *Identifier
	IsIfExists bool
}

DropSearchPropertyListStatement represents a DROP SEARCH PROPERTY LIST statement.

type DropSecurityPolicyStatement

type DropSecurityPolicyStatement struct {
	IsIfExists bool
	Objects    []*SchemaObjectName
}

DropSecurityPolicyStatement represents a DROP SECURITY POLICY statement

type DropSensitivityClassificationStatement

type DropSensitivityClassificationStatement struct {
	Columns []*ColumnReferenceExpression
}

DropSensitivityClassificationStatement represents DROP SENSITIVITY CLASSIFICATION statement

type DropSequenceStatement

type DropSequenceStatement struct {
	Objects    []*SchemaObjectName
	IsIfExists bool
}

DropSequenceStatement represents a DROP SEQUENCE statement.

type DropServerAuditSpecificationStatement

type DropServerAuditSpecificationStatement struct {
	Name       *Identifier
	IsIfExists bool
}

DropServerAuditSpecificationStatement represents a DROP SERVER AUDIT SPECIFICATION statement

type DropServerAuditStatement

type DropServerAuditStatement struct {
	Name       *Identifier
	IsIfExists bool
}

DropServerAuditStatement represents a DROP SERVER AUDIT statement

type DropServerRoleStatement

type DropServerRoleStatement struct {
	Name       *Identifier
	IsIfExists bool
}

DropServerRoleStatement represents a DROP SERVER ROLE statement.

type DropServiceStatement

type DropServiceStatement struct {
	Name       *Identifier `json:"Name,omitempty"`
	IsIfExists bool        `json:"IsIfExists"`
}

DropServiceStatement represents a DROP SERVICE statement

type DropSignatureStatement

type DropSignatureStatement struct {
	IsCounter   bool               `json:"IsCounter,omitempty"`
	ElementKind string             `json:"ElementKind,omitempty"` // "NotSpecified", "Object", "Assembly", "Database"
	Element     *SchemaObjectName  `json:"Element,omitempty"`
	Cryptos     []*CryptoMechanism `json:"Cryptos,omitempty"`
}

DropSignatureStatement represents a DROP SIGNATURE statement.

type DropStatisticsStatement

type DropStatisticsStatement struct {
	Objects []*SchemaObjectName
}

DropStatisticsStatement represents a DROP STATISTICS statement

type DropSymmetricKeyStatement

type DropSymmetricKeyStatement struct {
	RemoveProviderKey bool        `json:"RemoveProviderKey,omitempty"`
	Name              *Identifier `json:"Name,omitempty"`
	IsIfExists        bool        `json:"IsIfExists"`
}

DropSymmetricKeyStatement represents a DROP SYMMETRIC KEY statement.

type DropSynonymStatement

type DropSynonymStatement struct {
	IsIfExists bool
	Objects    []*SchemaObjectName
}

DropSynonymStatement represents a DROP SYNONYM statement

type DropTableStatement

type DropTableStatement struct {
	IsIfExists bool
	Objects    []*SchemaObjectName
}

DropTableStatement represents a DROP TABLE statement

type DropTriggerStatement

type DropTriggerStatement struct {
	IsIfExists   bool
	Objects      []*SchemaObjectName
	TriggerScope string // "Normal", "Database", "AllServer"
}

DropTriggerStatement represents a DROP TRIGGER statement

type DropTypeStatement

type DropTypeStatement struct {
	IsIfExists bool
	Name       *SchemaObjectName
}

DropTypeStatement represents a DROP TYPE statement

type DropUserStatement

type DropUserStatement struct {
	IsIfExists bool
	Name       *Identifier
}

DropUserStatement represents a DROP USER statement

type DropViewStatement

type DropViewStatement struct {
	IsIfExists bool
	Objects    []*SchemaObjectName
}

DropViewStatement represents a DROP VIEW statement

type DropWorkloadClassifierStatement

type DropWorkloadClassifierStatement struct {
	IsIfExists bool
	Name       *Identifier
}

DropWorkloadClassifierStatement represents a DROP WORKLOAD CLASSIFIER statement

type DropWorkloadGroupStatement

type DropWorkloadGroupStatement struct {
	IsIfExists bool
	Name       *Identifier
}

DropWorkloadGroupStatement represents a DROP WORKLOAD GROUP statement

type DropXmlSchemaCollectionStatement

type DropXmlSchemaCollectionStatement struct {
	Name *SchemaObjectName `json:"Name,omitempty"`
}

DropXmlSchemaCollectionStatement represents a DROP XML SCHEMA COLLECTION statement

type DurabilityTableOption

type DurabilityTableOption struct {
	OptionKind                string // "Durability"
	DurabilityTableOptionKind string // "SchemaOnly", "SchemaAndData"
}

DurabilityTableOption represents a DURABILITY table option

type ElasticPoolSpecification

type ElasticPoolSpecification struct {
	ElasticPoolName *Identifier
	OptionKind      string // "ServiceObjective"
}

ElasticPoolSpecification represents SERVICE_OBJECTIVE = ELASTIC_POOL(name = poolname)

type EnableDisableTriggerStatement

type EnableDisableTriggerStatement struct {
	TriggerEnforcement string // "Enable" or "Disable"
	All                bool   // true if ENABLE/DISABLE TRIGGER ALL
	TriggerNames       []*SchemaObjectName
	TriggerObject      *TriggerObject
}

EnableDisableTriggerStatement represents ENABLE/DISABLE TRIGGER statements

type EnabledDisabledPayloadOption

type EnabledDisabledPayloadOption struct {
	IsEnabled bool   `json:"IsEnabled"`
	Kind      string `json:"Kind,omitempty"` // Batches, Sessions, MessageForwarding, etc.
}

EnabledDisabledPayloadOption represents an enabled/disabled payload option like BATCHES, SESSIONS.

type EncryptedValueParameter

type EncryptedValueParameter struct {
	Value         ScalarExpression
	ParameterKind string // "EncryptedValue"
}

EncryptedValueParameter represents ENCRYPTED_VALUE parameter

type EncryptionPayloadOption

type EncryptionPayloadOption struct {
	EncryptionSupport string `json:"EncryptionSupport,omitempty"` // Disabled, Supported, Required, NotSpecified
	AlgorithmPartOne  string `json:"AlgorithmPartOne,omitempty"`  // NotSpecified, Rc4, Aes
	AlgorithmPartTwo  string `json:"AlgorithmPartTwo,omitempty"`  // NotSpecified, Rc4, Aes
	Kind              string `json:"Kind,omitempty"`              // Encryption
}

EncryptionPayloadOption represents an encryption option for service_broker/database_mirroring.

type EncryptionSource

type EncryptionSource interface {
	Node
	// contains filtered or unexported methods
}

EncryptionSource is an interface for key sources.

type EndConversationStatement

type EndConversationStatement struct {
	Conversation     ScalarExpression // The conversation handle
	WithCleanup      bool             // true if WITH CLEANUP specified
	ErrorCode        ScalarExpression // optional error code with WITH ERROR
	ErrorDescription ScalarExpression // optional error description with WITH ERROR
}

EndConversationStatement represents END CONVERSATION statement

type EndpointAffinity

type EndpointAffinity struct {
	Kind  string          `json:"Kind,omitempty"` // None, Admin, Integer
	Value *IntegerLiteral `json:"Value,omitempty"`
}

EndpointAffinity represents the affinity setting for an endpoint.

type EndpointProtocolOption

type EndpointProtocolOption interface {
	Node
	// contains filtered or unexported methods
}

EndpointProtocolOption is an interface for endpoint protocol options.

type EventAction

type EventAction struct {
	PackageName *Identifier
	ActionName  *Identifier
}

Legacy fields for backwards compatibility

type EventDeclaration

type EventDeclaration struct {
	ObjectName                         *EventSessionObjectName
	EventDeclarationSetParameters      []*EventDeclarationSetParameter
	EventDeclarationActionParameters   []*EventSessionObjectName
	EventDeclarationPredicateParameter BooleanExpression
}

EventDeclaration represents an event in the event session

type EventDeclarationCompareFunctionParameter

type EventDeclarationCompareFunctionParameter struct {
	Name              *EventSessionObjectName
	SourceDeclaration *SourceDeclaration
	EventValue        ScalarExpression
}

EventDeclarationCompareFunctionParameter for function calls in WHERE clause

type EventDeclarationSetParameter

type EventDeclarationSetParameter struct {
	EventField *Identifier
	EventValue ScalarExpression
}

EventDeclarationSetParameter represents a SET parameter

type EventGroupContainer

type EventGroupContainer struct {
	EventGroup string `json:"EventGroup,omitempty"`
}

EventGroupContainer represents a group of events.

type EventNotificationObjectScope

type EventNotificationObjectScope struct {
	Target    string            `json:"Target,omitempty"` // "Server", "Database", or "Queue"
	QueueName *SchemaObjectName `json:"QueueName,omitempty"`
}

EventNotificationObjectScope represents the scope of an event notification (SERVER, DATABASE, or QUEUE).

type EventRetentionSessionOption

type EventRetentionSessionOption struct {
	OptionKind string
	Value      string // e.g. "AllowSingleEventLoss"
}

EventRetentionSessionOption represents EVENT_RETENTION_MODE option

type EventSessionObjectName

type EventSessionObjectName struct {
	MultiPartIdentifier *MultiPartIdentifier
}

EventSessionObjectName represents an event session object name

type EventSessionOption

type EventSessionOption struct {
	OptionKind string
	Value      ScalarExpression
}

type EventTarget

type EventTarget struct {
	PackageName *Identifier
	TargetName  *Identifier
	Options     []*EventTargetOption
}

type EventTargetOption

type EventTargetOption struct {
	Name  *Identifier
	Value ScalarExpression
}

type EventTypeContainer

type EventTypeContainer struct {
	EventType string `json:"EventType,omitempty"`
}

EventTypeContainer represents an event type container

type EventTypeGroupContainer

type EventTypeGroupContainer interface {
	// contains filtered or unexported methods
}

EventTypeGroupContainer is an interface for event type/group containers.

type ExecutableEntity

type ExecutableEntity interface {
	// contains filtered or unexported methods
}

ExecutableEntity is an interface for executable entities.

type ExecutableProcedureReference

type ExecutableProcedureReference struct {
	ProcedureReference *ProcedureReferenceName `json:"ProcedureReference,omitempty"`
	Parameters         []*ExecuteParameter     `json:"Parameters,omitempty"`
	AdHocDataSource    *AdHocDataSource        `json:"AdHocDataSource,omitempty"`
}

ExecutableProcedureReference represents a procedure reference to execute.

type ExecutableStringList

type ExecutableStringList struct {
	Strings    []ScalarExpression  `json:"Strings,omitempty"`
	Parameters []*ExecuteParameter `json:"Parameters,omitempty"`
}

ExecutableStringList represents an EXECUTE with a string expression list. e.g., EXECUTE ('SELECT * FROM t1', param1, param2)

type ExecuteAsClause

type ExecuteAsClause struct {
	ExecuteAsOption string         // Caller, Self, Owner, String
	Literal         *StringLiteral // Used when ExecuteAsOption is "String"
}

ExecuteAsClause represents an EXECUTE AS clause

type ExecuteAsFunctionOption

type ExecuteAsFunctionOption struct {
	OptionKind string           // "ExecuteAs"
	ExecuteAs  *ExecuteAsClause // The EXECUTE AS clause
}

ExecuteAsFunctionOption represents an EXECUTE AS function option

type ExecuteAsProcedureOption

type ExecuteAsProcedureOption struct {
	ExecuteAs  *ExecuteAsClause
	OptionKind string // ExecuteAs
}

ExecuteAsProcedureOption represents an EXECUTE AS option for a procedure.

type ExecuteAsStatement

type ExecuteAsStatement struct {
	ExecuteContext *ExecuteContext
	WithNoRevert   bool
	Cookie         ScalarExpression
}

ExecuteAsStatement represents an EXECUTE AS statement.

type ExecuteAsTriggerOption

type ExecuteAsTriggerOption struct {
	OptionKind      string // "ExecuteAsClause"
	ExecuteAsClause *ExecuteAsClause
}

ExecuteAsTriggerOption represents an EXECUTE AS trigger option

type ExecuteContext

type ExecuteContext struct {
	Kind      string           // Caller, Login, User, Self, Owner
	Principal ScalarExpression // The principal (login or user name)
}

ExecuteContext represents the context for EXECUTE AS.

type ExecuteInsertSource

type ExecuteInsertSource struct {
	Execute *ExecuteSpecification `json:"Execute,omitempty"`
}

ExecuteInsertSource represents INSERT ... EXEC.

type ExecuteOption

type ExecuteOption struct {
	OptionKind string `json:"OptionKind,omitempty"`
}

ExecuteOption represents a simple execute option like RECOMPILE.

type ExecuteOptionType

type ExecuteOptionType interface {
	// contains filtered or unexported methods
}

ExecuteOptionType is an interface for execute options.

type ExecuteParameter

type ExecuteParameter struct {
	ParameterValue ScalarExpression   `json:"ParameterValue,omitempty"`
	Variable       *VariableReference `json:"Variable,omitempty"`
	IsOutput       bool               `json:"IsOutput"`
}

ExecuteParameter represents a parameter to an EXEC call.

type ExecuteSpecification

type ExecuteSpecification struct {
	Variable         *VariableReference `json:"Variable,omitempty"`
	LinkedServer     *Identifier        `json:"LinkedServer,omitempty"`
	ExecuteContext   *ExecuteContext    `json:"ExecuteContext,omitempty"`
	ExecutableEntity ExecutableEntity   `json:"ExecutableEntity,omitempty"`
}

ExecuteSpecification contains the details of an EXECUTE.

type ExecuteStatement

type ExecuteStatement struct {
	ExecuteSpecification *ExecuteSpecification `json:"ExecuteSpecification,omitempty"`
	Options              []ExecuteOptionType   `json:"Options,omitempty"`
}

ExecuteStatement represents an EXECUTE/EXEC statement.

type ExistsPredicate

type ExistsPredicate struct {
	Subquery QueryExpression `json:"Subquery,omitempty"`
}

ExistsPredicate represents EXISTS (subquery)

type ExpressionCallTarget

type ExpressionCallTarget struct {
	Expression ScalarExpression
}

ExpressionCallTarget represents an expression call target.

type ExpressionGroupingSpecification

type ExpressionGroupingSpecification struct {
	Expression             ScalarExpression `json:"Expression,omitempty"`
	DistributedAggregation bool             `json:"DistributedAggregation,omitempty"`
}

ExpressionGroupingSpecification represents a grouping by expression.

type ExpressionWithSortOrder

type ExpressionWithSortOrder struct {
	SortOrder  string           `json:"SortOrder,omitempty"`
	Expression ScalarExpression `json:"Expression,omitempty"`
}

ExpressionWithSortOrder represents an expression with sort order.

type ExternalCreateLoginSource

type ExternalCreateLoginSource struct {
	Options []PrincipalOption `json:"Options,omitempty"`
}

ExternalCreateLoginSource represents FROM EXTERNAL PROVIDER source

type ExternalDataSourceLiteralOrIdentifierOption

type ExternalDataSourceLiteralOrIdentifierOption struct {
	OptionKind string // Credential, ResourceManagerLocation, DatabaseName, ShardMapName
	Value      *IdentifierOrValueExpression
}

ExternalDataSourceLiteralOrIdentifierOption represents an option for external data source

type ExternalFileFormatContainerOption

type ExternalFileFormatContainerOption struct {
	OptionKind string
	Suboptions []ExternalFileFormatOption
}

ExternalFileFormatContainerOption represents a container option with suboptions

type ExternalFileFormatLiteralOption

type ExternalFileFormatLiteralOption struct {
	OptionKind string
	Value      ScalarExpression // Can be StringLiteral or IntegerLiteral
}

ExternalFileFormatLiteralOption represents a literal value option

type ExternalFileFormatOption

type ExternalFileFormatOption interface {
	// contains filtered or unexported methods
}

ExternalFileFormatOption is an interface for external file format options

type ExternalFileFormatUseDefaultTypeOption

type ExternalFileFormatUseDefaultTypeOption struct {
	OptionKind                       string
	ExternalFileFormatUseDefaultType string // "True" or "False"
}

ExternalFileFormatUseDefaultTypeOption represents USE_TYPE_DEFAULT option

type ExternalLanguageFileOption

type ExternalLanguageFileOption struct {
	Content              ScalarExpression
	FileName             ScalarExpression
	Platform             *Identifier
	Parameters           ScalarExpression
	EnvironmentVariables ScalarExpression
}

ExternalLanguageFileOption represents a file option for external language

type ExternalLibraryFileOption

type ExternalLibraryFileOption struct {
	Content  ScalarExpression
	Platform *Identifier
}

ExternalLibraryFileOption represents a file option for external library

type ExternalLibraryOption

type ExternalLibraryOption struct {
	OptionKind string
	Value      ScalarExpression
}

ExternalLibraryOption represents an option for external library

type ExternalResourcePoolAffinitySpecification

type ExternalResourcePoolAffinitySpecification struct {
	AffinityType       string          `json:"AffinityType,omitempty"` // Cpu, NumaNode
	IsAuto             bool            `json:"IsAuto"`
	PoolAffinityRanges []*LiteralRange `json:"PoolAffinityRanges,omitempty"`
}

ExternalResourcePoolAffinitySpecification represents an AFFINITY specification in an external resource pool

type ExternalResourcePoolParameter

type ExternalResourcePoolParameter struct {
	ParameterType         string                                     `json:"ParameterType,omitempty"` // MaxCpuPercent, MaxMemoryPercent, MaxProcesses, Affinity
	ParameterValue        ScalarExpression                           `json:"ParameterValue,omitempty"`
	AffinitySpecification *ExternalResourcePoolAffinitySpecification `json:"AffinitySpecification,omitempty"`
}

ExternalResourcePoolParameter represents a parameter in an external resource pool statement

type ExternalTableColumnDefinition

type ExternalTableColumnDefinition struct {
	ColumnDefinition   *ColumnDefinitionBase
	NullableConstraint *NullableConstraintDefinition
}

ExternalTableColumnDefinition represents a column definition in an external table

type ExternalTableDistributionOption

type ExternalTableDistributionOption struct {
	OptionKind string
	Value      ExternalTableDistributionPolicy
}

ExternalTableDistributionOption represents a DISTRIBUTION option

type ExternalTableDistributionPolicy

type ExternalTableDistributionPolicy interface {
	// contains filtered or unexported methods
}

ExternalTableDistributionPolicy is the interface for distribution policies

type ExternalTableLiteralOrIdentifierOption

type ExternalTableLiteralOrIdentifierOption struct {
	OptionKind string
	Value      *IdentifierOrValueExpression
}

ExternalTableLiteralOrIdentifierOption represents an option for external table

type ExternalTableOption

type ExternalTableOption struct {
	OptionKind string
	Value      ScalarExpression
}

ExternalTableOption represents a simple option for external table (legacy)

type ExternalTableOptionItem

type ExternalTableOptionItem interface {
	// contains filtered or unexported methods
}

ExternalTableOptionItem is an interface for external table options

type ExternalTableRejectTypeOption

type ExternalTableRejectTypeOption struct {
	OptionKind string
	Value      string // Value, Percentage
}

ExternalTableRejectTypeOption represents a REJECT_TYPE option

type ExternalTableReplicatedDistributionPolicy

type ExternalTableReplicatedDistributionPolicy struct{}

ExternalTableReplicatedDistributionPolicy represents REPLICATE distribution

type ExternalTableRoundRobinDistributionPolicy

type ExternalTableRoundRobinDistributionPolicy struct{}

ExternalTableRoundRobinDistributionPolicy represents ROUND_ROBIN distribution

type ExternalTableShardedDistributionPolicy

type ExternalTableShardedDistributionPolicy struct {
	ShardingColumn *Identifier
}

ExternalTableShardedDistributionPolicy represents SHARDED distribution

type ExtractFromExpression

type ExtractFromExpression struct {
	ExtractedElement *Identifier
	Expression       ScalarExpression
}

ExtractFromExpression represents an EXTRACT(element FROM expression) construct.

type FailoverModeReplicaOption

type FailoverModeReplicaOption struct {
	OptionKind string // "FailoverMode"
	Value      string // "Automatic", "Manual"
}

FailoverModeReplicaOption represents FAILOVER_MODE option

type FederationScheme

type FederationScheme struct {
	DistributionName *Identifier
	ColumnName       *Identifier
}

FederationScheme represents a FEDERATED ON clause

type FetchCursorStatement

type FetchCursorStatement struct {
	FetchType     *FetchType         `json:"FetchType,omitempty"`
	Cursor        *CursorId          `json:"Cursor,omitempty"`
	IntoVariables []ScalarExpression `json:"IntoVariables,omitempty"`
}

FetchCursorStatement represents FETCH cursor_name.

type FetchType

type FetchType struct {
	Orientation string           `json:"Orientation,omitempty"`
	RowOffset   ScalarExpression `json:"RowOffset,omitempty"`
}

FetchType represents the orientation for a FETCH statement.

type FileDeclaration

type FileDeclaration struct {
	Options   []FileDeclarationOption
	IsPrimary bool
}

FileDeclaration represents a file declaration within a filegroup

type FileDeclarationOption

type FileDeclarationOption interface {
	Node
	// contains filtered or unexported methods
}

FileDeclarationOption is an interface for file declaration options

type FileEncryptionSource

type FileEncryptionSource struct {
	IsExecutable bool           `json:"IsExecutable,omitempty"`
	File         *StringLiteral `json:"File,omitempty"`
}

FileEncryptionSource represents a certificate source from a file.

type FileGroupDefinition

type FileGroupDefinition struct {
	Name                        *Identifier
	FileDeclarations            []*FileDeclaration
	IsDefault                   bool
	ContainsFileStream          bool
	ContainsMemoryOptimizedData bool
}

FileGroupDefinition represents a FILEGROUP definition in CREATE DATABASE

type FileGroupOrPartitionScheme

type FileGroupOrPartitionScheme struct {
	Name                   *IdentifierOrValueExpression
	PartitionSchemeColumns []*Identifier
}

FileGroupOrPartitionScheme represents a filegroup or partition scheme reference.

type FileGrowthFileDeclarationOption

type FileGrowthFileDeclarationOption struct {
	GrowthIncrement ScalarExpression
	Units           string // "KB", "MB", "GB", "TB", "Percent", "Unspecified"
	OptionKind      string // "FileGrowth"
}

FileGrowthFileDeclarationOption represents the FILEGROWTH option for a file

type FileNameFileDeclarationOption

type FileNameFileDeclarationOption struct {
	OSFileName *StringLiteral
	OptionKind string // "FileName"
}

FileNameFileDeclarationOption represents the FILENAME option for a file

type FileStreamDatabaseOption

type FileStreamDatabaseOption struct {
	OptionKind          string
	NonTransactedAccess string // "Off", "ReadOnly", "Full", or "" if not specified
	DirectoryName       ScalarExpression
}

FileStreamDatabaseOption represents a FILESTREAM database option

type FileStreamOnDropIndexOption

type FileStreamOnDropIndexOption struct {
	FileStreamOn *IdentifierOrValueExpression
	OptionKind   string // FileStreamOn
}

FileStreamOnDropIndexOption represents the FILESTREAM_ON option

type FileStreamOnTableOption

type FileStreamOnTableOption struct {
	OptionKind string // "FileStreamOn"
	Value      *IdentifierOrValueExpression
}

FileStreamOnTableOption represents FILESTREAM_ON option

type FileStreamRestoreOption

type FileStreamRestoreOption struct {
	OptionKind       string
	FileStreamOption *FileStreamDatabaseOption
}

FileStreamRestoreOption represents a FILESTREAM restore option

type FileTableCollateFileNameTableOption

type FileTableCollateFileNameTableOption struct {
	Value      *Identifier `json:"Value,omitempty"`
	OptionKind string      `json:"OptionKind,omitempty"`
}

FileTableCollateFileNameTableOption represents a FILETABLE_COLLATE_FILENAME table option

type FileTableConstraintNameTableOption

type FileTableConstraintNameTableOption struct {
	Value      *Identifier `json:"Value,omitempty"`
	OptionKind string      `json:"OptionKind,omitempty"`
}

FileTableConstraintNameTableOption represents various FILETABLE constraint name options

type FileTableDirectoryTableOption

type FileTableDirectoryTableOption struct {
	Value      ScalarExpression `json:"Value,omitempty"`
	OptionKind string           `json:"OptionKind,omitempty"`
}

FileTableDirectoryTableOption represents a FILETABLE_DIRECTORY table option

type ForClause

type ForClause interface {
	Node
	// contains filtered or unexported methods
}

ForClause is an interface for different types of FOR clauses.

type ForceSeekTableHint

type ForceSeekTableHint struct {
	HintKind     string                       `json:"HintKind,omitempty"`
	IndexValue   *IdentifierOrValueExpression `json:"IndexValue,omitempty"`
	ColumnValues []*ColumnReferenceExpression `json:"ColumnValues,omitempty"`
}

ForceSeekTableHint represents FORCESEEK table hint with optional index and column list.

type ForeignKeyConstraintDefinition

type ForeignKeyConstraintDefinition struct {
	ConstraintIdentifier *Identifier
	Columns              []*Identifier
	ReferenceTableName   *SchemaObjectName
	ReferencedColumns    []*Identifier
	DeleteAction         string
	UpdateAction         string
	NotForReplication    bool
	IsEnforced           *bool // nil = not specified (default enforced), true = ENFORCED, false = NOT ENFORCED
}

ForeignKeyConstraintDefinition represents a FOREIGN KEY constraint

type FromClause

type FromClause struct {
	TableReferences []TableReference `json:"TableReferences,omitempty"`
}

FromClause represents a FROM clause.

type FullTextCatalogAndFileGroup

type FullTextCatalogAndFileGroup struct {
	CatalogName      *Identifier `json:"CatalogName,omitempty"`
	FileGroupName    *Identifier `json:"FileGroupName,omitempty"`
	FileGroupIsFirst bool        `json:"FileGroupIsFirst"`
}

FullTextCatalogAndFileGroup represents catalog and filegroup for fulltext index

type FullTextIndexColumn

type FullTextIndexColumn struct {
	Name                 *Identifier                  `json:"Name,omitempty"`
	TypeColumn           *Identifier                  `json:"TypeColumn,omitempty"`
	LanguageTerm         *IdentifierOrValueExpression `json:"LanguageTerm,omitempty"`
	StatisticalSemantics bool                         `json:"StatisticalSemantics"`
}

FullTextIndexColumn represents a column in a fulltext index

type FullTextIndexOption

type FullTextIndexOption interface {
	// contains filtered or unexported methods
}

FullTextIndexOption is an interface for fulltext index options

type FullTextPredicate

type FullTextPredicate struct {
	FullTextFunctionType string                       `json:"FullTextFunctionType,omitempty"` // Contains, FreeText
	Columns              []*ColumnReferenceExpression `json:"Columns,omitempty"`
	Value                ScalarExpression             `json:"Value,omitempty"`
	PropertyName         ScalarExpression             `json:"PropertyName,omitempty"`
	LanguageTerm         ScalarExpression             `json:"LanguageTerm,omitempty"`
}

FullTextPredicate represents CONTAINS or FREETEXT predicates in WHERE clauses

type FullTextStopListAction

type FullTextStopListAction struct {
	IsAdd        bool                         `json:"IsAdd"`
	IsAll        bool                         `json:"IsAll"`
	StopWord     *StringLiteral               `json:"StopWord,omitempty"`
	LanguageTerm *IdentifierOrValueExpression `json:"LanguageTerm,omitempty"`
}

FullTextStopListAction represents an action in ALTER FULLTEXT STOPLIST

type FullTextTableReference

type FullTextTableReference struct {
	FullTextFunctionType string                       `json:"FullTextFunctionType,omitempty"` // Contains, FreeText
	TableName            *SchemaObjectName            `json:"TableName,omitempty"`
	Columns              []*ColumnReferenceExpression `json:"Columns,omitempty"`
	SearchCondition      ScalarExpression             `json:"SearchCondition,omitempty"`
	TopN                 ScalarExpression             `json:"TopN,omitempty"`
	Language             ScalarExpression             `json:"Language,omitempty"`
	PropertyName         ScalarExpression             `json:"PropertyName,omitempty"`
	Alias                *Identifier                  `json:"Alias,omitempty"`
	ForPath              bool                         `json:"ForPath"`
}

FullTextTableReference represents CONTAINSTABLE or FREETEXTTABLE in a FROM clause

type FunctionCall

type FunctionCall struct {
	CallTarget         CallTarget         `json:"CallTarget,omitempty"`
	FunctionName       *Identifier        `json:"FunctionName,omitempty"`
	Parameters         []ScalarExpression `json:"Parameters,omitempty"`
	UniqueRowFilter    string             `json:"UniqueRowFilter,omitempty"`
	WithinGroupClause  *WithinGroupClause `json:"WithinGroupClause,omitempty"`
	OverClause         *OverClause        `json:"OverClause,omitempty"`
	IgnoreRespectNulls []*Identifier      `json:"IgnoreRespectNulls,omitempty"`
	WithArrayWrapper   bool               `json:"WithArrayWrapper,omitempty"`
	TrimOptions        *Identifier        `json:"TrimOptions,omitempty"` // For TRIM(LEADING/TRAILING/BOTH chars FROM string)
	Collation          *Identifier        `json:"Collation,omitempty"`
	JsonParameters     []*JsonKeyValue    `json:"JsonParameters,omitempty"`     // For JSON_OBJECT function key:value pairs
	AbsentOrNullOnNull []*Identifier      `json:"AbsentOrNullOnNull,omitempty"` // For JSON_OBJECT/JSON_ARRAY NULL ON NULL or ABSENT ON NULL
}

FunctionCall represents a function call.

type FunctionCallSetClause

type FunctionCallSetClause struct {
	MutatorFunction *FunctionCall `json:"MutatorFunction,omitempty"`
}

FunctionCallSetClause represents a mutator function call in UPDATE SET.

type FunctionOption

type FunctionOption struct {
	OptionKind string
}

FunctionOption represents a function option (like ENCRYPTION, SCHEMABINDING)

type FunctionOptionBase

type FunctionOptionBase interface {
	Node
	// contains filtered or unexported methods
}

FunctionOptionBase is an interface for function options

type FunctionReturnType

type FunctionReturnType interface {
	// contains filtered or unexported methods
}

FunctionReturnType is an interface for function return types

type GeneralSetCommand

type GeneralSetCommand struct {
	CommandType string           // "Language", "DateFormat", "DateFirst", "DeadlockPriority", "LockTimeout", "ContextInfo", "QueryGovernorCostLimit"
	Parameter   ScalarExpression // The parameter value
}

GeneralSetCommand represents SET commands like LANGUAGE, DATEFORMAT, etc.

type GeneralSetCommandRestoreOption

type GeneralSetCommandRestoreOption struct {
	OptionKind  string
	OptionValue ScalarExpression
}

GeneralSetCommandRestoreOption represents a general restore option

type GenericConfigurationOption

type GenericConfigurationOption struct {
	OptionKind         string                        // "MaxDop"
	GenericOptionKind  *Identifier                   // The custom option name
	GenericOptionState *IdentifierOrScalarExpression // The value (identifier or scalar)
}

GenericConfigurationOption represents a generic configuration option

type GenericDatabaseOption

type GenericDatabaseOption struct {
	OptionKind string // e.g., "Emergency", "ErrorBrokerConversations", "EnableBroker", etc.
}

GenericDatabaseOption represents a simple database option with just OptionKind

type GetConversationGroupStatement

type GetConversationGroupStatement struct {
	GroupId ScalarExpression  `json:"GroupId,omitempty"`
	Queue   *SchemaObjectName `json:"Queue,omitempty"`
}

type GlobalFunctionTableReference

type GlobalFunctionTableReference struct {
	Name       *Identifier        `json:"Name,omitempty"`
	Parameters []ScalarExpression `json:"Parameters,omitempty"`
	Alias      *Identifier        `json:"Alias,omitempty"`
	Columns    []*Identifier      `json:"Columns,omitempty"` // For column list in AS alias(c1, c2, ...)
	ForPath    bool               `json:"ForPath"`
}

GlobalFunctionTableReference represents a built-in function used as a table source (e.g., STRING_SPLIT, OPENJSON)

type GlobalVariableExpression

type GlobalVariableExpression struct {
	Name string
}

GlobalVariableExpression represents a global variable like @@IDENTITY, @@ERROR, etc.

type GoToStatement

type GoToStatement struct {
	LabelName *Identifier `json:"LabelName"`
}

GoToStatement represents a GOTO label statement.

type GrandTotalGroupingSpecification

type GrandTotalGroupingSpecification struct{}

GrandTotalGroupingSpecification represents empty parentheses () which means grand total.

type GrantStatement

type GrantStatement struct {
	Permissions          []*Permission
	Principals           []*SecurityPrincipal
	WithGrantOption      bool
	SecurityTargetObject *SecurityTargetObject
	AsClause             *Identifier
}

GrantStatement represents a GRANT statement

type GraphConnectionBetweenNodes

type GraphConnectionBetweenNodes struct {
	FromNode *SchemaObjectName
	ToNode   *SchemaObjectName
}

GraphConnectionBetweenNodes represents a FROM node TO node specification in a CONNECTION constraint

type GraphConnectionConstraintDefinition

type GraphConnectionConstraintDefinition struct {
	ConstraintIdentifier *Identifier
	FromNodeToNodeList   []*GraphConnectionBetweenNodes
	DeleteAction         string // "NotSpecified", "Cascade", "NoAction", etc.
}

GraphConnectionConstraintDefinition represents a CONNECTION constraint for graph edge tables

type GraphMatchCompositeExpression

type GraphMatchCompositeExpression struct {
	LeftNode     *GraphMatchNodeExpression
	Edge         *Identifier
	RightNode    *GraphMatchNodeExpression
	ArrowOnRight bool // true if arrow is -> (left to right), false if <- (right to left)
}

GraphMatchCompositeExpression represents a graph pattern like (Node1-(Edge)->Node2)

type GraphMatchExpression

type GraphMatchExpression interface {
	Node
	// contains filtered or unexported methods
}

GraphMatchExpression is an interface for graph match expressions

type GraphMatchLastNodePredicate

type GraphMatchLastNodePredicate struct {
	LeftExpression  *GraphMatchNodeExpression
	RightExpression *GraphMatchNodeExpression
}

GraphMatchLastNodePredicate represents LAST_NODE(x) = LAST_NODE(y)

type GraphMatchNodeExpression

type GraphMatchNodeExpression struct {
	Node         *Identifier
	UsesLastNode bool
}

GraphMatchNodeExpression represents a node in a graph match pattern

type GraphMatchPredicate

type GraphMatchPredicate struct {
	Expression GraphMatchExpression
}

GraphMatchPredicate represents MATCH predicate in graph queries

type GraphMatchRecursivePredicate

type GraphMatchRecursivePredicate struct {
	Function            string // "ShortestPath"
	OuterNodeExpression *GraphMatchNodeExpression
	Expression          []*GraphMatchCompositeExpression
	RecursiveQuantifier *GraphRecursiveMatchQuantifier
	AnchorOnLeft        bool
}

GraphMatchRecursivePredicate represents SHORTEST_PATH graph pattern

type GraphRecursiveMatchQuantifier

type GraphRecursiveMatchQuantifier struct {
	IsPlusSign bool
	LowerLimit ScalarExpression
	UpperLimit ScalarExpression
}

GraphRecursiveMatchQuantifier represents the quantifier in SHORTEST_PATH (+ or {min,max})

type GridParameter

type GridParameter struct {
	Parameter string // "None", "Level1", "Level2", "Level3", "Level4"
	Value     string // "Low", "Medium", "High"
}

GridParameter represents a grid parameter

type GridsSpatialIndexOption

type GridsSpatialIndexOption struct {
	GridParameters []*GridParameter
}

GridsSpatialIndexOption represents a GRIDS option

type GroupByClause

type GroupByClause struct {
	GroupByOption          string                  `json:"GroupByOption,omitempty"`
	All                    bool                    `json:"All,omitempty"`
	GroupingSpecifications []GroupingSpecification `json:"GroupingSpecifications,omitempty"`
}

GroupByClause represents a GROUP BY clause.

type GroupingSetsGroupingSpecification

type GroupingSetsGroupingSpecification struct {
	Arguments []GroupingSpecification `json:"Arguments,omitempty"`
}

GroupingSetsGroupingSpecification represents GROUP BY GROUPING SETS (...) syntax.

type GroupingSpecification

type GroupingSpecification interface {
	Node
	// contains filtered or unexported methods
}

GroupingSpecification is the interface for grouping specifications.

type HadrAvailabilityGroupDatabaseOption

type HadrAvailabilityGroupDatabaseOption struct {
	GroupName  *Identifier
	HadrOption string // "AvailabilityGroup"
	OptionKind string // "Hadr"
}

HadrAvailabilityGroupDatabaseOption represents ALTER DATABASE SET HADR AVAILABILITY GROUP = name

type HadrDatabaseOption

type HadrDatabaseOption struct {
	HadrOption string // "Suspend", "Resume", "Off"
	OptionKind string // "Hadr"
}

HadrDatabaseOption represents ALTER DATABASE SET HADR {SUSPEND|RESUME|OFF}

type HavingClause

type HavingClause struct {
	SearchCondition BooleanExpression `json:"SearchCondition,omitempty"`
}

HavingClause represents a HAVING clause.

type IIfCall

type IIfCall struct {
	Predicate      BooleanExpression `json:"Predicate,omitempty"`
	ThenExpression ScalarExpression  `json:"ThenExpression,omitempty"`
	ElseExpression ScalarExpression  `json:"ElseExpression,omitempty"`
}

IIfCall represents the IIF(condition, true_value, false_value) function

type IPv4

type IPv4 struct {
	OctetOne   *IntegerLiteral
	OctetTwo   *IntegerLiteral
	OctetThree *IntegerLiteral
	OctetFour  *IntegerLiteral
}

IPv4 represents an IPv4 address with four octets.

type Identifier

type Identifier struct {
	Value     string `json:"Value,omitempty"`
	QuoteType string `json:"QuoteType,omitempty"`
}

Identifier represents an identifier.

type IdentifierAtomicBlockOption

type IdentifierAtomicBlockOption struct {
	OptionKind string
	Value      *Identifier
}

IdentifierAtomicBlockOption represents an atomic block option with an identifier value.

type IdentifierDatabaseOption

type IdentifierDatabaseOption struct {
	OptionKind string      `json:"OptionKind,omitempty"` // "CatalogCollation"
	Value      *Identifier `json:"Value,omitempty"`
}

IdentifierDatabaseOption represents a database option with an identifier value

type IdentifierLiteral

type IdentifierLiteral struct {
	LiteralType string `json:"LiteralType,omitempty"`
	QuoteType   string `json:"QuoteType,omitempty"`
	Value       string `json:"Value,omitempty"`
}

IdentifierLiteral represents an identifier used as a literal value (e.g., RANK = HIGH)

type IdentifierOrScalarExpression

type IdentifierOrScalarExpression struct {
	Identifier       *Identifier
	ScalarExpression ScalarExpression
}

IdentifierOrScalarExpression represents either an identifier or a scalar expression

type IdentifierOrValueExpression

type IdentifierOrValueExpression struct {
	Value           string           `json:"Value,omitempty"`
	Identifier      *Identifier      `json:"Identifier,omitempty"`
	ValueExpression ScalarExpression `json:"ValueExpression,omitempty"`
}

IdentifierOrValueExpression represents either an identifier or a value expression.

type IdentifierPrincipalOption

type IdentifierPrincipalOption struct {
	OptionKind string
	Identifier *Identifier
}

IdentifierPrincipalOption represents an identifier-based user option

type IdentityFunctionCall

type IdentityFunctionCall struct {
	DataType  DataTypeReference `json:"DataType,omitempty"`
	Seed      ScalarExpression  `json:"Seed,omitempty"`
	Increment ScalarExpression  `json:"Increment,omitempty"`
}

IdentityFunctionCall represents an IDENTITY function call: IDENTITY(data_type [, seed, increment])

type IdentityOptions

type IdentityOptions struct {
	IdentitySeed      ScalarExpression
	IdentityIncrement ScalarExpression
	NotForReplication bool
}

IdentityOptions represents IDENTITY options

type IdentityValueKeyOption

type IdentityValueKeyOption struct {
	IdentityPhrase ScalarExpression `json:"IdentityPhrase,omitempty"`
	OptionKind     string           `json:"OptionKind,omitempty"`
}

IdentityValueKeyOption represents an IDENTITY_VALUE key option.

type IfStatement

type IfStatement struct {
	Predicate     BooleanExpression `json:"Predicate,omitempty"`
	ThenStatement Statement         `json:"ThenStatement,omitempty"`
	ElseStatement Statement         `json:"ElseStatement,omitempty"`
}

IfStatement represents an IF statement.

type IgnoreDupKeyIndexOption

type IgnoreDupKeyIndexOption struct {
	OptionState            string // "On", "Off"
	OptionKind             string // "IgnoreDupKey"
	SuppressMessagesOption *bool  // true/false when SUPPRESS_MESSAGES specified
}

IgnoreDupKeyIndexOption represents the IGNORE_DUP_KEY option

type IndexDefinition

type IndexDefinition struct {
	Name                         *Identifier
	Columns                      []*ColumnWithSortOrder
	Unique                       bool
	IndexType                    *IndexType
	IndexOptions                 []IndexOption
	IncludeColumns               []*ColumnReferenceExpression
	FilterPredicate              BooleanExpression
	OnFileGroupOrPartitionScheme *FileGroupOrPartitionScheme
	FileStreamOn                 *IdentifierOrValueExpression
}

IndexDefinition represents an index definition within CREATE TABLE

type IndexExpressionOption

type IndexExpressionOption struct {
	OptionKind string
	Expression ScalarExpression
}

IndexExpressionOption represents an index option with expression value

type IndexOption

type IndexOption interface {
	Node
	// contains filtered or unexported methods
}

IndexOption is an interface for index options

type IndexStateOption

type IndexStateOption struct {
	OptionKind  string // "PadIndex", "SortInTempDB", "IgnoreDupKey", etc.
	OptionState string // "On", "Off"
}

IndexStateOption represents an ON/OFF index option

type IndexTableHint

type IndexTableHint struct {
	HintKind    string                         `json:"HintKind,omitempty"`
	IndexValues []*IdentifierOrValueExpression `json:"IndexValues,omitempty"`
}

IndexTableHint represents an INDEX table hint with index values.

type IndexType

type IndexType struct {
	IndexTypeKind string // "NonClustered", "Clustered", "NonClusteredHash", etc.
}

IndexType represents the type of index

type InlineDerivedTable

type InlineDerivedTable struct {
	RowValues []*RowValue   `json:"RowValues,omitempty"`
	Alias     *Identifier   `json:"Alias,omitempty"`
	Columns   []*Identifier `json:"Columns,omitempty"`
	ForPath   bool          `json:"ForPath"`
}

InlineDerivedTable represents a VALUES clause used as a table reference Example: (VALUES ('a'), ('b')) AS x(col)

type InlineFunctionOption

type InlineFunctionOption struct {
	OptionKind  string // "Inline"
	OptionState string // "On", "Off"
}

InlineFunctionOption represents an INLINE function option

type InlineResultSetDefinition

type InlineResultSetDefinition struct {
	ResultSetType           string                    `json:"ResultSetType,omitempty"` // Inline
	ResultColumnDefinitions []*ResultColumnDefinition `json:"ResultColumnDefinitions,omitempty"`
}

InlineResultSetDefinition represents an inline column definition.

type InsertBulkColumnDefinition

type InsertBulkColumnDefinition struct {
	Column      *ColumnDefinitionBase `json:"Column,omitempty"`
	NullNotNull string                `json:"NullNotNull,omitempty"` // "Null", "NotNull", "Unspecified"
}

InsertBulkColumnDefinition represents a column definition in INSERT BULK.

type InsertBulkStatement

type InsertBulkStatement struct {
	To                *SchemaObjectName             `json:"To,omitempty"`
	ColumnDefinitions []*InsertBulkColumnDefinition `json:"ColumnDefinitions,omitempty"`
	Options           []BulkInsertOption            `json:"Options,omitempty"`
}

InsertBulkStatement represents an INSERT BULK statement.

type InsertMergeAction

type InsertMergeAction struct {
	Columns []*ColumnReferenceExpression
	Source  InsertSource
}

InsertMergeAction represents INSERT in a MERGE WHEN clause

type InsertSource

type InsertSource interface {
	// contains filtered or unexported methods
}

InsertSource is an interface for INSERT sources.

type InsertSpecification

type InsertSpecification struct {
	InsertOption     string                       `json:"InsertOption,omitempty"`
	InsertSource     InsertSource                 `json:"InsertSource,omitempty"`
	Target           TableReference               `json:"Target,omitempty"`
	Columns          []*ColumnReferenceExpression `json:"Columns,omitempty"`
	TopRowFilter     *TopRowFilter                `json:"TopRowFilter,omitempty"`
	OutputClause     *OutputClause                `json:"OutputClause,omitempty"`
	OutputIntoClause *OutputIntoClause            `json:"OutputIntoClause,omitempty"`
}

InsertSpecification contains the details of an INSERT.

type InsertStatement

type InsertStatement struct {
	InsertSpecification      *InsertSpecification      `json:"InsertSpecification,omitempty"`
	WithCtesAndXmlNamespaces *WithCtesAndXmlNamespaces `json:"WithCtesAndXmlNamespaces,omitempty"`
	OptimizerHints           []OptimizerHintBase       `json:"OptimizerHints,omitempty"`
}

InsertStatement represents an INSERT statement.

type IntegerLiteral

type IntegerLiteral struct {
	LiteralType string `json:"LiteralType,omitempty"`
	Value       string `json:"Value,omitempty"`
}

IntegerLiteral represents an integer literal.

type InternalOpenRowset

type InternalOpenRowset struct {
	Identifier *Identifier        `json:"Identifier,omitempty"`
	VarArgs    []ScalarExpression `json:"VarArgs,omitempty"`
	ForPath    bool               `json:"ForPath"`
}

InternalOpenRowset represents an OPENROWSET table reference.

type JoinParenthesisTableReference

type JoinParenthesisTableReference struct {
	Join    TableReference `json:"Join,omitempty"` // The join inside the parenthesis
	ForPath bool           `json:"ForPath"`
}

JoinParenthesisTableReference represents a parenthesized join table reference

type JsonForClause

type JsonForClause struct {
	Options []*JsonForClauseOption `json:"Options,omitempty"`
}

JsonForClause represents a FOR JSON clause with its options.

type JsonForClauseOption

type JsonForClauseOption struct {
	OptionKind string         `json:"OptionKind,omitempty"`
	Value      *StringLiteral `json:"Value,omitempty"`
}

JsonForClauseOption represents an option in a FOR JSON clause.

type JsonKeyValue

type JsonKeyValue struct {
	JsonKeyName ScalarExpression `json:"JsonKeyName,omitempty"`
	JsonValue   ScalarExpression `json:"JsonValue,omitempty"`
}

JsonKeyValue represents a key-value pair in JSON_OBJECT function

type KeyOption

type KeyOption interface {
	Node
	// contains filtered or unexported methods
}

KeyOption is an interface for key options.

type KeySourceKeyOption

type KeySourceKeyOption struct {
	PassPhrase ScalarExpression `json:"PassPhrase,omitempty"`
	OptionKind string           `json:"OptionKind,omitempty"`
}

KeySourceKeyOption represents a KEY_SOURCE key option.

type KillQueryNotificationSubscriptionStatement

type KillQueryNotificationSubscriptionStatement struct {
	SubscriptionId ScalarExpression
	All            bool
}

KillQueryNotificationSubscriptionStatement represents KILL QUERY NOTIFICATION SUBSCRIPTION statement

type KillStatement

type KillStatement struct {
	Parameter      ScalarExpression `json:"Parameter,omitempty"`
	WithStatusOnly bool             `json:"WithStatusOnly"`
}

type KillStatsJobStatement

type KillStatsJobStatement struct {
	JobId ScalarExpression
}

KillStatsJobStatement represents KILL STATS JOB statement

type LabelStatement

type LabelStatement struct {
	Value string `json:"Value"`
}

LabelStatement represents a label definition (e.g., "start:").

type LedgerTableOption

type LedgerTableOption struct {
	OptionState      string            // "On", "Off"
	AppendOnly       string            // "On", "Off", "NotSet"
	LedgerViewOption *LedgerViewOption // Optional view configuration
	OptionKind       string            // "LockEscalation" (matches ScriptDom)
}

LedgerTableOption represents the LEDGER table option

type LedgerViewOption

type LedgerViewOption struct {
	ViewName                    *SchemaObjectName
	TransactionIdColumnName     *Identifier
	SequenceNumberColumnName    *Identifier
	OperationTypeColumnName     *Identifier
	OperationTypeDescColumnName *Identifier
	OptionKind                  string // "LockEscalation" (matches ScriptDom)
}

LedgerViewOption represents the LEDGER_VIEW configuration

type LeftFunctionCall

type LeftFunctionCall struct {
	Parameters []ScalarExpression
}

LeftFunctionCall represents the LEFT(string, count) function

type LineNoStatement

type LineNoStatement struct {
	LineNo ScalarExpression `json:"LineNo,omitempty"`
}

type ListTypeCopyOption

type ListTypeCopyOption struct {
	Options []*CopyColumnOption `json:"Options,omitempty"`
}

ListTypeCopyOption represents a list of column options

type ListenerIPEndpointProtocolOption

type ListenerIPEndpointProtocolOption struct {
	IsAll       bool
	IPv4PartOne *IPv4
	IPv4PartTwo *IPv4
	IPv6        *StringLiteral
	Kind        string // TcpListenerIP, HttpListenerIP, etc.
}

ListenerIPEndpointProtocolOption represents an IP address endpoint protocol option.

type LiteralAtomicBlockOption

type LiteralAtomicBlockOption struct {
	OptionKind string
	Value      ScalarExpression
}

LiteralAtomicBlockOption represents an atomic block option with a literal value.

type LiteralAuditTargetOption

type LiteralAuditTargetOption struct {
	OptionKind string
	Value      ScalarExpression
}

LiteralAuditTargetOption represents an audit target option with a literal value

type LiteralAvailabilityGroupOption

type LiteralAvailabilityGroupOption struct {
	OptionKind string           // e.g., "RequiredCopiesToCommit"
	Value      ScalarExpression // The value for the option
}

LiteralAvailabilityGroupOption represents an availability group option with a literal value

type LiteralBulkInsertOption

type LiteralBulkInsertOption struct {
	Value      ScalarExpression `json:"Value,omitempty"`
	OptionKind string           `json:"OptionKind,omitempty"`
}

LiteralBulkInsertOption represents a bulk insert option with a literal value.

type LiteralDatabaseOption

type LiteralDatabaseOption struct {
	OptionKind string           `json:"OptionKind,omitempty"`
	Value      ScalarExpression `json:"Value,omitempty"`
}

LiteralDatabaseOption represents a database option with a literal value (e.g., EDITION).

type LiteralEndpointProtocolOption

type LiteralEndpointProtocolOption struct {
	Value ScalarExpression `json:"Value,omitempty"`
	Kind  string           `json:"Kind,omitempty"` // TcpListenerPort, HttpListenerPort, etc.
}

LiteralEndpointProtocolOption represents a literal endpoint protocol option.

type LiteralOpenRowsetCosmosOption

type LiteralOpenRowsetCosmosOption struct {
	Value      ScalarExpression `json:"Value,omitempty"`
	OptionKind string           `json:"OptionKind,omitempty"`
}

LiteralOpenRowsetCosmosOption represents an option with a literal value.

type LiteralOptimizerHint

type LiteralOptimizerHint struct {
	HintKind string           `json:"HintKind,omitempty"`
	Value    ScalarExpression `json:"Value,omitempty"`
}

LiteralOptimizerHint represents an optimizer hint with a value.

type LiteralOptionValue

type LiteralOptionValue struct {
	Value ScalarExpression
}

LiteralOptionValue represents a literal option value

type LiteralPayloadOption

type LiteralPayloadOption struct {
	Value ScalarExpression `json:"Value,omitempty"`
	Kind  string           `json:"Kind,omitempty"`
}

LiteralPayloadOption represents a literal value payload option.

type LiteralPrincipalOption

type LiteralPrincipalOption struct {
	OptionKind string
	Value      ScalarExpression
}

LiteralPrincipalOption represents a literal user option

type LiteralRange

type LiteralRange struct {
	From ScalarExpression `json:"From,omitempty"`
	To   ScalarExpression `json:"To,omitempty"`
}

LiteralRange represents a range of values (e.g., 50 TO 60)

type LiteralReplicaOption

type LiteralReplicaOption struct {
	OptionKind string           // e.g., "EndpointUrl", "SessionTimeout", "ApplyDelay"
	Value      ScalarExpression // The value for the option
}

LiteralReplicaOption represents a replica option with a literal value

type LiteralSessionOption

type LiteralSessionOption struct {
	OptionKind string
	Value      ScalarExpression
	Unit       string
}

LiteralSessionOption represents a literal session option like MAX_MEMORY

type LiteralStatisticsOption

type LiteralStatisticsOption struct {
	OptionKind string           `json:"OptionKind,omitempty"`
	Literal    ScalarExpression `json:"Literal,omitempty"`
}

LiteralStatisticsOption represents a statistics option with a literal value.

type LiteralTableHint

type LiteralTableHint struct {
	HintKind string           `json:"HintKind,omitempty"`
	Value    ScalarExpression `json:"Value,omitempty"`
}

LiteralTableHint represents a table hint with a literal value (e.g., SPATIAL_WINDOW_MAX_CELLS = 512).

type LockEscalationTableOption

type LockEscalationTableOption struct {
	OptionKind string // "LockEscalation"
	Value      string // "Auto", "Table", "Disable"
}

LockEscalationTableOption represents LOCK_ESCALATION option

type LoginTypePayloadOption

type LoginTypePayloadOption struct {
	IsWindows bool   `json:"IsWindows"`
	Kind      string `json:"Kind,omitempty"` // LoginType
}

LoginTypePayloadOption represents a LOGIN_TYPE payload option for SOAP.

type LowPriorityLockWait

type LowPriorityLockWait struct {
	MaxDuration     ScalarExpression
	MaxDurationUnit string // "MINUTES", "SECONDS"
	AfterWaitAbort  string // "NONE", "SELF", "BLOCKERS"
}

LowPriorityLockWait represents LOW_PRIORITY_LOCK_WAIT option (legacy)

type LowPriorityLockWaitAbortAfterWaitOption

type LowPriorityLockWaitAbortAfterWaitOption struct {
	AbortAfterWait string // None, Self, Blockers
	OptionKind     string // AbortAfterWait
}

LowPriorityLockWaitAbortAfterWaitOption represents ABORT_AFTER_WAIT option

type LowPriorityLockWaitMaxDurationOption

type LowPriorityLockWaitMaxDurationOption struct {
	MaxDuration ScalarExpression
	Unit        string // Minutes or Seconds
	OptionKind  string // MaxDuration
}

LowPriorityLockWaitMaxDurationOption represents MAX_DURATION option

type LowPriorityLockWaitOption

type LowPriorityLockWaitOption interface {
	// contains filtered or unexported methods
}

LowPriorityLockWaitOption is the interface for options within WAIT_AT_LOW_PRIORITY

type LowPriorityLockWaitTableSwitchOption

type LowPriorityLockWaitTableSwitchOption struct {
	OptionKind string
	Options    []LowPriorityLockWaitOption
}

LowPriorityLockWaitTableSwitchOption represents WAIT_AT_LOW_PRIORITY option

type MaxDispatchLatencySessionOption

type MaxDispatchLatencySessionOption struct {
	OptionKind string
	Value      ScalarExpression
	IsInfinite bool
}

MaxDispatchLatencySessionOption represents MAX_DISPATCH_LATENCY option

type MaxDopConfigurationOption

type MaxDopConfigurationOption struct {
	OptionKind string           // "MaxDop"
	Value      ScalarExpression // Integer value
	Primary    bool             // true if set to PRIMARY
}

MaxDopConfigurationOption represents MAXDOP configuration option

type MaxDurationOption

type MaxDurationOption struct {
	MaxDuration ScalarExpression
	Unit        string // "", "Minutes"
	OptionKind  string // "MaxDuration"
}

MaxDurationOption represents MAX_DURATION option for resumable index operations

type MaxLiteral

type MaxLiteral struct {
	LiteralType string `json:"LiteralType,omitempty"`
	Value       string `json:"Value,omitempty"`
}

MaxLiteral represents the MAX keyword used in data type declarations like VARCHAR(MAX).

type MaxRolloverFilesAuditTargetOption

type MaxRolloverFilesAuditTargetOption struct {
	OptionKind  string
	Value       ScalarExpression
	IsUnlimited bool
}

MaxRolloverFilesAuditTargetOption represents the MAX_ROLLOVER_FILES option

type MaxSizeAuditTargetOption

type MaxSizeAuditTargetOption struct {
	OptionKind  string
	Size        ScalarExpression
	Unit        string // MB, GB, TB, Unspecified
	IsUnlimited bool
}

MaxSizeAuditTargetOption represents the MAXSIZE option

type MaxSizeDatabaseOption

type MaxSizeDatabaseOption struct {
	OptionKind string           `json:"OptionKind,omitempty"`
	MaxSize    ScalarExpression `json:"MaxSize,omitempty"`
	Units      string           `json:"Units,omitempty"` // "GB", "TB", etc.
}

MaxSizeDatabaseOption represents a MAXSIZE option.

type MaxSizeFileDeclarationOption

type MaxSizeFileDeclarationOption struct {
	MaxSize    ScalarExpression
	Units      string // "KB", "MB", "GB", "TB", "Unspecified"
	Unlimited  bool
	OptionKind string // "MaxSize"
}

MaxSizeFileDeclarationOption represents the MAXSIZE option for a file

type MemoryOptimizedTableOption

type MemoryOptimizedTableOption struct {
	OptionKind  string // "MemoryOptimized"
	OptionState string // "On", "Off"
}

MemoryOptimizedTableOption represents MEMORY_OPTIMIZED option

type MemoryPartitionSessionOption

type MemoryPartitionSessionOption struct {
	OptionKind string
	Value      string // e.g. "None"
}

MemoryPartitionSessionOption represents MEMORY_PARTITION_MODE option

type MergeAction

type MergeAction interface {
	Node
	// contains filtered or unexported methods
}

MergeAction is an interface for merge actions

type MergeActionClause

type MergeActionClause struct {
	Condition       string // "Matched", "NotMatched", "NotMatchedBySource", "NotMatchedByTarget"
	SearchCondition BooleanExpression
	Action          MergeAction
}

MergeActionClause represents a WHEN clause in a MERGE statement

type MergeSpecification

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
	OutputClause    *OutputClause
	TopRowFilter    *TopRowFilter
}

MergeSpecification represents the specification of a MERGE statement

type MergeStatement

type MergeStatement struct {
	MergeSpecification       *MergeSpecification
	WithCtesAndXmlNamespaces *WithCtesAndXmlNamespaces
	OptimizerHints           []OptimizerHintBase
}

MergeStatement represents a MERGE statement

type MethodSpecifier

type MethodSpecifier struct {
	AssemblyName *Identifier
	ClassName    *Identifier
	MethodName   *Identifier
}

MethodSpecifier represents a CLR method specifier

type MirrorToClause

type MirrorToClause struct {
	Devices []*DeviceInfo
}

MirrorToClause represents a MIRROR TO clause in a BACKUP statement

type MoneyLiteral

type MoneyLiteral struct {
	LiteralType string `json:"LiteralType,omitempty"`
	Value       string `json:"Value,omitempty"`
}

MoneyLiteral represents a money/currency literal.

type MoveConversationStatement

type MoveConversationStatement struct {
	Conversation ScalarExpression `json:"Conversation,omitempty"`
	Group        ScalarExpression `json:"Group,omitempty"`
}

type MoveRestoreOption

type MoveRestoreOption struct {
	OptionKind      string
	LogicalFileName ScalarExpression
	OSFileName      ScalarExpression
}

MoveRestoreOption represents a MOVE restore option

type MoveToDropIndexOption

type MoveToDropIndexOption struct {
	MoveTo     *FileGroupOrPartitionScheme
	OptionKind string // MoveTo
}

MoveToDropIndexOption represents the MOVE TO option

type MultiPartIdentifier

type MultiPartIdentifier struct {
	Count       int           `json:"Count,omitempty"`
	Identifiers []*Identifier `json:"Identifiers,omitempty"`
}

MultiPartIdentifier represents a multi-part identifier (e.g., schema.table.column).

type MultiPartIdentifierCallTarget

type MultiPartIdentifierCallTarget struct {
	MultiPartIdentifier *MultiPartIdentifier
}

MultiPartIdentifierCallTarget represents a multi-part identifier call target.

type NameFileDeclarationOption

type NameFileDeclarationOption struct {
	LogicalFileName *IdentifierOrValueExpression
	IsNewName       bool
	OptionKind      string // "Name" or "NewName"
}

NameFileDeclarationOption represents the NAME option for a file

type NamedTableReference

type NamedTableReference struct {
	SchemaObject      *SchemaObjectName  `json:"SchemaObject,omitempty"`
	TableSampleClause *TableSampleClause `json:"TableSampleClause,omitempty"`
	TemporalClause    *TemporalClause    `json:"TemporalClause,omitempty"`
	Alias             *Identifier        `json:"Alias,omitempty"`
	TableHints        []TableHintType    `json:"TableHints,omitempty"`
	ForPath           bool               `json:"ForPath,omitempty"`
}

NamedTableReference represents a named table reference.

type NextValueForExpression

type NextValueForExpression struct {
	SequenceName *SchemaObjectName
	OverClause   *OverClause
}

NextValueForExpression represents a NEXT VALUE FOR sequence expression.

type Node

type Node interface {
	// contains filtered or unexported methods
}

Node is the interface implemented by all AST nodes.

type NullIfExpression

type NullIfExpression struct {
	FirstExpression  ScalarExpression
	SecondExpression ScalarExpression
}

NullIfExpression represents a NULLIF(expr1, expr2) expression.

type NullLiteral

type NullLiteral struct {
	LiteralType string `json:"LiteralType,omitempty"`
	Value       string `json:"Value,omitempty"`
}

NullLiteral represents a NULL literal.

type NullableConstraintDefinition

type NullableConstraintDefinition struct {
	Nullable bool
}

NullableConstraintDefinition represents a NULL or NOT NULL constraint

type NumericLiteral

type NumericLiteral struct {
	LiteralType string `json:"LiteralType,omitempty"`
	Value       string `json:"Value,omitempty"`
}

NumericLiteral represents a numeric literal (decimal).

type OdbcConvertSpecification

type OdbcConvertSpecification struct {
	Identifier *Identifier
}

OdbcConvertSpecification represents the target type in an ODBC convert function.

type OdbcFunctionCall

type OdbcFunctionCall struct {
	Name           *Identifier
	ParametersUsed bool
	Parameters     []ScalarExpression
}

OdbcFunctionCall represents an ODBC scalar function call like {fn convert(...)}.

type OdbcLiteral

type OdbcLiteral struct {
	LiteralType     string `json:"LiteralType,omitempty"`
	OdbcLiteralType string `json:"OdbcLiteralType,omitempty"`
	IsNational      bool   `json:"IsNational"`
	Value           string `json:"Value,omitempty"`
}

OdbcLiteral represents an ODBC literal like {guid'...'}.

type OdbcQualifiedJoinTableReference

type OdbcQualifiedJoinTableReference struct {
	TableReference TableReference
}

OdbcQualifiedJoinTableReference represents an ODBC qualified join syntax: { OJ ... }

type OffsetClause

type OffsetClause struct {
	OffsetExpression ScalarExpression `json:"OffsetExpression,omitempty"`
	FetchExpression  ScalarExpression `json:"FetchExpression,omitempty"`
}

OffsetClause represents OFFSET ... ROWS FETCH NEXT/FIRST ... ROWS ONLY

type OnFailureAuditOption

type OnFailureAuditOption struct {
	OptionKind      string
	OnFailureAction string // Continue, Shutdown, FailOperation
}

OnFailureAuditOption represents the ON_FAILURE option

type OnOffAssemblyOption

type OnOffAssemblyOption struct {
	OptionKind  string `json:"OptionKind,omitempty"`  // "Visibility"
	OptionState string `json:"OptionState,omitempty"` // "On", "Off"
}

OnOffAssemblyOption represents a VISIBILITY = ON|OFF option.

type OnOffAtomicBlockOption

type OnOffAtomicBlockOption struct {
	OptionKind  string
	OptionState string // "On" or "Off"
}

OnOffAtomicBlockOption represents an atomic block option with an ON/OFF value.

type OnOffAuditTargetOption

type OnOffAuditTargetOption struct {
	OptionKind string
	Value      string // On, Off
}

OnOffAuditTargetOption represents an ON/OFF target option

type OnOffDatabaseOption

type OnOffDatabaseOption struct {
	OptionKind  string // "TemporalHistoryRetention", etc.
	OptionState string // "On" or "Off"
}

OnOffDatabaseOption represents a simple ON/OFF database option

type OnOffDialogOption

type OnOffDialogOption struct {
	OptionState string `json:"OptionState,omitempty"` // On, Off
	OptionKind  string `json:"OptionKind,omitempty"`  // Encryption
}

OnOffDialogOption represents a dialog option with an ON/OFF value.

type OnOffFullTextCatalogOption

type OnOffFullTextCatalogOption struct {
	OptionKind  string `json:"OptionKind,omitempty"`  // AccentSensitivity
	OptionState string `json:"OptionState,omitempty"` // On, Off
}

OnOffFullTextCatalogOption represents an option for ALTER FULLTEXT CATALOG

type OnOffOptionValue

type OnOffOptionValue struct {
	OptionState string // "On" or "Off"
}

OnOffOptionValue represents ON/OFF option value

type OnOffPrimaryConfigurationOption

type OnOffPrimaryConfigurationOption struct {
	OptionKind  string // "LegacyCardinalityEstimate", "ParameterSniffing", "QueryOptimizerHotFixes"
	OptionState string // "On", "Off", "Primary"
}

OnOffPrimaryConfigurationOption represents ON/OFF/PRIMARY configuration option

type OnOffPrincipalOption

type OnOffPrincipalOption struct {
	OptionKind  string
	OptionState string // "On" or "Off"
}

OnOffPrincipalOption represents an ON/OFF principal option

type OnOffRemoteServiceBindingOption

type OnOffRemoteServiceBindingOption struct {
	OptionKind  string
	OptionState string // "On" or "Off"
}

OnOffRemoteServiceBindingOption represents ANONYMOUS = ON/OFF option.

type OnOffSessionOption

type OnOffSessionOption struct {
	OptionKind  string
	OptionState string // "On" or "Off"
}

OnOffSessionOption represents an ON/OFF session option

type OnOffStatisticsOption

type OnOffStatisticsOption struct {
	OptionKind  string `json:"OptionKind,omitempty"`
	OptionState string `json:"OptionState,omitempty"`
}

OnOffStatisticsOption represents a statistics option with ON/OFF value.

type OnlineIndexLowPriorityLockWaitOption

type OnlineIndexLowPriorityLockWaitOption struct {
	Options []LowPriorityLockWaitOption
}

OnlineIndexLowPriorityLockWaitOption represents WAIT_AT_LOW_PRIORITY options for ONLINE = ON

type OnlineIndexOption

type OnlineIndexOption struct {
	LowPriorityLockWaitOption *OnlineIndexLowPriorityLockWaitOption // For ONLINE = ON (WAIT_AT_LOW_PRIORITY (...))
	OptionState               string                                // On, Off
	OptionKind                string                                // Online
}

OnlineIndexOption represents the ONLINE option

type OpenCursorStatement

type OpenCursorStatement struct {
	Cursor *CursorId `json:"Cursor,omitempty"`
}

OpenCursorStatement represents OPEN cursor_name.

type OpenJsonTableReference

type OpenJsonTableReference struct {
	Variable               ScalarExpression                 `json:"Variable,omitempty"`
	RowPattern             ScalarExpression                 `json:"RowPattern,omitempty"`
	SchemaDeclarationItems []*SchemaDeclarationItemOpenjson `json:"SchemaDeclarationItems,omitempty"`
	Alias                  *Identifier                      `json:"Alias,omitempty"`
	ForPath                bool                             `json:"ForPath,omitempty"`
}

OpenJsonTableReference represents an OPENJSON table reference in the FROM clause.

type OpenMasterKeyStatement

type OpenMasterKeyStatement struct {
	Password ScalarExpression
}

OpenMasterKeyStatement represents OPEN MASTER KEY statement

type OpenQueryTableReference

type OpenQueryTableReference struct {
	LinkedServer *Identifier      `json:"LinkedServer,omitempty"`
	Query        ScalarExpression `json:"Query,omitempty"`
	Alias        *Identifier      `json:"Alias,omitempty"`
	ForPath      bool             `json:"ForPath"`
}

OpenQueryTableReference represents OPENQUERY(linked_server, 'query') table reference

type OpenRowsetColumnDefinition

type OpenRowsetColumnDefinition struct {
	ColumnOrdinal    ScalarExpression  `json:"ColumnOrdinal,omitempty"`
	JsonPath         ScalarExpression  `json:"JsonPath,omitempty"`
	ColumnIdentifier *Identifier       `json:"ColumnIdentifier,omitempty"`
	DataType         DataTypeReference `json:"DataType,omitempty"`
	Collation        *Identifier       `json:"Collation,omitempty"`
}

OpenRowsetColumnDefinition represents a column definition in WITH clause.

type OpenRowsetCosmos

type OpenRowsetCosmos struct {
	Options     []OpenRowsetCosmosOption      `json:"Options,omitempty"`
	WithColumns []*OpenRowsetColumnDefinition `json:"WithColumns,omitempty"`
	Alias       *Identifier                   `json:"Alias,omitempty"`
	ForPath     bool                          `json:"ForPath"`
}

OpenRowsetCosmos represents an OPENROWSET with PROVIDER = ..., CONNECTION = ..., OBJECT = ... syntax.

type OpenRowsetCosmosOption

type OpenRowsetCosmosOption interface {
	// contains filtered or unexported methods
}

OpenRowsetCosmosOption is the interface for OpenRowset Cosmos options.

type OpenRowsetTableReference

type OpenRowsetTableReference struct {
	ProviderName   ScalarExpression              `json:"ProviderName,omitempty"`
	ProviderString ScalarExpression              `json:"ProviderString,omitempty"`
	DataSource     ScalarExpression              `json:"DataSource,omitempty"`
	UserId         ScalarExpression              `json:"UserId,omitempty"`
	Password       ScalarExpression              `json:"Password,omitempty"`
	Query          ScalarExpression              `json:"Query,omitempty"`
	Object         *SchemaObjectName             `json:"Object,omitempty"`
	WithColumns    []*OpenRowsetColumnDefinition `json:"WithColumns,omitempty"`
	Alias          *Identifier                   `json:"Alias,omitempty"`
	ForPath        bool                          `json:"ForPath"`
}

OpenRowsetTableReference represents OPENROWSET with various syntaxes: - OPENROWSET('provider', 'connstr', object) - OPENROWSET('provider', 'server'; 'user'; 'password', 'query')

type OpenSymmetricKeyStatement

type OpenSymmetricKeyStatement struct {
	Name                *Identifier
	DecryptionMechanism *CryptoMechanism
}

OpenSymmetricKeyStatement represents OPEN SYMMETRIC KEY statement

type OpenXmlTableReference

type OpenXmlTableReference struct {
	Variable               ScalarExpression         `json:"Variable,omitempty"`
	RowPattern             ScalarExpression         `json:"RowPattern,omitempty"`
	Flags                  ScalarExpression         `json:"Flags,omitempty"`
	SchemaDeclarationItems []*SchemaDeclarationItem `json:"SchemaDeclarationItems,omitempty"`
	TableName              *SchemaObjectName        `json:"TableName,omitempty"`
	Alias                  *Identifier              `json:"Alias,omitempty"`
	ForPath                bool                     `json:"ForPath"`
}

OpenXmlTableReference represents an OPENXML table-valued function Syntax: OPENXML(variable, rowpattern [, flags]) [WITH (schema) | WITH table_name | AS alias]

type OptimizeForOptimizerHint

type OptimizeForOptimizerHint struct {
	Pairs        []*VariableValuePair `json:"Pairs,omitempty"`
	IsForUnknown bool                 `json:"IsForUnknown,omitempty"`
	HintKind     string               `json:"HintKind,omitempty"`
}

OptimizeForOptimizerHint represents an OPTIMIZE FOR hint.

type OptimizerHint

type OptimizerHint struct {
	HintKind string `json:"HintKind,omitempty"`
}

OptimizerHint represents an optimizer hint in an OPTION clause.

type OptimizerHintBase

type OptimizerHintBase interface {
	Node
	// contains filtered or unexported methods
}

OptimizerHintBase is the interface for optimizer hints.

type OrderBulkInsertOption

type OrderBulkInsertOption struct {
	Columns    []*ColumnWithSortOrder `json:"Columns,omitempty"`
	IsUnique   bool                   `json:"IsUnique,omitempty"`
	OptionKind string                 `json:"OptionKind,omitempty"`
}

OrderBulkInsertOption represents an ORDER bulk insert option.

type OrderByClause

type OrderByClause struct {
	OrderByElements []*ExpressionWithSortOrder `json:"OrderByElements,omitempty"`
}

OrderByClause represents an ORDER BY clause.

type OrderIndexOption

type OrderIndexOption struct {
	Columns    []*ColumnReferenceExpression
	OptionKind string // "Order"
}

OrderIndexOption represents an ORDER option for clustered columnstore indexes

type OutputClause

type OutputClause struct {
	SelectColumns []SelectElement `json:"SelectColumns,omitempty"`
}

OutputClause represents an OUTPUT clause.

type OutputIntoClause

type OutputIntoClause struct {
	SelectColumns    []SelectElement              `json:"SelectColumns,omitempty"`
	IntoTable        TableReference               `json:"IntoTable,omitempty"`
	IntoTableColumns []*ColumnReferenceExpression `json:"IntoTableColumns,omitempty"`
}

OutputIntoClause represents an OUTPUT INTO clause.

type OverClause

type OverClause struct {
	WindowName        *Identifier        `json:"WindowName,omitempty"`
	Partitions        []ScalarExpression `json:"Partitions,omitempty"`
	OrderByClause     *OrderByClause     `json:"OrderByClause,omitempty"`
	WindowFrameClause *WindowFrameClause `json:"WindowFrameClause,omitempty"`
}

OverClause represents an OVER clause for window functions.

type PageVerifyDatabaseOption

type PageVerifyDatabaseOption struct {
	OptionKind string // "PageVerify"
	Value      string // "Checksum", "None", "TornPageDetection"
}

PageVerifyDatabaseOption represents PAGE_VERIFY database option

type ParameterizationDatabaseOption

type ParameterizationDatabaseOption struct {
	OptionKind string // "Parameterization"
	IsSimple   bool   // true for SIMPLE, false for FORCED
}

ParameterizationDatabaseOption represents PARAMETERIZATION database option

type ParameterlessCall

type ParameterlessCall struct {
	ParameterlessCallType string
	Collation             *Identifier
}

ParameterlessCall represents a parameterless function call like USER, CURRENT_USER, etc.

type ParenthesisExpression

type ParenthesisExpression struct {
	Expression ScalarExpression `json:"Expression,omitempty"`
}

ParenthesisExpression represents a parenthesized scalar expression.

type ParseCall

type ParseCall struct {
	StringValue ScalarExpression  `json:"StringValue,omitempty"`
	DataType    DataTypeReference `json:"DataType,omitempty"`
	Culture     ScalarExpression  `json:"Culture,omitempty"`
}

ParseCall represents the PARSE(string AS type [USING culture]) function

type PartitionFunctionCall

type PartitionFunctionCall struct {
	DatabaseName *Identifier        `json:"DatabaseName,omitempty"`
	SchemaName   *Identifier        `json:"SchemaName,omitempty"`
	FunctionName *Identifier        `json:"FunctionName,omitempty"`
	Parameters   []ScalarExpression `json:"Parameters,omitempty"`
}

PartitionFunctionCall represents a $PARTITION function call. Syntax: [database.]$PARTITION.function(args)

type PartitionParameterType

type PartitionParameterType struct {
	DataType  *SqlDataTypeReference `json:"DataType,omitempty"`
	Collation *Identifier           `json:"Collation,omitempty"`
}

PartitionParameterType represents the parameter type in a partition function.

type PartitionSpecifier

type PartitionSpecifier struct {
	All     bool
	Number  ScalarExpression
	Numbers []ScalarExpression
}

PartitionSpecifier represents a partition specifier

type PartnerDatabaseOption

type PartnerDatabaseOption struct {
	OptionKind    string           // "Partner"
	PartnerServer ScalarExpression // For PARTNER = 'server'
	PartnerOption string           // "PartnerServer", "Failover", "ForceServiceAllowDataLoss", "Resume", "SafetyFull", "SafetyOff", "Suspend", "Timeout"
	Timeout       ScalarExpression // For PARTNER TIMEOUT value
}

PartnerDatabaseOption represents PARTNER database mirroring option

type PasswordAlterPrincipalOption

type PasswordAlterPrincipalOption struct {
	Password    ScalarExpression
	OldPassword *StringLiteral
	MustChange  bool
	Unlock      bool
	Hashed      bool
	OptionKind  string
}

PasswordAlterPrincipalOption represents a password option for ALTER USER/LOGIN

type PasswordCreateLoginSource

type PasswordCreateLoginSource struct {
	Password   ScalarExpression  `json:"Password,omitempty"`
	Hashed     bool              `json:"Hashed"`
	MustChange bool              `json:"MustChange"`
	Options    []PrincipalOption `json:"Options,omitempty"`
}

PasswordCreateLoginSource represents WITH PASSWORD = '...' source

type PayloadOption

type PayloadOption interface {
	Node
	// contains filtered or unexported methods
}

PayloadOption is an interface for endpoint payload options.

type Permission

type Permission struct {
	Identifiers []*Identifier
	Columns     []*Identifier
}

Permission represents a permission in GRANT/REVOKE

type PermissionSetAssemblyOption

type PermissionSetAssemblyOption struct {
	OptionKind          string `json:"OptionKind,omitempty"`          // "PermissionSet"
	PermissionSetOption string `json:"PermissionSetOption,omitempty"` // "Safe", "ExternalAccess", "Unsafe"
}

PermissionSetAssemblyOption represents a PERMISSION_SET option.

type PivotedTableReference

type PivotedTableReference struct {
	TableReference              TableReference
	InColumns                   []*Identifier
	PivotColumn                 *ColumnReferenceExpression
	ValueColumns                []*ColumnReferenceExpression
	AggregateFunctionIdentifier *MultiPartIdentifier
	Alias                       *Identifier
	ForPath                     bool
}

PivotedTableReference represents a table with PIVOT

type PortsEndpointProtocolOption

type PortsEndpointProtocolOption struct {
	PortTypes string `json:"PortTypes,omitempty"` // Comma-separated list: Clear, Ssl
	Kind      string `json:"Kind,omitempty"`      // HttpPorts
}

PortsEndpointProtocolOption represents HTTP ports option.

type PredicateSetStatement

type PredicateSetStatement struct {
	Options string
	IsOn    bool
}

PredicateSetStatement represents a SET statement like SET ANSI_NULLS ON Options can contain multiple comma-separated values like "ConcatNullYieldsNull, CursorCloseOnCommit"

type PredictTableReference

type PredictTableReference struct {
	ModelVariable          ScalarExpression         `json:"ModelVariable,omitempty"`
	DataSource             *NamedTableReference     `json:"DataSource,omitempty"`
	RunTime                *Identifier              `json:"RunTime,omitempty"`
	SchemaDeclarationItems []*SchemaDeclarationItem `json:"SchemaDeclarationItems,omitempty"`
	Alias                  *Identifier              `json:"Alias,omitempty"`
	ForPath                bool                     `json:"ForPath,omitempty"`
}

PredictTableReference represents PREDICT(...) in a FROM clause

type PrimaryRoleReplicaOption

type PrimaryRoleReplicaOption struct {
	OptionKind       string // "PrimaryRole"
	AllowConnections string // "All", "ReadWrite"
}

PrimaryRoleReplicaOption represents PRIMARY_ROLE option

type PrincipalOption

type PrincipalOption interface {
	// contains filtered or unexported methods
}

PrincipalOption is an interface for principal options (SID, TYPE, etc.)

type PrincipalOptionSimple

type PrincipalOptionSimple struct {
	OptionKind string
}

PrincipalOptionSimple represents a simple principal option with just an option kind

type PrintStatement

type PrintStatement struct {
	Expression ScalarExpression
}

PrintStatement represents a PRINT statement.

type ProcedureOption

type ProcedureOption struct {
	OptionKind string // Recompile, Encryption
}

ProcedureOption represents a simple procedure option like RECOMPILE or ENCRYPTION.

type ProcedureOptionBase

type ProcedureOptionBase interface {
	Node
	// contains filtered or unexported methods
}

ProcedureOptionBase is the interface for procedure options.

type ProcedureParameter

type ProcedureParameter struct {
	VariableName *Identifier
	DataType     DataTypeReference
	Value        ScalarExpression // Default value
	IsVarying    bool
	Modifier     string // None, Output, ReadOnly
	Nullable     *NullableConstraintDefinition
}

ProcedureParameter represents a parameter in a procedure definition.

type ProcedureReference

type ProcedureReference struct {
	Name   *SchemaObjectName `json:"Name,omitempty"`
	Number *IntegerLiteral   `json:"Number,omitempty"`
}

ProcedureReference references a stored procedure by name.

type ProcedureReferenceName

type ProcedureReferenceName struct {
	ProcedureVariable  *VariableReference  `json:"ProcedureVariable,omitempty"`
	ProcedureReference *ProcedureReference `json:"ProcedureReference,omitempty"`
}

ProcedureReferenceName holds either a variable or a procedure reference.

type ProcessAffinityRange

type ProcessAffinityRange struct {
	From ScalarExpression // IntegerLiteral
	To   ScalarExpression // IntegerLiteral (optional)
}

ProcessAffinityRange represents a CPU or NUMA node range

type ProviderEncryptionSource

type ProviderEncryptionSource struct {
	Name       *Identifier `json:"Name,omitempty"`
	KeyOptions []KeyOption `json:"KeyOptions,omitempty"`
}

ProviderEncryptionSource represents a key source from a provider.

type ProviderKeyNameKeyOption

type ProviderKeyNameKeyOption struct {
	KeyName    ScalarExpression `json:"KeyName,omitempty"`
	OptionKind string           `json:"OptionKind,omitempty"`
}

ProviderKeyNameKeyOption represents a PROVIDER_KEY_NAME key option.

type QualifiedJoin

type QualifiedJoin struct {
	SearchCondition      BooleanExpression `json:"SearchCondition,omitempty"`
	QualifiedJoinType    string            `json:"QualifiedJoinType,omitempty"`
	JoinHint             string            `json:"JoinHint,omitempty"`
	FirstTableReference  TableReference    `json:"FirstTableReference,omitempty"`
	SecondTableReference TableReference    `json:"SecondTableReference,omitempty"`
}

QualifiedJoin represents a qualified join.

type QueryDerivedTable

type QueryDerivedTable struct {
	QueryExpression QueryExpression `json:"QueryExpression,omitempty"`
	Columns         []*Identifier   `json:"Columns,omitempty"`
	Alias           *Identifier     `json:"Alias,omitempty"`
	ForPath         bool            `json:"ForPath,omitempty"`
}

QueryDerivedTable represents a derived table (parenthesized query) used as a table reference.

type QueryExpression

type QueryExpression interface {
	Node
	// contains filtered or unexported methods
}

QueryExpression is the interface for query expressions.

type QueryParenthesisExpression

type QueryParenthesisExpression struct {
	QueryExpression QueryExpression `json:"QueryExpression,omitempty"`
}

QueryParenthesisExpression represents a parenthesized query expression.

type QuerySpecification

type QuerySpecification struct {
	UniqueRowFilter string          `json:"UniqueRowFilter,omitempty"`
	TopRowFilter    *TopRowFilter   `json:"TopRowFilter,omitempty"`
	SelectElements  []SelectElement `json:"SelectElements,omitempty"`
	FromClause      *FromClause     `json:"FromClause,omitempty"`
	WhereClause     *WhereClause    `json:"WhereClause,omitempty"`
	GroupByClause   *GroupByClause  `json:"GroupByClause,omitempty"`
	HavingClause    *HavingClause   `json:"HavingClause,omitempty"`
	WindowClause    *WindowClause   `json:"WindowClause,omitempty"`
	OrderByClause   *OrderByClause  `json:"OrderByClause,omitempty"`
	OffsetClause    *OffsetClause   `json:"OffsetClause,omitempty"`
	ForClause       ForClause       `json:"ForClause,omitempty"`
}

QuerySpecification represents a query specification (SELECT ... FROM ...).

type QueryStoreCapturePolicyOption

type QueryStoreCapturePolicyOption struct {
	OptionKind string // "Query_Capture_Mode"
	Value      string // "ALL", "AUTO", "NONE", "CUSTOM"
}

QueryStoreCapturePolicyOption represents QUERY_CAPTURE_MODE option

type QueryStoreDataFlushIntervalOption

type QueryStoreDataFlushIntervalOption struct {
	OptionKind    string           // "Flush_Interval_Seconds"
	FlushInterval ScalarExpression // Integer literal
}

QueryStoreDataFlushIntervalOption represents FLUSH_INTERVAL_SECONDS/DATA_FLUSH_INTERVAL_SECONDS option

type QueryStoreDatabaseOption

type QueryStoreDatabaseOption struct {
	OptionKind  string             // "QueryStore"
	OptionState string             // "On", "Off", "NotSet"
	Clear       bool               // QUERY_STORE CLEAR [ALL]
	ClearAll    bool               // QUERY_STORE CLEAR ALL
	Options     []QueryStoreOption // Sub-options
}

QueryStoreDatabaseOption represents QUERY_STORE database option

type QueryStoreDesiredStateOption

type QueryStoreDesiredStateOption struct {
	OptionKind             string // "Desired_State"
	Value                  string // "ReadOnly", "ReadWrite", "Off"
	OperationModeSpecified bool   // Whether OPERATION_MODE was explicitly specified
}

QueryStoreDesiredStateOption represents DESIRED_STATE option

type QueryStoreIntervalLengthOption

type QueryStoreIntervalLengthOption struct {
	OptionKind          string           // "Interval_Length_Minutes"
	StatsIntervalLength ScalarExpression // Integer literal
}

QueryStoreIntervalLengthOption represents INTERVAL_LENGTH_MINUTES option

type QueryStoreMaxPlansPerQueryOption

type QueryStoreMaxPlansPerQueryOption struct {
	OptionKind       string           // "Max_Plans_Per_Query"
	MaxPlansPerQuery ScalarExpression // Integer literal
}

QueryStoreMaxPlansPerQueryOption represents MAX_PLANS_PER_QUERY option

type QueryStoreMaxStorageSizeOption

type QueryStoreMaxStorageSizeOption struct {
	OptionKind string           // "Current_Storage_Size_MB" (note: uses Current_Storage_Size_MB as OptionKind)
	MaxQdsSize ScalarExpression // Integer literal
}

QueryStoreMaxStorageSizeOption represents MAX_STORAGE_SIZE_MB option

type QueryStoreOption

type QueryStoreOption interface {
	Node
	// contains filtered or unexported methods
}

QueryStoreOption is an interface for query store sub-options

type QueryStoreSizeCleanupPolicyOption

type QueryStoreSizeCleanupPolicyOption struct {
	OptionKind string // "Size_Based_Cleanup_Mode"
	Value      string // "OFF", "AUTO"
}

QueryStoreSizeCleanupPolicyOption represents SIZE_BASED_CLEANUP_MODE option

type QueryStoreTimeCleanupPolicyOption

type QueryStoreTimeCleanupPolicyOption struct {
	OptionKind          string           // "Stale_Query_Threshold_Days"
	StaleQueryThreshold ScalarExpression // Integer literal
}

QueryStoreTimeCleanupPolicyOption represents STALE_QUERY_THRESHOLD_DAYS option (in CLEANUP_POLICY)

type QueryStoreWaitStatsCaptureOption

type QueryStoreWaitStatsCaptureOption struct {
	OptionKind  string // "Wait_Stats_Capture_Mode"
	OptionState string // "On", "Off"
}

QueryStoreWaitStatsCaptureOption represents WAIT_STATS_CAPTURE_MODE option

type QueueDelayAuditOption

type QueueDelayAuditOption struct {
	OptionKind string
	Delay      ScalarExpression
}

QueueDelayAuditOption represents the QUEUE_DELAY option

type QueueExecuteAsOption

type QueueExecuteAsOption struct {
	OptionValue *ExecuteAsClause `json:"OptionValue,omitempty"`
	OptionKind  string           `json:"OptionKind,omitempty"` // "ActivationExecuteAs"
}

QueueExecuteAsOption represents an EXECUTE AS option.

type QueueOption

type QueueOption interface {
	// contains filtered or unexported methods
}

QueueOption is an interface for queue options.

type QueueOptionSimple

type QueueOptionSimple struct {
	OptionKind string `json:"OptionKind,omitempty"` // e.g. "ActivationDrop"
}

QueueOptionSimple represents a simple queue option like ActivationDrop.

type QueueProcedureOption

type QueueProcedureOption struct {
	OptionValue *SchemaObjectName `json:"OptionValue,omitempty"`
	OptionKind  string            `json:"OptionKind,omitempty"` // "ActivationProcedureName"
}

QueueProcedureOption represents a PROCEDURE_NAME option.

type QueueStateOption

type QueueStateOption struct {
	OptionState string `json:"OptionState,omitempty"` // "On" or "Off"
	OptionKind  string `json:"OptionKind,omitempty"`  // "Status", "Retention", "PoisonMessageHandlingStatus"
}

QueueStateOption represents a queue state option (STATUS, RETENTION, POISON_MESSAGE_HANDLING).

type QueueValueOption

type QueueValueOption struct {
	OptionValue ScalarExpression `json:"OptionValue,omitempty"`
	OptionKind  string           `json:"OptionKind,omitempty"` // "ActivationMaxQueueReaders"
}

QueueValueOption represents an option with an integer value.

type RaiseErrorStatement

type RaiseErrorStatement struct {
	FirstParameter     ScalarExpression
	SecondParameter    ScalarExpression
	ThirdParameter     ScalarExpression
	OptionalParameters []ScalarExpression
	RaiseErrorOptions  string
}

RaiseErrorStatement represents a RAISERROR statement.

type ReadOnlyForClause

type ReadOnlyForClause struct{}

ReadOnlyForClause represents a FOR READ ONLY clause.

type ReadTextStatement

type ReadTextStatement struct {
	Column      *ColumnReferenceExpression
	TextPointer ScalarExpression
	Offset      ScalarExpression
	Size        ScalarExpression
	HoldLock    bool
}

ReadTextStatement represents a READTEXT statement.

type RealLiteral

type RealLiteral struct {
	LiteralType string `json:"LiteralType,omitempty"`
	Value       string `json:"Value,omitempty"`
}

RealLiteral represents a real (scientific notation) literal.

type ReceiveStatement

type ReceiveStatement struct {
	Top                        ScalarExpression
	SelectElements             []SelectElement
	Queue                      *SchemaObjectName
	Into                       *VariableTableReference
	Where                      ScalarExpression // Just the RHS of the WHERE comparison
	IsConversationGroupIdWhere bool
}

ReceiveStatement represents a RECEIVE ... FROM queue statement.

type ReconfigureStatement

type ReconfigureStatement struct {
	WithOverride bool `json:"WithOverride"`
}

type RecoveryDatabaseOption

type RecoveryDatabaseOption struct {
	OptionKind string // "Recovery"
	Value      string // "Full", "BulkLogged", "Simple"
}

RecoveryDatabaseOption represents RECOVERY database option

type RemoteDataArchiveAlterTableOption

type RemoteDataArchiveAlterTableOption struct {
	RdaTableOption             string // "Enable", "Disable", "DisableWithoutDataRecovery"
	MigrationState             string // "Paused", "Outbound", "Inbound"
	IsMigrationStateSpecified  bool
	FilterPredicate            ScalarExpression // Optional filter predicate function call
	IsFilterPredicateSpecified bool
	OptionKind                 string // "RemoteDataArchive"
}

RemoteDataArchiveAlterTableOption represents REMOTE_DATA_ARCHIVE option for ALTER TABLE SET

type RemoteDataArchiveDatabaseOption

type RemoteDataArchiveDatabaseOption struct {
	OptionKind  string                       // "RemoteDataArchive"
	OptionState string                       // "On", "Off", "NotSet"
	Settings    []RemoteDataArchiveDbSetting // Settings like SERVER, CREDENTIAL, FEDERATED_SERVICE_ACCOUNT
}

RemoteDataArchiveDatabaseOption represents REMOTE_DATA_ARCHIVE database option

type RemoteDataArchiveDbCredentialSetting

type RemoteDataArchiveDbCredentialSetting struct {
	SettingKind string      // "Credential"
	Credential  *Identifier // The credential name
}

RemoteDataArchiveDbCredentialSetting represents the CREDENTIAL setting

type RemoteDataArchiveDbFederatedServiceAccountSetting

type RemoteDataArchiveDbFederatedServiceAccountSetting struct {
	SettingKind string // "FederatedServiceAccount"
	IsOn        bool   // true for ON, false for OFF
}

RemoteDataArchiveDbFederatedServiceAccountSetting represents the FEDERATED_SERVICE_ACCOUNT setting

type RemoteDataArchiveDbServerSetting

type RemoteDataArchiveDbServerSetting struct {
	SettingKind string           // "Server"
	Server      ScalarExpression // The server string literal
}

RemoteDataArchiveDbServerSetting represents the SERVER setting

type RemoteDataArchiveDbSetting

type RemoteDataArchiveDbSetting interface {
	Node
	// contains filtered or unexported methods
}

RemoteDataArchiveDbSetting is an interface for Remote Data Archive settings

type RemoteDataArchiveTableOption

type RemoteDataArchiveTableOption struct {
	RdaTableOption  string           // "Enable", "Disable", "DisableWithoutDataRecovery"
	MigrationState  string           // "Paused", "Outbound", "Inbound"
	FilterPredicate ScalarExpression // Optional filter predicate function call
	OptionKind      string           // "RemoteDataArchive"
}

RemoteDataArchiveTableOption represents REMOTE_DATA_ARCHIVE option for CREATE TABLE

type RemoteServiceBindingOption

type RemoteServiceBindingOption interface {
	// contains filtered or unexported methods
}

RemoteServiceBindingOption is an interface for binding options.

type RenameAlterRoleAction

type RenameAlterRoleAction struct {
	NewName *Identifier
}

RenameAlterRoleAction represents WITH NAME = action

type RenameEntityStatement

type RenameEntityStatement struct {
	RenameEntityType string            `json:"RenameEntityType,omitempty"` // Object, Database
	SeparatorType    string            `json:"SeparatorType,omitempty"`    // DoubleColon (only when :: is used)
	OldName          *SchemaObjectName `json:"OldName,omitempty"`
	NewName          *Identifier       `json:"NewName,omitempty"`
}

RenameEntityStatement represents a RENAME statement (Azure SQL DW/Synapse).

type ResampleStatisticsOption

type ResampleStatisticsOption struct {
	OptionKind string                      `json:"OptionKind,omitempty"`
	Partitions []*StatisticsPartitionRange `json:"Partitions,omitempty"`
}

ResampleStatisticsOption represents RESAMPLE statistics option.

type ResourcePoolAffinitySpecification

type ResourcePoolAffinitySpecification struct {
	AffinityType       string          `json:"AffinityType,omitempty"` // Scheduler, NumaNode
	IsAuto             bool            `json:"IsAuto"`
	PoolAffinityRanges []*LiteralRange `json:"PoolAffinityRanges,omitempty"`
}

ResourcePoolAffinitySpecification represents an AFFINITY specification in a resource pool

type ResourcePoolParameter

type ResourcePoolParameter struct {
	ParameterType         string                             `json:"ParameterType,omitempty"` // MinCpuPercent, MaxCpuPercent, CapCpuPercent, MinMemoryPercent, MaxMemoryPercent, MinIoPercent, MaxIoPercent, CapIoPercent, Affinity, etc.
	ParameterValue        ScalarExpression                   `json:"ParameterValue,omitempty"`
	AffinitySpecification *ResourcePoolAffinitySpecification `json:"AffinitySpecification,omitempty"`
}

ResourcePoolParameter represents a parameter in a resource pool statement

type RestoreMasterKeyStatement

type RestoreMasterKeyStatement struct {
	File               ScalarExpression
	Password           ScalarExpression
	EncryptionPassword ScalarExpression
	IsForce            bool
}

RestoreMasterKeyStatement represents a RESTORE MASTER KEY statement

type RestoreOption

type RestoreOption interface {
	// contains filtered or unexported methods
}

RestoreOption is an interface for restore options

type RestoreServiceMasterKeyStatement

type RestoreServiceMasterKeyStatement struct {
	File     ScalarExpression
	Password ScalarExpression
	IsForce  bool
}

RestoreServiceMasterKeyStatement represents a RESTORE SERVICE MASTER KEY statement

type RestoreStatement

type RestoreStatement struct {
	Kind         string // "Database", "Log", "Filegroup", "File", "Page", "HeaderOnly", etc.
	DatabaseName *IdentifierOrValueExpression
	Files        []*BackupRestoreFileInfo
	Devices      []*DeviceInfo
	Options      []RestoreOption
}

RestoreStatement represents a RESTORE DATABASE statement

type ResultColumnDefinition

type ResultColumnDefinition struct {
	ColumnDefinition *ColumnDefinitionBase         `json:"ColumnDefinition,omitempty"`
	Nullable         *NullableConstraintDefinition `json:"Nullable,omitempty"`
}

ResultColumnDefinition represents a column in a result set.

type ResultSetDefinition

type ResultSetDefinition struct {
	ResultSetType string `json:"ResultSetType,omitempty"` // ForXml, etc.
}

ResultSetDefinition represents a simple result set type like ForXml.

type ResultSetDefinitionType

type ResultSetDefinitionType interface {
	// contains filtered or unexported methods
}

ResultSetDefinitionType is an interface for result set definitions.

type ResultSetsExecuteOption

type ResultSetsExecuteOption struct {
	OptionKind           string                    `json:"OptionKind,omitempty"`
	ResultSetsOptionKind string                    `json:"ResultSetsOptionKind,omitempty"` // None, Undefined, ResultSetsDefined
	Definitions          []ResultSetDefinitionType `json:"Definitions,omitempty"`
}

ResultSetsExecuteOption represents the WITH RESULT SETS option.

type RetentionDaysAuditTargetOption

type RetentionDaysAuditTargetOption struct {
	OptionKind string
	Days       ScalarExpression
}

RetentionDaysAuditTargetOption represents the RETENTION_DAYS option

type RetentionPeriodDefinition

type RetentionPeriodDefinition struct {
	Duration   ScalarExpression
	Units      string // "Day", "Week", "Month", "Months", "Year"
	IsInfinity bool
}

RetentionPeriodDefinition represents the history retention period

type ReturnStatement

type ReturnStatement struct {
	Expression ScalarExpression `json:"Expression,omitempty"`
}

ReturnStatement represents a RETURN statement.

type RevertStatement

type RevertStatement struct {
	Cookie ScalarExpression
}

RevertStatement represents a REVERT statement.

type RevokeStatement

type RevokeStatement struct {
	Permissions          []*Permission
	Principals           []*SecurityPrincipal
	GrantOptionFor       bool
	CascadeOption        bool
	SecurityTargetObject *SecurityTargetObject
	AsClause             *Identifier
}

RevokeStatement represents a REVOKE statement

type RightFunctionCall

type RightFunctionCall struct {
	Parameters []ScalarExpression
}

RightFunctionCall represents the RIGHT(string, count) function

type RolePayloadOption

type RolePayloadOption struct {
	Role string `json:"Role,omitempty"` // NotSpecified, All, Partner, Witness
	Kind string `json:"Kind,omitempty"` // Role
}

RolePayloadOption represents a role option for database_mirroring.

type RollbackTransactionStatement

type RollbackTransactionStatement struct {
	Name *IdentifierOrValueExpression `json:"Name,omitempty"`
}

RollbackTransactionStatement represents a ROLLBACK [TRAN|TRANSACTION] statement.

type RollupGroupingSpecification

type RollupGroupingSpecification struct {
	Arguments []GroupingSpecification `json:"Arguments,omitempty"`
}

RollupGroupingSpecification represents GROUP BY ROLLUP (...) syntax.

type RouteOption

type RouteOption struct {
	OptionKind string           `json:"OptionKind,omitempty"`
	Literal    ScalarExpression `json:"Literal,omitempty"`
}

RouteOption represents an option in CREATE/ALTER ROUTE statement.

type RowValue

type RowValue struct {
	ColumnValues []ScalarExpression `json:"ColumnValues,omitempty"`
}

RowValue represents a row of values.

type SaveTransactionStatement

type SaveTransactionStatement struct {
	Name *IdentifierOrValueExpression `json:"Name,omitempty"`
}

SaveTransactionStatement represents a SAVE [TRAN|TRANSACTION] statement.

type ScalarExpression

type ScalarExpression interface {
	Node
	// contains filtered or unexported methods
}

ScalarExpression is the interface for scalar expressions.

type ScalarExpressionDialogOption

type ScalarExpressionDialogOption struct {
	Value      ScalarExpression `json:"Value,omitempty"`
	OptionKind string           `json:"OptionKind,omitempty"` // RelatedConversation, RelatedConversationGroup, Lifetime
}

ScalarExpressionDialogOption represents a dialog option with a scalar expression value.

type ScalarExpressionRestoreOption

type ScalarExpressionRestoreOption struct {
	OptionKind string
	Value      ScalarExpression
}

ScalarExpressionRestoreOption represents a scalar expression restore option

type ScalarExpressionSequenceOption

type ScalarExpressionSequenceOption struct {
	OptionKind  string
	OptionValue ScalarExpression
	NoValue     bool
}

ScalarExpressionSequenceOption represents a sequence option with a value.

type ScalarFunctionReturnType

type ScalarFunctionReturnType struct {
	DataType DataTypeReference
}

ScalarFunctionReturnType represents a scalar function return type

type ScalarSubquery

type ScalarSubquery struct {
	QueryExpression QueryExpression
	Collation       *Identifier
}

ScalarSubquery represents a scalar subquery expression.

type SchemaDeclarationItem

type SchemaDeclarationItem struct {
	ColumnDefinition *ColumnDefinitionBase `json:"ColumnDefinition,omitempty"`
	Mapping          ScalarExpression      `json:"Mapping,omitempty"` // Optional XPath mapping for OPENXML
}

SchemaDeclarationItem represents a column definition in PREDICT/OPENXML WITH clause

type SchemaDeclarationItemOpenjson

type SchemaDeclarationItemOpenjson struct {
	AsJson           bool                  `json:"AsJson,omitempty"`
	ColumnDefinition *ColumnDefinitionBase `json:"ColumnDefinition,omitempty"`
	Mapping          ScalarExpression      `json:"Mapping,omitempty"`
}

SchemaDeclarationItemOpenjson represents a column definition in OPENJSON WITH clause.

type SchemaObjectFunctionTableReference

type SchemaObjectFunctionTableReference struct {
	SchemaObject *SchemaObjectName  `json:"SchemaObject,omitempty"`
	Parameters   []ScalarExpression `json:"Parameters,omitempty"`
	Alias        *Identifier        `json:"Alias,omitempty"`
	Columns      []*Identifier      `json:"Columns,omitempty"` // For column list in AS alias(c1, c2, ...)
	ForPath      bool               `json:"ForPath"`
}

SchemaObjectFunctionTableReference represents a function call as a table reference.

type SchemaObjectName

type SchemaObjectName struct {
	ServerIdentifier   *Identifier   `json:"ServerIdentifier,omitempty"`
	DatabaseIdentifier *Identifier   `json:"DatabaseIdentifier,omitempty"`
	SchemaIdentifier   *Identifier   `json:"SchemaIdentifier,omitempty"`
	BaseIdentifier     *Identifier   `json:"BaseIdentifier,omitempty"`
	Count              int           `json:"Count,omitempty"`
	Identifiers        []*Identifier `json:"Identifiers,omitempty"`
}

SchemaObjectName represents a schema object name.

type SchemaObjectNameOrValueExpression

type SchemaObjectNameOrValueExpression struct {
	SchemaObjectName *SchemaObjectName `json:"SchemaObjectName,omitempty"`
	ValueExpression  ScalarExpression  `json:"ValueExpression,omitempty"`
}

SchemaObjectNameOrValueExpression represents either a schema object name or a value expression

type SchemaObjectResultSetDefinition

type SchemaObjectResultSetDefinition struct {
	ResultSetType string            `json:"ResultSetType,omitempty"` // Object, Type
	Name          *SchemaObjectName `json:"Name,omitempty"`
}

SchemaObjectResultSetDefinition represents AS OBJECT or AS TYPE.

type SchemaPayloadOption

type SchemaPayloadOption struct {
	IsStandard bool   `json:"IsStandard"`
	Kind       string `json:"Kind,omitempty"` // Schema
}

SchemaPayloadOption represents a SCHEMA payload option for SOAP.

type Script

type Script struct {
	Batches []*Batch `json:"Batches,omitempty"`
}

Script is the root AST node representing a T-SQL script.

type SearchPropertyListAction

type SearchPropertyListAction interface {
	Node
	// contains filtered or unexported methods
}

SearchPropertyListAction is the interface for search property list actions.

type SearchPropertyListFullTextIndexOption

type SearchPropertyListFullTextIndexOption struct {
	IsOff            bool        `json:"IsOff"`
	PropertyListName *Identifier `json:"PropertyListName,omitempty"`
	OptionKind       string      `json:"OptionKind,omitempty"` // "SearchPropertyList"
}

SearchPropertyListFullTextIndexOption represents a SEARCH PROPERTY LIST option for fulltext index

type SearchedCaseExpression

type SearchedCaseExpression struct {
	WhenClauses    []*SearchedWhenClause
	ElseExpression ScalarExpression
	Collation      *Identifier
}

SearchedCaseExpression represents a CASE WHEN ... THEN ... ELSE ... END expression.

type SearchedWhenClause

type SearchedWhenClause struct {
	WhenExpression BooleanExpression
	ThenExpression ScalarExpression
}

SearchedWhenClause represents a WHEN ... THEN clause.

type SecondaryRoleReplicaOption

type SecondaryRoleReplicaOption struct {
	OptionKind       string // "SecondaryRole"
	AllowConnections string // "No", "ReadOnly", "All"
}

SecondaryRoleReplicaOption represents SECONDARY_ROLE option

type SecurityPolicyOption

type SecurityPolicyOption struct {
	OptionKind  string // "State" or "SchemaBinding"
	OptionState string // "On" or "Off"
}

SecurityPolicyOption represents an option like STATE=ON, SCHEMABINDING=OFF

type SecurityPredicateAction

type SecurityPredicateAction struct {
	ActionType                 string // "Create", "Drop", "Alter"
	SecurityPredicateType      string // "Filter" or "Block"
	FunctionCall               *FunctionCall
	TargetObjectName           *SchemaObjectName
	SecurityPredicateOperation string // "All", "AfterInsert", "AfterUpdate", "BeforeUpdate", "BeforeDelete"
}

SecurityPredicateAction represents ADD/DROP/ALTER FILTER/BLOCK PREDICATE

type SecurityPrincipal

type SecurityPrincipal struct {
	PrincipalType string
	Identifier    *Identifier
}

SecurityPrincipal represents a security principal in GRANT/REVOKE

type SecurityTargetObject

type SecurityTargetObject struct {
	ObjectKind string // e.g., "ServerRole", "NotSpecified", "Type", etc.
	ObjectName *SecurityTargetObjectName
	Columns    []*Identifier // Column list for column-level permissions
}

SecurityTargetObject represents the target object in security statements (GRANT, REVOKE, DENY)

type SecurityTargetObjectName

type SecurityTargetObjectName struct {
	MultiPartIdentifier *MultiPartIdentifier
}

SecurityTargetObjectName represents the name of a security target object

type SelectElement

type SelectElement interface {
	Node
	// contains filtered or unexported methods
}

SelectElement is the interface for select list elements.

type SelectFunctionReturnType

type SelectFunctionReturnType struct {
	SelectStatement *SelectStatement
}

SelectFunctionReturnType represents a SELECT function return type (inline table-valued function)

type SelectInsertSource

type SelectInsertSource struct {
	Select QueryExpression `json:"Select,omitempty"`
}

SelectInsertSource represents INSERT ... SELECT.

type SelectScalarExpression

type SelectScalarExpression struct {
	Expression ScalarExpression             `json:"Expression,omitempty"`
	ColumnName *IdentifierOrValueExpression `json:"ColumnName,omitempty"`
}

SelectScalarExpression represents a scalar expression in a select list.

type SelectSetVariable

type SelectSetVariable struct {
	Variable       *VariableReference `json:"Variable,omitempty"`
	Expression     ScalarExpression   `json:"Expression,omitempty"`
	AssignmentKind string             `json:"AssignmentKind,omitempty"`
}

SelectSetVariable represents a variable assignment in a SELECT statement. Example: SELECT @a = 1, @b ||= 'foo'

type SelectStarExpression

type SelectStarExpression struct {
	Qualifier *MultiPartIdentifier `json:"Qualifier,omitempty"`
}

SelectStarExpression represents SELECT *.

type SelectStatement

type SelectStatement struct {
	QueryExpression          QueryExpression           `json:"QueryExpression,omitempty"`
	Into                     *SchemaObjectName         `json:"Into,omitempty"`
	On                       *Identifier               `json:"On,omitempty"`
	OptimizerHints           []OptimizerHintBase       `json:"OptimizerHints,omitempty"`
	WithCtesAndXmlNamespaces *WithCtesAndXmlNamespaces `json:"WithCtesAndXmlNamespaces,omitempty"`
}

SelectStatement represents a SELECT statement.

type SelectiveXmlIndexPromotedPath

type SelectiveXmlIndexPromotedPath struct {
	Name           *Identifier
	Path           *StringLiteral
	XQueryDataType *StringLiteral
	SQLDataType    *SqlDataTypeReference
	MaxLength      *IntegerLiteral
	IsSingleton    bool
}

SelectiveXmlIndexPromotedPath represents a path in a selective XML index

type SemanticTableReference

type SemanticTableReference struct {
	SemanticFunctionType string                       `json:"SemanticFunctionType,omitempty"` // SemanticKeyPhraseTable, SemanticSimilarityTable, SemanticSimilarityDetailsTable
	TableName            *SchemaObjectName            `json:"TableName,omitempty"`
	Columns              []*ColumnReferenceExpression `json:"Columns,omitempty"`
	SourceKey            ScalarExpression             `json:"SourceKey,omitempty"`
	MatchedColumn        *ColumnReferenceExpression   `json:"MatchedColumn,omitempty"`
	MatchedKey           ScalarExpression             `json:"MatchedKey,omitempty"`
	Alias                *Identifier                  `json:"Alias,omitempty"`
	ForPath              bool                         `json:"ForPath"`
}

SemanticTableReference represents SEMANTICKEYPHRASETABLE, SEMANTICSIMILARITYTABLE, or SEMANTICSIMILARITYDETAILSTABLE in a FROM clause

type SendStatement

type SendStatement struct {
	ConversationHandles []ScalarExpression
	MessageTypeName     *IdentifierOrValueExpression
	MessageBody         ScalarExpression
}

SendStatement represents a SEND ON CONVERSATION statement.

type SensitivityClassificationOption

type SensitivityClassificationOption struct {
	Type  string           // "Label", "LabelId", "InformationType", "InformationTypeId", "Rank"
	Value ScalarExpression // StringLiteral or IdentifierLiteral
}

SensitivityClassificationOption represents an option in ADD SENSITIVITY CLASSIFICATION

type SequenceOption

type SequenceOption struct {
	OptionKind string
	NoValue    bool
}

SequenceOption represents a sequence option without a value.

type ServiceContract

type ServiceContract struct {
	Name   *Identifier `json:"Name,omitempty"`
	Action string      `json:"Action,omitempty"` // "Add", "Drop", "None"
}

ServiceContract represents a contract in CREATE/ALTER SERVICE.

type SessionOption

type SessionOption interface {
	// contains filtered or unexported methods
}

SessionOption interface for event session options

type SessionTimeoutPayloadOption

type SessionTimeoutPayloadOption struct {
	Timeout *IntegerLiteral `json:"Timeout,omitempty"`
	IsNever bool            `json:"IsNever"`
	Kind    string          `json:"Kind,omitempty"` // SessionTimeout
}

SessionTimeoutPayloadOption represents a SESSION_TIMEOUT payload option for SOAP.

type SetClause

type SetClause interface {
	// contains filtered or unexported methods
}

SetClause is an interface for SET clauses.

type SetCommand

type SetCommand interface {
	Node
	// contains filtered or unexported methods
}

SetCommand is an interface for SET commands

type SetCommandStatement

type SetCommandStatement struct {
	Commands []SetCommand
}

SetCommandStatement represents a SET statement with commands (not variables)

type SetErrorLevelStatement

type SetErrorLevelStatement struct {
	Level ScalarExpression
}

SetErrorLevelStatement represents SET ERRLVL statement

type SetFipsFlaggerCommand

type SetFipsFlaggerCommand struct {
	ComplianceLevel string // "Off", "Entry", "Intermediate", "Full"
}

SetFipsFlaggerCommand represents SET FIPS_FLAGGER command

type SetIdentityInsertStatement

type SetIdentityInsertStatement struct {
	Table *SchemaObjectName
	IsOn  bool
}

SetIdentityInsertStatement represents SET IDENTITY_INSERT statement

type SetOffsetsStatement

type SetOffsetsStatement struct {
	Options string
	IsOn    bool
}

SetOffsetsStatement represents SET OFFSETS statement

type SetOptions

type SetOptions string

SetOptions represents the options for SET statements

const (
	SetOptionsAnsiDefaults           SetOptions = "AnsiDefaults"
	SetOptionsAnsiNulls              SetOptions = "AnsiNulls"
	SetOptionsAnsiNullDfltOff        SetOptions = "AnsiNullDfltOff"
	SetOptionsAnsiNullDfltOn         SetOptions = "AnsiNullDfltOn"
	SetOptionsAnsiPadding            SetOptions = "AnsiPadding"
	SetOptionsAnsiWarnings           SetOptions = "AnsiWarnings"
	SetOptionsArithAbort             SetOptions = "ArithAbort"
	SetOptionsArithIgnore            SetOptions = "ArithIgnore"
	SetOptionsConcatNullYieldsNull   SetOptions = "ConcatNullYieldsNull"
	SetOptionsCursorCloseOnCommit    SetOptions = "CursorCloseOnCommit"
	SetOptionsFmtOnly                SetOptions = "FmtOnly"
	SetOptionsForceplan              SetOptions = "ForcePlan"
	SetOptionsImplicitTransactions   SetOptions = "ImplicitTransactions"
	SetOptionsNoCount                SetOptions = "NoCount"
	SetOptionsNoExec                 SetOptions = "NoExec"
	SetOptionsNoBrowsetable          SetOptions = "NoBrowsetable"
	SetOptionsNumericRoundAbort      SetOptions = "NumericRoundAbort"
	SetOptionsParseOnly              SetOptions = "ParseOnly"
	SetOptionsQuotedIdentifier       SetOptions = "QuotedIdentifier"
	SetOptionsRemoteProcTransactions SetOptions = "RemoteProcTransactions"
	SetOptionsShowplanAll            SetOptions = "ShowPlanAll"
	SetOptionsShowplanText           SetOptions = "ShowPlanText"
	SetOptionsShowplanXml            SetOptions = "ShowPlanXml"
	SetOptionsIO                     SetOptions = "IO"
	SetOptionsProfile                SetOptions = "Profile"
	SetOptionsTime                   SetOptions = "Time"
	SetOptionsStatisticsXml          SetOptions = "StatisticsXml"
	SetOptionsXactAbort              SetOptions = "XactAbort"
)

type SetRowCountStatement

type SetRowCountStatement struct {
	NumberRows ScalarExpression
}

SetRowCountStatement represents SET ROWCOUNT statement

type SetSearchPropertyListAlterFullTextIndexAction

type SetSearchPropertyListAlterFullTextIndexAction struct {
	SearchPropertyListOption *SearchPropertyListFullTextIndexOption `json:"SearchPropertyListOption,omitempty"`
	WithNoPopulation         bool                                   `json:"WithNoPopulation"`
}

SetSearchPropertyListAlterFullTextIndexAction represents a SET SEARCH PROPERTY LIST action for fulltext index

type SetStatisticsStatement

type SetStatisticsStatement struct {
	Options string
	IsOn    bool
}

SetStatisticsStatement represents SET STATISTICS IO/PROFILE/TIME/XML statements Options can contain multiple comma-separated values like "IO, Profile, Time"

type SetStopListAlterFullTextIndexAction

type SetStopListAlterFullTextIndexAction struct {
	StopListOption   *StopListFullTextIndexOption `json:"StopListOption,omitempty"`
	WithNoPopulation bool                         `json:"WithNoPopulation"`
}

SetStopListAlterFullTextIndexAction represents a SET STOPLIST action for fulltext index

type SetTextSizeStatement

type SetTextSizeStatement struct {
	TextSize ScalarExpression
}

SetTextSizeStatement represents SET TEXTSIZE statement

type SetTransactionIsolationLevelStatement

type SetTransactionIsolationLevelStatement struct {
	Level string // "ReadUncommitted", "ReadCommitted", "RepeatableRead", "Serializable", "Snapshot"
}

SetTransactionIsolationLevelStatement represents SET TRANSACTION ISOLATION LEVEL statement

type SetUserStatement

type SetUserStatement struct {
	UserName    ScalarExpression `json:"UserName,omitempty"`
	WithNoReset bool             `json:"WithNoReset"`
}

type SetVariableStatement

type SetVariableStatement struct {
	Variable           *VariableReference `json:"Variable,omitempty"`
	Expression         ScalarExpression   `json:"Expression,omitempty"`
	CursorDefinition   *CursorDefinition  `json:"CursorDefinition,omitempty"`
	AssignmentKind     string             `json:"AssignmentKind,omitempty"`
	SeparatorType      string             `json:"SeparatorType,omitempty"`
	Identifier         *Identifier        `json:"Identifier,omitempty"`
	FunctionCallExists bool               `json:"FunctionCallExists,omitempty"`
	Parameters         []ScalarExpression `json:"Parameters,omitempty"`
}

SetVariableStatement represents a SET @var = value statement.

type ShutdownStatement

type ShutdownStatement struct {
	WithNoWait bool `json:"WithNoWait"`
}

type SimpleAlterFullTextIndexAction

type SimpleAlterFullTextIndexAction struct {
	ActionKind string `json:"ActionKind,omitempty"`
}

SimpleAlterFullTextIndexAction represents simple actions like ENABLE, DISABLE, etc.

type SimpleCaseExpression

type SimpleCaseExpression struct {
	InputExpression ScalarExpression
	WhenClauses     []*SimpleWhenClause
	ElseExpression  ScalarExpression
	Collation       *Identifier
}

SimpleCaseExpression represents a CASE expression WHEN value THEN result END.

type SimpleDatabaseOption

type SimpleDatabaseOption struct {
	OptionKind string `json:"OptionKind,omitempty"`
}

SimpleDatabaseOption represents a simple database option with just OptionKind (e.g., ENABLE_BROKER)

type SimpleFileDeclarationOption

type SimpleFileDeclarationOption struct {
	OptionKind string // "Offline"
}

SimpleFileDeclarationOption represents a simple file option like OFFLINE

type SimpleRestoreOption

type SimpleRestoreOption struct {
	OptionKind string
}

SimpleRestoreOption represents a simple restore option with just an option kind

type SimpleStatisticsOption

type SimpleStatisticsOption struct {
	OptionKind string `json:"OptionKind,omitempty"`
}

SimpleStatisticsOption represents a simple statistics option like ALL, FULLSCAN, etc.

type SimpleWhenClause

type SimpleWhenClause struct {
	WhenExpression ScalarExpression
	ThenExpression ScalarExpression
}

SimpleWhenClause represents a WHEN value THEN result clause.

type SingleValueTypeCopyOption

type SingleValueTypeCopyOption struct {
	SingleValue *IdentifierOrValueExpression `json:"SingleValue,omitempty"`
}

SingleValueTypeCopyOption represents a simple value option

type SizeFileDeclarationOption

type SizeFileDeclarationOption struct {
	Size       ScalarExpression
	Units      string // "KB", "MB", "GB", "TB", "Unspecified"
	OptionKind string // "Size"
}

SizeFileDeclarationOption represents the SIZE option for a file

type SoapMethod

type SoapMethod struct {
	Alias     *StringLiteral `json:"Alias,omitempty"`
	Namespace *StringLiteral `json:"Namespace,omitempty"`
	Action    string         `json:"Action,omitempty"` // None, Add, Alter, Drop
	Name      *StringLiteral `json:"Name,omitempty"`
	Format    string         `json:"Format,omitempty"` // NotSpecified, AllResults, RowsetsOnly, None
	Schema    string         `json:"Schema,omitempty"` // NotSpecified, Default, None, Standard
	Kind      string         `json:"Kind,omitempty"`   // None, WebMethod
}

SoapMethod represents a SOAP web method option.

type SortOrder

type SortOrder int

SortOrder represents sort order (ASC/DESC)

const (
	SortOrderNotSpecified SortOrder = iota
	SortOrderAscending
	SortOrderDescending
)

type SourceDeclaration

type SourceDeclaration struct {
	Value *EventSessionObjectName
}

SourceDeclaration represents a source declaration in an event predicate

type SpatialIndexOption

type SpatialIndexOption interface {
	Node
	// contains filtered or unexported methods
}

SpatialIndexOption is an interface for spatial index options

type SpatialIndexRegularOption

type SpatialIndexRegularOption struct {
	Option IndexOption
}

SpatialIndexRegularOption wraps a regular IndexOption for spatial indexes

type SqlDataTypeReference

type SqlDataTypeReference struct {
	SqlDataTypeOption string             `json:"SqlDataTypeOption,omitempty"`
	Parameters        []ScalarExpression `json:"Parameters,omitempty"`
	Name              *SchemaObjectName  `json:"Name,omitempty"`
}

SqlDataTypeReference represents a SQL data type.

type StateAuditOption

type StateAuditOption struct {
	OptionKind string
	Value      string // On, Off
}

StateAuditOption represents the STATE option

type Statement

type Statement interface {
	Node
	// contains filtered or unexported methods
}

Statement is the interface implemented by all statement types.

type StatementList

type StatementList struct {
	Statements []Statement `json:"Statements,omitempty"`
}

StatementList is a list of statements.

type StatisticsOption

type StatisticsOption interface {
	// contains filtered or unexported methods
}

StatisticsOption is an interface for statistics options.

type StatisticsPartitionRange

type StatisticsPartitionRange struct {
	From ScalarExpression `json:"From,omitempty"`
	To   ScalarExpression `json:"To,omitempty"`
}

StatisticsPartitionRange represents a range of partitions for RESAMPLE.

type StopListFullTextIndexOption

type StopListFullTextIndexOption struct {
	IsOff        bool        `json:"IsOff"`
	StopListName *Identifier `json:"StopListName,omitempty"`
	OptionKind   string      `json:"OptionKind,omitempty"` // "StopList"
}

StopListFullTextIndexOption represents a STOPLIST option for fulltext index

type StopRestoreOption

type StopRestoreOption struct {
	OptionKind string
	Mark       ScalarExpression
	After      ScalarExpression
	IsStopAt   bool
}

StopRestoreOption represents a STOPATMARK or STOPBEFOREMARK option

type StringLiteral

type StringLiteral struct {
	LiteralType   string `json:"LiteralType,omitempty"`
	IsNational    bool   `json:"IsNational,omitempty"`
	IsLargeObject bool   `json:"IsLargeObject,omitempty"`
	Value         string `json:"Value,omitempty"`
}

StringLiteral represents a string literal.

type SubqueryComparisonPredicate

type SubqueryComparisonPredicate struct {
	Expression                      ScalarExpression
	ComparisonType                  string // "IsDistinctFrom", "IsNotDistinctFrom", "Equals", etc.
	Subquery                        *ScalarSubquery
	SubqueryComparisonPredicateType string // "Any", "All"
}

SubqueryComparisonPredicate represents a comparison with a subquery using ANY/SOME/ALL. Example: col IS DISTINCT FROM SOME (SELECT ...), col > ALL (SELECT ...)

type SystemTimePeriodDefinition

type SystemTimePeriodDefinition struct {
	StartTimeColumn *Identifier
	EndTimeColumn   *Identifier
}

SystemTimePeriodDefinition represents PERIOD FOR SYSTEM_TIME clause

type SystemVersioningTableOption

type SystemVersioningTableOption struct {
	OptionState             string // "On", "Off"
	ConsistencyCheckEnabled string // "On", "Off", "NotSet"
	HistoryTable            *SchemaObjectName
	RetentionPeriod         *RetentionPeriodDefinition
	OptionKind              string // Always "LockEscalation"
}

SystemVersioningTableOption represents SYSTEM_VERSIONING option

type TSEqualCall

type TSEqualCall struct {
	FirstExpression  ScalarExpression
	SecondExpression ScalarExpression
}

TSEqualCall represents the TSEQUAL(expr1, expr2) predicate used to compare timestamp values

type TableClusteredIndexType

type TableClusteredIndexType struct {
	Columns        []*ColumnWithSortOrder
	ColumnStore    bool
	OrderedColumns []*ColumnReferenceExpression // For COLUMNSTORE INDEX ORDER(columns)
}

TableClusteredIndexType represents a clustered index type

type TableConstraint

type TableConstraint interface {
	Node
	// contains filtered or unexported methods
}

TableConstraint is an interface for table-level constraints

type TableDataCompressionOption

type TableDataCompressionOption struct {
	DataCompressionOption *DataCompressionOption
	OptionKind            string
}

TableDataCompressionOption represents a DATA_COMPRESSION option

type TableDefinition

type TableDefinition struct {
	ColumnDefinitions []*ColumnDefinition
	TableConstraints  []TableConstraint
	Indexes           []*IndexDefinition
	SystemTimePeriod  *SystemTimePeriodDefinition
}

TableDefinition represents a table definition

type TableDistributionOption

type TableDistributionOption struct {
	Value      TableDistributionPolicy
	OptionKind string // "Distribution"
}

TableDistributionOption represents DISTRIBUTION option for tables

type TableDistributionPolicy

type TableDistributionPolicy interface {
	// contains filtered or unexported methods
}

TableDistributionPolicy is an interface for table distribution policies

type TableHashDistributionPolicy

type TableHashDistributionPolicy struct {
	DistributionColumn  *Identifier
	DistributionColumns []*Identifier
}

TableHashDistributionPolicy represents HASH distribution for tables

type TableHint

type TableHint struct {
	HintKind string `json:"HintKind,omitempty"`
}

TableHint represents a table hint.

type TableHintType

type TableHintType interface {
	// contains filtered or unexported methods
}

TableHintType is an interface for all table hint types.

type TableHintsOptimizerHint

type TableHintsOptimizerHint struct {
	HintKind   string            `json:"HintKind,omitempty"`
	ObjectName *SchemaObjectName `json:"ObjectName,omitempty"`
	TableHints []TableHintType   `json:"TableHints,omitempty"`
}

TableHintsOptimizerHint represents a TABLE HINT optimizer hint.

type TableIndexOption

type TableIndexOption struct {
	Value      TableIndexType
	OptionKind string // "LockEscalation" (incorrect but matches expected output)
}

TableIndexOption represents a table index option in CREATE TABLE WITH

type TableIndexType

type TableIndexType interface {
	Node
	// contains filtered or unexported methods
}

TableIndexType is an interface for different table index types

type TableNonClusteredIndexType

type TableNonClusteredIndexType struct{}

TableNonClusteredIndexType represents HEAP (non-clustered)

type TableOption

type TableOption interface {
	Node
	// contains filtered or unexported methods
}

TableOption is an interface for table options

type TablePartitionOption

type TablePartitionOption struct {
	PartitionColumn      *Identifier
	PartitionOptionSpecs *TablePartitionOptionSpecifications
	OptionKind           string // "Partition"
}

TablePartitionOption represents PARTITION option for Azure Synapse tables PARTITION(column RANGE [LEFT|RIGHT] FOR VALUES (v1, v2, ...))

type TablePartitionOptionSpecifications

type TablePartitionOptionSpecifications struct {
	Range          string             // "Left", "Right", "NotSpecified"
	BoundaryValues []ScalarExpression // the values in the FOR VALUES clause
}

TablePartitionOptionSpecifications represents the partition specifications

type TableReference

type TableReference interface {
	Node
	// contains filtered or unexported methods
}

TableReference is the interface for table references.

type TableReplicateDistributionPolicy

type TableReplicateDistributionPolicy struct{}

TableReplicateDistributionPolicy represents REPLICATE distribution for tables

type TableRoundRobinDistributionPolicy

type TableRoundRobinDistributionPolicy struct{}

TableRoundRobinDistributionPolicy represents ROUND_ROBIN distribution for tables

type TableSampleClause

type TableSampleClause struct {
	System                  bool             `json:"System"`
	SampleNumber            ScalarExpression `json:"SampleNumber,omitempty"`
	TableSampleClauseOption string           `json:"TableSampleClauseOption"` // "NotSpecified", "Percent", "Rows"
	RepeatSeed              ScalarExpression `json:"RepeatSeed,omitempty"`
}

TableSampleClause represents a TABLESAMPLE clause in a table reference

type TableSwitchOption

type TableSwitchOption interface {
	Node
	// contains filtered or unexported methods
}

TableSwitchOption is an interface for switch options

type TableValuedFunctionReturnType

type TableValuedFunctionReturnType struct {
	DeclareTableVariableBody *DeclareTableVariableBody
}

TableValuedFunctionReturnType represents a table-valued function return type

type TableXmlCompressionOption

type TableXmlCompressionOption struct {
	XmlCompressionOption *XmlCompressionOption
	OptionKind           string // "XmlCompression"
}

TableXmlCompressionOption represents a table-level XML compression option

type TargetDeclaration

type TargetDeclaration struct {
	ObjectName                  *EventSessionObjectName
	TargetDeclarationParameters []*EventDeclarationSetParameter
}

TargetDeclaration represents a target for the event session

type TargetRecoveryTimeDatabaseOption

type TargetRecoveryTimeDatabaseOption struct {
	OptionKind   string           // "TargetRecoveryTime"
	RecoveryTime ScalarExpression // Integer literal
	Unit         string           // "Seconds" or "Minutes"
}

TargetRecoveryTimeDatabaseOption represents TARGET_RECOVERY_TIME database option

type TemporalClause

type TemporalClause struct {
	TemporalClauseType string           `json:"TemporalClauseType,omitempty"`
	StartTime          ScalarExpression `json:"StartTime,omitempty"`
	EndTime            ScalarExpression `json:"EndTime,omitempty"`
}

TemporalClause represents a FOR SYSTEM_TIME clause for temporal tables.

type ThrowStatement

type ThrowStatement struct {
	ErrorNumber ScalarExpression
	Message     ScalarExpression
	State       ScalarExpression
}

ThrowStatement represents a THROW statement.

type TopRowFilter

type TopRowFilter struct {
	Expression ScalarExpression `json:"Expression,omitempty"`
	Percent    bool             `json:"Percent"`
	WithTies   bool             `json:"WithTies"`
}

TopRowFilter represents a TOP clause in a SELECT statement.

type TriggerAction

type TriggerAction struct {
	TriggerActionType string              // "Insert", "Update", "Delete", "Event", etc.
	EventTypeGroup    *EventTypeContainer // For database/server events
}

TriggerAction represents a trigger action

type TriggerObject

type TriggerObject struct {
	Name         *SchemaObjectName
	TriggerScope string // "Normal", "AllServer", "Database"
}

TriggerObject represents the object a trigger is associated with

type TriggerOption

type TriggerOption struct {
	OptionKind  string
	OptionState string
}

TriggerOption represents a trigger option

type TriggerOptionType

type TriggerOptionType interface {
	// contains filtered or unexported methods
}

TriggerOptionType is the interface for trigger options

type TruncateTableStatement

type TruncateTableStatement struct {
	TableName       *SchemaObjectName            `json:"TableName,omitempty"`
	PartitionRanges []*CompressionPartitionRange `json:"PartitionRanges,omitempty"`
}

type TruncateTargetTableSwitchOption

type TruncateTargetTableSwitchOption struct {
	TruncateTarget bool
	OptionKind     string
}

TruncateTargetTableSwitchOption represents TRUNCATE_TARGET option

type TryCastCall

type TryCastCall struct {
	DataType  DataTypeReference `json:"DataType,omitempty"`
	Parameter ScalarExpression  `json:"Parameter,omitempty"`
	Collation *Identifier       `json:"Collation,omitempty"`
}

TryCastCall represents a TRY_CAST expression

type TryCatchStatement

type TryCatchStatement struct {
	TryStatements   *StatementList `json:"TryStatements,omitempty"`
	CatchStatements *StatementList `json:"CatchStatements,omitempty"`
}

TryCatchStatement represents a BEGIN TRY...END TRY BEGIN CATCH...END CATCH block.

type TryConvertCall

type TryConvertCall struct {
	DataType  DataTypeReference `json:"DataType,omitempty"`
	Parameter ScalarExpression  `json:"Parameter,omitempty"`
	Style     ScalarExpression  `json:"Style,omitempty"`
	Collation *Identifier       `json:"Collation,omitempty"`
}

TryConvertCall represents a TRY_CONVERT expression

type TryParseCall

type TryParseCall struct {
	StringValue ScalarExpression  `json:"StringValue,omitempty"`
	DataType    DataTypeReference `json:"DataType,omitempty"`
	Culture     ScalarExpression  `json:"Culture,omitempty"`
}

TryParseCall represents the TRY_PARSE(string AS type [USING culture]) function

type UnaryExpression

type UnaryExpression struct {
	UnaryExpressionType string           `json:"UnaryExpressionType,omitempty"`
	Expression          ScalarExpression `json:"Expression,omitempty"`
}

UnaryExpression represents a unary expression (e.g., -1, +5).

type UniqueConstraintDefinition

type UniqueConstraintDefinition struct {
	ConstraintIdentifier         *Identifier
	Clustered                    bool
	IsPrimaryKey                 bool
	IsEnforced                   *bool // nil = not specified (default enforced), true = ENFORCED, false = NOT ENFORCED
	Columns                      []*ColumnWithSortOrder
	IndexType                    *IndexType
	IndexOptions                 []IndexOption
	OnFileGroupOrPartitionScheme *FileGroupOrPartitionScheme
}

UniqueConstraintDefinition represents a UNIQUE or PRIMARY KEY constraint

type UnpivotedTableReference

type UnpivotedTableReference struct {
	TableReference TableReference
	InColumns      []*ColumnReferenceExpression
	PivotColumn    *Identifier
	ValueColumn    *Identifier
	NullHandling   string // "None", "ExcludeNulls", "IncludeNulls"
	Alias          *Identifier
	ForPath        bool
}

UnpivotedTableReference represents a table with UNPIVOT

type UnqualifiedJoin

type UnqualifiedJoin struct {
	UnqualifiedJoinType  string         `json:"UnqualifiedJoinType,omitempty"`
	FirstTableReference  TableReference `json:"FirstTableReference,omitempty"`
	SecondTableReference TableReference `json:"SecondTableReference,omitempty"`
}

UnqualifiedJoin represents a CROSS JOIN or similar join without ON clause.

type UpdateCall

type UpdateCall struct {
	Identifier *Identifier
}

UpdateCall represents the UPDATE(column) predicate used in triggers to check if a column was modified

type UpdateForClause

type UpdateForClause struct {
	Columns []*ColumnReferenceExpression `json:"Columns,omitempty"`
}

UpdateForClause represents a FOR UPDATE [OF columns] clause.

type UpdateMergeAction

type UpdateMergeAction struct {
	SetClauses []SetClause
}

UpdateMergeAction represents UPDATE SET in a MERGE WHEN clause

type UpdateSpecification

type UpdateSpecification struct {
	SetClauses       []SetClause       `json:"SetClauses,omitempty"`
	Target           TableReference    `json:"Target,omitempty"`
	TopRowFilter     *TopRowFilter     `json:"TopRowFilter,omitempty"`
	FromClause       *FromClause       `json:"FromClause,omitempty"`
	WhereClause      *WhereClause      `json:"WhereClause,omitempty"`
	OutputClause     *OutputClause     `json:"OutputClause,omitempty"`
	OutputIntoClause *OutputIntoClause `json:"OutputIntoClause,omitempty"`
}

UpdateSpecification contains the details of an UPDATE.

type UpdateStatement

type UpdateStatement struct {
	UpdateSpecification      *UpdateSpecification      `json:"UpdateSpecification,omitempty"`
	WithCtesAndXmlNamespaces *WithCtesAndXmlNamespaces `json:"WithCtesAndXmlNamespaces,omitempty"`
	OptimizerHints           []OptimizerHintBase       `json:"OptimizerHints,omitempty"`
}

UpdateStatement represents an UPDATE statement.

type UpdateStatisticsStatement

type UpdateStatisticsStatement struct {
	SchemaObjectName  *SchemaObjectName  `json:"SchemaObjectName,omitempty"`
	SubElements       []*Identifier      `json:"SubElements,omitempty"`
	StatisticsOptions []StatisticsOption `json:"StatisticsOptions,omitempty"`
}

UpdateStatisticsStatement represents UPDATE STATISTICS.

type UpdateTextStatement

type UpdateTextStatement struct {
	Bulk            bool
	Column          *ColumnReferenceExpression
	TextId          ScalarExpression
	Timestamp       ScalarExpression
	InsertOffset    ScalarExpression
	DeleteLength    ScalarExpression
	SourceColumn    *ColumnReferenceExpression
	SourceParameter ScalarExpression
	WithLog         bool
}

UpdateTextStatement represents UPDATETEXT statement.

type UseFederationStatement

type UseFederationStatement struct {
	FederationName   *Identifier
	DistributionName *Identifier
	Value            ScalarExpression
	Filtering        bool
}

UseFederationStatement represents USE FEDERATION statement

type UseHintList

type UseHintList struct {
	HintKind string             `json:"HintKind,omitempty"`
	Hints    []ScalarExpression `json:"Hints,omitempty"`
}

UseHintList represents a USE HINT optimizer hint with a list of hint strings.

type UseStatement

type UseStatement struct {
	DatabaseName *Identifier `json:"DatabaseName,omitempty"`
}

type UserDataTypeReference

type UserDataTypeReference struct {
	Name       *SchemaObjectName  `json:"Name,omitempty"`
	Parameters []ScalarExpression `json:"Parameters,omitempty"`
}

UserDataTypeReference represents a user-defined data type reference.

type UserDefinedTypeCallTarget

type UserDefinedTypeCallTarget struct {
	SchemaObjectName *SchemaObjectName
}

UserDefinedTypeCallTarget represents a user-defined type call target.

type UserDefinedTypePropertyAccess

type UserDefinedTypePropertyAccess struct {
	CallTarget   CallTarget  `json:"CallTarget,omitempty"`
	PropertyName *Identifier `json:"PropertyName,omitempty"`
	Collation    *Identifier `json:"Collation,omitempty"`
}

UserDefinedTypePropertyAccess represents a property access on a user-defined type. Examples: t::a, (c1).SomeProperty, c1.f1().SomeProperty

type UserLoginOption

type UserLoginOption struct {
	UserLoginOptionType string // "FromLogin", "WithoutLogin", "FromCertificate", "FromAsymmetricKey", "FromExternalProvider", "ForLogin"
	Identifier          *Identifier
}

UserLoginOption represents the login option for a user

type UserOption

type UserOption interface {
	// contains filtered or unexported methods
}

UserOption is an interface for user options

type UserRemoteServiceBindingOption

type UserRemoteServiceBindingOption struct {
	OptionKind string
	User       *Identifier
}

UserRemoteServiceBindingOption represents USER = identifier option.

type ValuesInsertSource

type ValuesInsertSource struct {
	IsDefaultValues bool        `json:"IsDefaultValues"`
	RowValues       []*RowValue `json:"RowValues,omitempty"`
}

ValuesInsertSource represents DEFAULT VALUES or VALUES (...).

type VariableMethodCallTableReference

type VariableMethodCallTableReference struct {
	Variable   *VariableReference `json:"Variable,omitempty"`
	MethodName *Identifier        `json:"MethodName,omitempty"`
	Parameters []ScalarExpression `json:"Parameters,omitempty"`
	Columns    []*Identifier      `json:"Columns,omitempty"`
	Alias      *Identifier        `json:"Alias,omitempty"`
	ForPath    bool               `json:"ForPath"`
}

VariableMethodCallTableReference represents a method call on a table variable Syntax: @variable.method(parameters) [AS alias[(columns)]]

type VariableReference

type VariableReference struct {
	Name string `json:"Name,omitempty"`
}

VariableReference represents a reference to a variable (e.g., @var).

type VariableTableReference

type VariableTableReference struct {
	Variable *VariableReference `json:"Variable,omitempty"`
	Alias    *Identifier        `json:"Alias,omitempty"`
	ForPath  bool               `json:"ForPath"`
}

VariableTableReference represents a table variable reference (@var).

type VariableValuePair

type VariableValuePair struct {
	Variable     *VariableReference `json:"Variable,omitempty"`
	Value        ScalarExpression   `json:"Value,omitempty"`
	IsForUnknown bool               `json:"IsForUnknown,omitempty"`
}

VariableValuePair represents a variable-value pair in an OPTIMIZE FOR hint.

type ViewDistributionOption

type ViewDistributionOption struct {
	OptionKind string                 `json:"OptionKind,omitempty"`
	Value      ViewDistributionPolicy `json:"Value,omitempty"`
}

ViewDistributionOption represents a DISTRIBUTION option for materialized views.

type ViewDistributionPolicy

type ViewDistributionPolicy interface {
	// contains filtered or unexported methods
}

ViewDistributionPolicy is an interface for distribution policy types

type ViewForAppendOption

type ViewForAppendOption struct {
	OptionKind string `json:"OptionKind,omitempty"`
}

ViewForAppendOption represents the FOR_APPEND option for materialized views.

type ViewHashDistributionPolicy

type ViewHashDistributionPolicy struct {
	DistributionColumn  *Identifier   `json:"DistributionColumn,omitempty"`
	DistributionColumns []*Identifier `json:"DistributionColumns,omitempty"`
}

ViewHashDistributionPolicy represents the hash distribution policy for materialized views.

type ViewOption

type ViewOption interface {
	// contains filtered or unexported methods
}

ViewOption is an interface for different view option types.

type ViewRoundRobinDistributionPolicy

type ViewRoundRobinDistributionPolicy struct{}

ViewRoundRobinDistributionPolicy represents the round robin distribution policy for materialized views.

type ViewStatementOption

type ViewStatementOption struct {
	OptionKind string `json:"OptionKind,omitempty"`
}

ViewStatementOption represents a simple view option like SCHEMABINDING.

type WaitAtLowPriorityOption

type WaitAtLowPriorityOption struct {
	Options    []LowPriorityLockWaitOption
	OptionKind string // WaitAtLowPriority
}

WaitAtLowPriorityOption represents the WAIT_AT_LOW_PRIORITY option

type WaitForStatement

type WaitForStatement struct {
	WaitForOption string           `json:"WaitForOption"`
	Parameter     ScalarExpression `json:"Parameter,omitempty"`
	Timeout       ScalarExpression `json:"Timeout,omitempty"`
	Statement     Statement        `json:"Statement,omitempty"`
}

WaitForStatement represents a WAITFOR [DELAY|TIME] statement.

type WhereClause

type WhereClause struct {
	SearchCondition BooleanExpression `json:"SearchCondition,omitempty"`
	Cursor          *CursorId         `json:"Cursor,omitempty"`
}

WhereClause represents a WHERE clause.

type WhileStatement

type WhileStatement struct {
	Predicate BooleanExpression `json:"Predicate,omitempty"`
	Statement Statement         `json:"Statement,omitempty"`
}

WhileStatement represents a WHILE statement.

type WindowClause

type WindowClause struct {
	WindowDefinition []*WindowDefinition
}

WindowClause represents a WINDOW clause in SELECT statement

type WindowDefinition

type WindowDefinition struct {
	WindowName    *Identifier        // The name of this window
	RefWindowName *Identifier        // Reference to another window name (optional)
	Partitions    []ScalarExpression // PARTITION BY expressions
	OrderByClause *OrderByClause     // ORDER BY clause
}

WindowDefinition represents a single window definition (WindowName AS (...))

type WindowDelimiter

type WindowDelimiter struct {
	WindowDelimiterType string           // "CurrentRow", "UnboundedPreceding", "UnboundedFollowing", "ValuePreceding", "ValueFollowing"
	OffsetValue         ScalarExpression // For ValuePreceding/ValueFollowing
}

WindowDelimiter represents window frame boundary

type WindowFrameClause

type WindowFrameClause struct {
	WindowFrameType string           // "Rows", "Range"
	Top             *WindowDelimiter // Top boundary
	Bottom          *WindowDelimiter // Bottom boundary (for BETWEEN)
}

WindowFrameClause represents ROWS/RANGE frame specification in OVER clause

type WindowsCreateLoginSource

type WindowsCreateLoginSource struct {
	Options []PrincipalOption `json:"Options,omitempty"`
}

WindowsCreateLoginSource represents FROM WINDOWS source

type WithCtesAndXmlNamespaces

type WithCtesAndXmlNamespaces struct {
	XmlNamespaces          *XmlNamespaces           `json:"XmlNamespaces,omitempty"`
	CommonTableExpressions []*CommonTableExpression `json:"CommonTableExpressions,omitempty"`
	ChangeTrackingContext  ScalarExpression         `json:"ChangeTrackingContext,omitempty"`
}

WithCtesAndXmlNamespaces represents the WITH clause containing CTEs and/or XML namespaces.

type WithinGroupClause

type WithinGroupClause struct {
	OrderByClause *OrderByClause `json:"OrderByClause,omitempty"`
	HasGraphPath  bool           `json:"HasGraphPath,omitempty"`
}

WithinGroupClause represents a WITHIN GROUP clause for ordered set aggregate functions.

type WitnessDatabaseOption

type WitnessDatabaseOption struct {
	OptionKind    string           // "Witness"
	WitnessServer ScalarExpression // For WITNESS = 'server'
	IsOff         bool             // For WITNESS OFF
}

WitnessDatabaseOption represents WITNESS database mirroring option

type WlmTimeLiteral

type WlmTimeLiteral struct {
	TimeString *StringLiteral
}

WlmTimeLiteral represents a time literal for WLM START_TIME/END_TIME options.

type WorkloadClassifierOption

type WorkloadClassifierOption interface {
	// contains filtered or unexported methods
}

WorkloadClassifierOption is the interface for workload classifier options.

type WorkloadGroupImportanceParameter

type WorkloadGroupImportanceParameter struct {
	ParameterValue string
	ParameterType  string
}

WorkloadGroupImportanceParameter represents an importance parameter in a workload group statement.

type WorkloadGroupResourceParameter

type WorkloadGroupResourceParameter struct {
	ParameterValue ScalarExpression
	ParameterType  string
}

WorkloadGroupResourceParameter represents a resource parameter in a workload group statement.

type WriteTextStatement

type WriteTextStatement struct {
	Bulk            bool
	Column          *ColumnReferenceExpression
	TextId          ScalarExpression
	WithLog         bool
	SourceParameter ScalarExpression
}

WriteTextStatement represents WRITETEXT statement.

type WsdlPayloadOption

type WsdlPayloadOption struct {
	Value  ScalarExpression `json:"Value,omitempty"`
	IsNone bool             `json:"IsNone"`
	Kind   string           `json:"Kind,omitempty"` // Wsdl
}

WsdlPayloadOption represents a WSDL payload option for SOAP.

type XmlCompressionOption

type XmlCompressionOption struct {
	IsCompressed    string // "On", "Off"
	PartitionRanges []*CompressionPartitionRange
	OptionKind      string // "XmlCompression"
}

XmlCompressionOption represents an XML compression option

type XmlDataTypeReference

type XmlDataTypeReference struct {
	XmlDataTypeOption   string            `json:"XmlDataTypeOption,omitempty"`
	XmlSchemaCollection *SchemaObjectName `json:"XmlSchemaCollection,omitempty"`
	Name                *SchemaObjectName `json:"Name,omitempty"`
}

XmlDataTypeReference represents an XML data type with optional schema collection

type XmlForClause

type XmlForClause struct {
	Options []*XmlForClauseOption `json:"Options,omitempty"`
}

XmlForClause represents a FOR XML clause with its options.

type XmlForClauseOption

type XmlForClauseOption struct {
	OptionKind string         `json:"OptionKind,omitempty"`
	Value      *StringLiteral `json:"Value,omitempty"`
}

XmlForClauseOption represents an option in a FOR XML clause.

type XmlNamespaces

type XmlNamespaces struct {
	XmlNamespacesElements []XmlNamespacesElement
}

XmlNamespaces represents a WITH XMLNAMESPACES clause

type XmlNamespacesAliasElement

type XmlNamespacesAliasElement struct {
	Identifier *Identifier
	String     *StringLiteral
}

XmlNamespacesAliasElement represents an alias element in XMLNAMESPACES

type XmlNamespacesDefaultElement

type XmlNamespacesDefaultElement struct {
	String *StringLiteral
}

XmlNamespacesDefaultElement represents a default element in XMLNAMESPACES

type XmlNamespacesElement

type XmlNamespacesElement interface {
	// contains filtered or unexported methods
}

XmlNamespacesElement is an interface for XML namespace elements

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL