@@ -5,6 +5,7 @@ type CreateDatabaseStatement struct {
55 DatabaseName * Identifier `json:"DatabaseName,omitempty"`
66 Options []CreateDatabaseOption `json:"Options,omitempty"`
77 AttachMode string `json:"AttachMode,omitempty"` // "None", "Attach", "AttachRebuildLog"
8+ CopyOf * MultiPartIdentifier `json:"CopyOf,omitempty"` // For AS COPY OF syntax
89}
910
1011func (s * CreateDatabaseStatement ) node () {}
@@ -92,12 +93,63 @@ func (s *CreateCertificateStatement) statement() {}
9293
9394// CreateAsymmetricKeyStatement represents a CREATE ASYMMETRIC KEY statement.
9495type CreateAsymmetricKeyStatement struct {
95- Name * Identifier `json:"Name,omitempty"`
96+ Name * Identifier `json:"Name,omitempty"`
97+ KeySource EncryptionSource `json:"KeySource,omitempty"`
98+ EncryptionAlgorithm string `json:"EncryptionAlgorithm,omitempty"`
99+ Password ScalarExpression `json:"Password,omitempty"`
96100}
97101
98102func (s * CreateAsymmetricKeyStatement ) node () {}
99103func (s * CreateAsymmetricKeyStatement ) statement () {}
100104
105+ // EncryptionSource is an interface for key sources.
106+ type EncryptionSource interface {
107+ Node
108+ encryptionSource ()
109+ }
110+
111+ // ProviderEncryptionSource represents a key source from a provider.
112+ type ProviderEncryptionSource struct {
113+ Name * Identifier `json:"Name,omitempty"`
114+ KeyOptions []KeyOption `json:"KeyOptions,omitempty"`
115+ }
116+
117+ func (p * ProviderEncryptionSource ) node () {}
118+ func (p * ProviderEncryptionSource ) encryptionSource () {}
119+
120+ // KeyOption is an interface for key options.
121+ type KeyOption interface {
122+ Node
123+ keyOption ()
124+ }
125+
126+ // AlgorithmKeyOption represents an ALGORITHM key option.
127+ type AlgorithmKeyOption struct {
128+ Algorithm string `json:"Algorithm,omitempty"`
129+ OptionKind string `json:"OptionKind,omitempty"`
130+ }
131+
132+ func (a * AlgorithmKeyOption ) node () {}
133+ func (a * AlgorithmKeyOption ) keyOption () {}
134+
135+ // ProviderKeyNameKeyOption represents a PROVIDER_KEY_NAME key option.
136+ type ProviderKeyNameKeyOption struct {
137+ KeyName ScalarExpression `json:"KeyName,omitempty"`
138+ OptionKind string `json:"OptionKind,omitempty"`
139+ }
140+
141+ func (p * ProviderKeyNameKeyOption ) node () {}
142+ func (p * ProviderKeyNameKeyOption ) keyOption () {}
143+
144+ // CreationDispositionKeyOption represents a CREATION_DISPOSITION key option.
145+ type CreationDispositionKeyOption struct {
146+ IsCreateNew bool `json:"IsCreateNew,omitempty"`
147+ OptionKind string `json:"OptionKind,omitempty"`
148+ }
149+
150+ func (c * CreationDispositionKeyOption ) node () {}
151+ func (c * CreationDispositionKeyOption ) keyOption () {}
152+
101153// CreateSymmetricKeyStatement represents a CREATE SYMMETRIC KEY statement.
102154type CreateSymmetricKeyStatement struct {
103155 Name * Identifier `json:"Name,omitempty"`
@@ -206,6 +258,34 @@ type CreateTypeStatement struct {
206258func (s * CreateTypeStatement ) node () {}
207259func (s * CreateTypeStatement ) statement () {}
208260
261+ // CreateTypeUddtStatement represents a CREATE TYPE ... FROM statement (user-defined data type).
262+ type CreateTypeUddtStatement struct {
263+ Name * SchemaObjectName
264+ DataType DataTypeReference
265+ NullableConstraint * NullableConstraintDefinition
266+ }
267+
268+ func (s * CreateTypeUddtStatement ) node () {}
269+ func (s * CreateTypeUddtStatement ) statement () {}
270+
271+ // CreateTypeUdtStatement represents a CREATE TYPE ... EXTERNAL NAME statement (CLR user-defined type).
272+ type CreateTypeUdtStatement struct {
273+ Name * SchemaObjectName
274+ AssemblyName * AssemblyName
275+ }
276+
277+ func (s * CreateTypeUdtStatement ) node () {}
278+ func (s * CreateTypeUdtStatement ) statement () {}
279+
280+ // CreateTypeTableStatement represents a CREATE TYPE ... AS TABLE statement (table type).
281+ type CreateTypeTableStatement struct {
282+ Name * SchemaObjectName `json:"Name,omitempty"`
283+ Definition * TableDefinition `json:"Definition,omitempty"`
284+ }
285+
286+ func (s * CreateTypeTableStatement ) node () {}
287+ func (s * CreateTypeTableStatement ) statement () {}
288+
209289// CreateXmlIndexStatement represents a CREATE XML INDEX statement.
210290type CreateXmlIndexStatement struct {
211291 Name * Identifier `json:"Name,omitempty"`
0 commit comments