-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_simple_statements.go
More file actions
581 lines (461 loc) · 23 KB
/
create_simple_statements.go
File metadata and controls
581 lines (461 loc) · 23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
package ast
// CreateDatabaseStatement represents a CREATE DATABASE statement.
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
}
// ContainmentDatabaseOption represents CONTAINMENT = NONE/PARTIAL
type ContainmentDatabaseOption struct {
Value string // "None" or "Partial"
OptionKind string // Always "Containment"
}
func (c *ContainmentDatabaseOption) node() {}
func (c *ContainmentDatabaseOption) createDatabaseOption() {}
func (s *CreateDatabaseStatement) node() {}
func (s *CreateDatabaseStatement) statement() {}
// CreateLoginStatement represents a CREATE LOGIN statement.
type CreateLoginStatement struct {
Name *Identifier `json:"Name,omitempty"`
Source CreateLoginSource `json:"Source,omitempty"`
}
func (s *CreateLoginStatement) node() {}
func (s *CreateLoginStatement) statement() {}
// AlterLoginEnableDisableStatement represents ALTER LOGIN name ENABLE/DISABLE
type AlterLoginEnableDisableStatement struct {
Name *Identifier `json:"Name,omitempty"`
IsEnable bool `json:"IsEnable"`
}
func (s *AlterLoginEnableDisableStatement) node() {}
func (s *AlterLoginEnableDisableStatement) statement() {}
// AlterLoginOptionsStatement represents ALTER LOGIN name WITH options
type AlterLoginOptionsStatement struct {
Name *Identifier `json:"Name,omitempty"`
Options []PrincipalOption `json:"Options,omitempty"`
}
func (s *AlterLoginOptionsStatement) node() {}
func (s *AlterLoginOptionsStatement) statement() {}
// DropLoginStatement represents DROP LOGIN name
type DropLoginStatement struct {
Name *Identifier `json:"Name,omitempty"`
IsIfExists bool `json:"IsIfExists"`
}
func (s *DropLoginStatement) node() {}
func (s *DropLoginStatement) statement() {}
// CreateLoginSource is an interface for login sources
type CreateLoginSource interface {
createLoginSource()
}
// ExternalCreateLoginSource represents FROM EXTERNAL PROVIDER source
type ExternalCreateLoginSource struct {
Options []PrincipalOption `json:"Options,omitempty"`
}
func (s *ExternalCreateLoginSource) createLoginSource() {}
// PasswordCreateLoginSource represents WITH PASSWORD = '...' source
type PasswordCreateLoginSource struct {
Password ScalarExpression `json:"Password,omitempty"`
Hashed bool `json:"Hashed"`
MustChange bool `json:"MustChange"`
Options []PrincipalOption `json:"Options,omitempty"`
}
func (s *PasswordCreateLoginSource) createLoginSource() {}
// WindowsCreateLoginSource represents FROM WINDOWS source
type WindowsCreateLoginSource struct {
Options []PrincipalOption `json:"Options,omitempty"`
}
func (s *WindowsCreateLoginSource) createLoginSource() {}
// CertificateCreateLoginSource represents FROM CERTIFICATE source
type CertificateCreateLoginSource struct {
Certificate *Identifier `json:"Certificate,omitempty"`
Credential *Identifier `json:"Credential,omitempty"`
}
func (s *CertificateCreateLoginSource) createLoginSource() {}
// AsymmetricKeyCreateLoginSource represents FROM ASYMMETRIC KEY source
type AsymmetricKeyCreateLoginSource struct {
Key *Identifier `json:"Key,omitempty"`
Credential *Identifier `json:"Credential,omitempty"`
}
func (s *AsymmetricKeyCreateLoginSource) createLoginSource() {}
// PrincipalOption is an interface for principal options (SID, TYPE, etc.)
type PrincipalOption interface {
principalOptionNode()
}
// ServiceContract represents a contract in CREATE/ALTER SERVICE.
type ServiceContract struct {
Name *Identifier `json:"Name,omitempty"`
Action string `json:"Action,omitempty"` // "Add", "Drop", "None"
}
func (s *ServiceContract) node() {}
// CreateServiceStatement represents a CREATE SERVICE statement.
type CreateServiceStatement struct {
Owner *Identifier `json:"Owner,omitempty"`
Name *Identifier `json:"Name,omitempty"`
QueueName *SchemaObjectName `json:"QueueName,omitempty"`
ServiceContracts []*ServiceContract `json:"ServiceContracts,omitempty"`
}
func (s *CreateServiceStatement) node() {}
func (s *CreateServiceStatement) statement() {}
// QueueOption is an interface for queue options.
type QueueOption interface {
node()
queueOption()
}
// QueueStateOption represents a queue state option (STATUS, RETENTION, POISON_MESSAGE_HANDLING).
type QueueStateOption struct {
OptionState string `json:"OptionState,omitempty"` // "On" or "Off"
OptionKind string `json:"OptionKind,omitempty"` // "Status", "Retention", "PoisonMessageHandlingStatus"
}
func (o *QueueStateOption) node() {}
func (o *QueueStateOption) queueOption() {}
// QueueOptionSimple represents a simple queue option like ActivationDrop.
type QueueOptionSimple struct {
OptionKind string `json:"OptionKind,omitempty"` // e.g. "ActivationDrop"
}
func (o *QueueOptionSimple) node() {}
func (o *QueueOptionSimple) queueOption() {}
// QueueProcedureOption represents a PROCEDURE_NAME option.
type QueueProcedureOption struct {
OptionValue *SchemaObjectName `json:"OptionValue,omitempty"`
OptionKind string `json:"OptionKind,omitempty"` // "ActivationProcedureName"
}
func (o *QueueProcedureOption) node() {}
func (o *QueueProcedureOption) queueOption() {}
// QueueValueOption represents an option with an integer value.
type QueueValueOption struct {
OptionValue ScalarExpression `json:"OptionValue,omitempty"`
OptionKind string `json:"OptionKind,omitempty"` // "ActivationMaxQueueReaders"
}
func (o *QueueValueOption) node() {}
func (o *QueueValueOption) queueOption() {}
// QueueExecuteAsOption represents an EXECUTE AS option.
type QueueExecuteAsOption struct {
OptionValue *ExecuteAsClause `json:"OptionValue,omitempty"`
OptionKind string `json:"OptionKind,omitempty"` // "ActivationExecuteAs"
}
func (o *QueueExecuteAsOption) node() {}
func (o *QueueExecuteAsOption) queueOption() {}
// CreateQueueStatement represents a CREATE QUEUE statement.
type CreateQueueStatement struct {
Name *SchemaObjectName `json:"Name,omitempty"`
OnFileGroup *IdentifierOrValueExpression `json:"OnFileGroup,omitempty"`
QueueOptions []QueueOption `json:"QueueOptions,omitempty"`
}
func (s *CreateQueueStatement) node() {}
func (s *CreateQueueStatement) statement() {}
// CreateRouteStatement represents a CREATE ROUTE statement.
type CreateRouteStatement struct {
Name *Identifier `json:"Name,omitempty"`
Owner *Identifier `json:"Owner,omitempty"`
RouteOptions []*RouteOption `json:"RouteOptions,omitempty"`
}
func (s *CreateRouteStatement) node() {}
func (s *CreateRouteStatement) statement() {}
// RouteOption represents an option in CREATE/ALTER ROUTE statement.
type RouteOption struct {
OptionKind string `json:"OptionKind,omitempty"`
Literal ScalarExpression `json:"Literal,omitempty"`
}
func (r *RouteOption) node() {}
// CreateEndpointStatement represents a CREATE ENDPOINT statement.
type CreateEndpointStatement struct {
Name *Identifier `json:"Name,omitempty"`
}
func (s *CreateEndpointStatement) node() {}
func (s *CreateEndpointStatement) statement() {}
// CreateAssemblyStatement represents a CREATE ASSEMBLY statement.
type CreateAssemblyStatement struct {
Name *Identifier `json:"Name,omitempty"`
Owner *Identifier `json:"Owner,omitempty"`
Parameters []ScalarExpression `json:"Parameters,omitempty"`
Options []AssemblyOptionBase `json:"Options,omitempty"`
}
func (s *CreateAssemblyStatement) node() {}
func (s *CreateAssemblyStatement) statement() {}
// CreateCertificateStatement represents a CREATE CERTIFICATE statement.
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"`
}
func (s *CreateCertificateStatement) node() {}
func (s *CreateCertificateStatement) statement() {}
// CertificateOption represents an option in a CREATE CERTIFICATE statement.
type CertificateOption struct {
Kind string `json:"Kind,omitempty"` // "Subject", "StartDate", "ExpiryDate"
Value *StringLiteral `json:"Value,omitempty"`
}
func (o *CertificateOption) node() {}
// AssemblyEncryptionSource represents a certificate source from an assembly.
type AssemblyEncryptionSource struct {
Assembly *Identifier `json:"Assembly,omitempty"`
}
func (s *AssemblyEncryptionSource) node() {}
func (s *AssemblyEncryptionSource) encryptionSource() {}
// FileEncryptionSource represents a certificate source from a file.
type FileEncryptionSource struct {
IsExecutable bool `json:"IsExecutable,omitempty"`
File *StringLiteral `json:"File,omitempty"`
}
func (s *FileEncryptionSource) node() {}
func (s *FileEncryptionSource) encryptionSource() {}
// CreateAsymmetricKeyStatement represents a CREATE ASYMMETRIC KEY statement.
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"`
}
func (s *CreateAsymmetricKeyStatement) node() {}
func (s *CreateAsymmetricKeyStatement) statement() {}
// EncryptionSource is an interface for key sources.
type EncryptionSource interface {
Node
encryptionSource()
}
// ProviderEncryptionSource represents a key source from a provider.
type ProviderEncryptionSource struct {
Name *Identifier `json:"Name,omitempty"`
KeyOptions []KeyOption `json:"KeyOptions,omitempty"`
}
func (p *ProviderEncryptionSource) node() {}
func (p *ProviderEncryptionSource) encryptionSource() {}
// KeyOption is an interface for key options.
type KeyOption interface {
Node
keyOption()
}
// AlgorithmKeyOption represents an ALGORITHM key option.
type AlgorithmKeyOption struct {
Algorithm string `json:"Algorithm,omitempty"`
OptionKind string `json:"OptionKind,omitempty"`
}
func (a *AlgorithmKeyOption) node() {}
func (a *AlgorithmKeyOption) keyOption() {}
// ProviderKeyNameKeyOption represents a PROVIDER_KEY_NAME key option.
type ProviderKeyNameKeyOption struct {
KeyName ScalarExpression `json:"KeyName,omitempty"`
OptionKind string `json:"OptionKind,omitempty"`
}
func (p *ProviderKeyNameKeyOption) node() {}
func (p *ProviderKeyNameKeyOption) keyOption() {}
// CreationDispositionKeyOption represents a CREATION_DISPOSITION key option.
type CreationDispositionKeyOption struct {
IsCreateNew bool `json:"IsCreateNew,omitempty"`
OptionKind string `json:"OptionKind,omitempty"`
}
func (c *CreationDispositionKeyOption) node() {}
func (c *CreationDispositionKeyOption) keyOption() {}
// KeySourceKeyOption represents a KEY_SOURCE key option.
type KeySourceKeyOption struct {
PassPhrase ScalarExpression `json:"PassPhrase,omitempty"`
OptionKind string `json:"OptionKind,omitempty"`
}
func (k *KeySourceKeyOption) node() {}
func (k *KeySourceKeyOption) keyOption() {}
// IdentityValueKeyOption represents an IDENTITY_VALUE key option.
type IdentityValueKeyOption struct {
IdentityPhrase ScalarExpression `json:"IdentityPhrase,omitempty"`
OptionKind string `json:"OptionKind,omitempty"`
}
func (i *IdentityValueKeyOption) node() {}
func (i *IdentityValueKeyOption) keyOption() {}
// CryptoMechanism represents an encryption mechanism (CERTIFICATE, KEY, PASSWORD, etc.)
type CryptoMechanism struct {
CryptoMechanismType string `json:"CryptoMechanismType,omitempty"` // "Certificate", "SymmetricKey", "AsymmetricKey", "Password"
Identifier *Identifier `json:"Identifier,omitempty"`
PasswordOrSignature ScalarExpression `json:"PasswordOrSignature,omitempty"`
}
func (c *CryptoMechanism) node() {}
// CreateSymmetricKeyStatement represents a CREATE SYMMETRIC KEY statement.
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"`
}
func (s *CreateSymmetricKeyStatement) node() {}
func (s *CreateSymmetricKeyStatement) statement() {}
// DropSymmetricKeyStatement represents a DROP SYMMETRIC KEY statement.
type DropSymmetricKeyStatement struct {
RemoveProviderKey bool `json:"RemoveProviderKey,omitempty"`
Name *Identifier `json:"Name,omitempty"`
IsIfExists bool `json:"IsIfExists"`
}
func (s *DropSymmetricKeyStatement) node() {}
func (s *DropSymmetricKeyStatement) statement() {}
// CreateMessageTypeStatement represents a CREATE MESSAGE TYPE statement.
type CreateMessageTypeStatement struct {
Name *Identifier `json:"Name,omitempty"`
Owner *Identifier `json:"Owner,omitempty"`
ValidationMethod string `json:"ValidationMethod,omitempty"`
XmlSchemaCollectionName *SchemaObjectName `json:"XmlSchemaCollectionName,omitempty"`
}
func (s *CreateMessageTypeStatement) node() {}
func (s *CreateMessageTypeStatement) statement() {}
// CreateRemoteServiceBindingStatement represents a CREATE REMOTE SERVICE BINDING statement.
type CreateRemoteServiceBindingStatement struct {
Name *Identifier `json:"Name,omitempty"`
Service ScalarExpression `json:"Service,omitempty"`
Options []RemoteServiceBindingOption `json:"Options,omitempty"`
}
func (s *CreateRemoteServiceBindingStatement) node() {}
func (s *CreateRemoteServiceBindingStatement) statement() {}
// CreateApplicationRoleStatement represents a CREATE APPLICATION ROLE statement.
type CreateApplicationRoleStatement struct {
Name *Identifier `json:"Name,omitempty"`
ApplicationRoleOptions []*ApplicationRoleOption `json:"ApplicationRoleOptions,omitempty"`
}
func (s *CreateApplicationRoleStatement) node() {}
func (s *CreateApplicationRoleStatement) statement() {}
// ApplicationRoleOption represents an option in CREATE/ALTER APPLICATION ROLE
type ApplicationRoleOption struct {
OptionKind string `json:"OptionKind,omitempty"`
Value *IdentifierOrValueExpression `json:"Value,omitempty"`
}
func (o *ApplicationRoleOption) node() {}
// CreateFulltextCatalogStatement represents a CREATE FULLTEXT CATALOG statement.
type CreateFulltextCatalogStatement struct {
Name *Identifier `json:"Name,omitempty"`
}
func (s *CreateFulltextCatalogStatement) node() {}
func (s *CreateFulltextCatalogStatement) statement() {}
// CreateFulltextIndexStatement represents a CREATE FULLTEXT INDEX statement.
type CreateFulltextIndexStatement struct {
OnName *SchemaObjectName `json:"OnName,omitempty"`
}
func (s *CreateFulltextIndexStatement) node() {}
func (s *CreateFulltextIndexStatement) statement() {}
// PartitionParameterType represents the parameter type in a partition function.
type PartitionParameterType struct {
DataType *SqlDataTypeReference `json:"DataType,omitempty"`
Collation *Identifier `json:"Collation,omitempty"`
}
func (p *PartitionParameterType) node() {}
// CreatePartitionFunctionStatement represents a CREATE PARTITION FUNCTION statement.
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"`
}
func (s *CreatePartitionFunctionStatement) node() {}
func (s *CreatePartitionFunctionStatement) statement() {}
// CreateIndexStatement represents a CREATE INDEX statement.
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"`
}
func (s *CreateIndexStatement) node() {}
func (s *CreateIndexStatement) statement() {}
// CreateStatisticsStatement represents a CREATE STATISTICS statement.
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"`
}
func (s *CreateStatisticsStatement) node() {}
func (s *CreateStatisticsStatement) statement() {}
// CreateTypeStatement represents a CREATE TYPE statement.
type CreateTypeStatement struct {
Name *SchemaObjectName `json:"Name,omitempty"`
}
func (s *CreateTypeStatement) node() {}
func (s *CreateTypeStatement) statement() {}
// CreateTypeUddtStatement represents a CREATE TYPE ... FROM statement (user-defined data type).
type CreateTypeUddtStatement struct {
Name *SchemaObjectName
DataType DataTypeReference
NullableConstraint *NullableConstraintDefinition
}
func (s *CreateTypeUddtStatement) node() {}
func (s *CreateTypeUddtStatement) statement() {}
// CreateTypeUdtStatement represents a CREATE TYPE ... EXTERNAL NAME statement (CLR user-defined type).
type CreateTypeUdtStatement struct {
Name *SchemaObjectName
AssemblyName *AssemblyName
}
func (s *CreateTypeUdtStatement) node() {}
func (s *CreateTypeUdtStatement) statement() {}
// CreateTypeTableStatement represents a CREATE TYPE ... AS TABLE statement (table type).
type CreateTypeTableStatement struct {
Name *SchemaObjectName `json:"Name,omitempty"`
Definition *TableDefinition `json:"Definition,omitempty"`
Options []TableOption `json:"Options,omitempty"`
}
func (s *CreateTypeTableStatement) node() {}
func (s *CreateTypeTableStatement) statement() {}
// CreateXmlIndexStatement represents a CREATE XML INDEX statement.
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"`
}
func (s *CreateXmlIndexStatement) node() {}
func (s *CreateXmlIndexStatement) statement() {}
// EventNotificationObjectScope represents the scope of an event notification (SERVER, DATABASE, or QUEUE).
type EventNotificationObjectScope struct {
Target string `json:"Target,omitempty"` // "Server", "Database", or "Queue"
QueueName *SchemaObjectName `json:"QueueName,omitempty"`
}
func (s *EventNotificationObjectScope) node() {}
// EventTypeGroupContainer is an interface for event type/group containers.
type EventTypeGroupContainer interface {
node()
eventTypeGroupContainer()
}
// EventGroupContainer represents a group of events.
type EventGroupContainer struct {
EventGroup string `json:"EventGroup,omitempty"`
}
func (c *EventGroupContainer) node() {}
func (c *EventGroupContainer) eventTypeGroupContainer() {}
// CreateEventNotificationStatement represents a CREATE EVENT NOTIFICATION statement.
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"`
}
func (s *CreateEventNotificationStatement) node() {}
func (s *CreateEventNotificationStatement) statement() {}
// CreateDatabaseEncryptionKeyStatement represents a CREATE DATABASE ENCRYPTION KEY statement.
type CreateDatabaseEncryptionKeyStatement struct {
Algorithm string `json:"Algorithm,omitempty"`
Encryptor *CryptoMechanism `json:"Encryptor,omitempty"`
}
func (s *CreateDatabaseEncryptionKeyStatement) node() {}
func (s *CreateDatabaseEncryptionKeyStatement) statement() {}
// DropDatabaseEncryptionKeyStatement represents a DROP DATABASE ENCRYPTION KEY statement.
type DropDatabaseEncryptionKeyStatement struct{}
func (s *DropDatabaseEncryptionKeyStatement) node() {}
func (s *DropDatabaseEncryptionKeyStatement) statement() {}