/
types.go
441 lines (320 loc) · 9.85 KB
/
types.go
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
// Code generated by smithy-go-codegen DO NOT EDIT.
package types
import (
smithydocument "github.com/aws/smithy-go/document"
)
// Contains an array.
//
// The following types satisfy this interface:
// ArrayValueMemberArrayValues
// ArrayValueMemberBooleanValues
// ArrayValueMemberDoubleValues
// ArrayValueMemberLongValues
// ArrayValueMemberStringValues
type ArrayValue interface {
isArrayValue()
}
// An array of arrays.
type ArrayValueMemberArrayValues struct {
Value []ArrayValue
noSmithyDocumentSerde
}
func (*ArrayValueMemberArrayValues) isArrayValue() {}
// An array of Boolean values.
type ArrayValueMemberBooleanValues struct {
Value []bool
noSmithyDocumentSerde
}
func (*ArrayValueMemberBooleanValues) isArrayValue() {}
// An array of floating-point numbers.
type ArrayValueMemberDoubleValues struct {
Value []float64
noSmithyDocumentSerde
}
func (*ArrayValueMemberDoubleValues) isArrayValue() {}
// An array of integers.
type ArrayValueMemberLongValues struct {
Value []int64
noSmithyDocumentSerde
}
func (*ArrayValueMemberLongValues) isArrayValue() {}
// An array of strings.
type ArrayValueMemberStringValues struct {
Value []string
noSmithyDocumentSerde
}
func (*ArrayValueMemberStringValues) isArrayValue() {}
// Contains the metadata for a column.
type ColumnMetadata struct {
// The type of the column.
ArrayBaseColumnType int32
// A value that indicates whether the column increments automatically.
IsAutoIncrement bool
// A value that indicates whether the column is case-sensitive.
IsCaseSensitive bool
// A value that indicates whether the column contains currency values.
IsCurrency bool
// A value that indicates whether an integer column is signed.
IsSigned bool
// The label for the column.
Label *string
// The name of the column.
Name *string
// A value that indicates whether the column is nullable.
Nullable int32
// The precision value of a decimal number column.
Precision int32
// The scale value of a decimal number column.
Scale int32
// The name of the schema that owns the table that includes the column.
SchemaName *string
// The name of the table that includes the column.
TableName *string
// The type of the column.
Type int32
// The database-specific data type of the column.
TypeName *string
noSmithyDocumentSerde
}
// Contains a value.
//
// The following types satisfy this interface:
// FieldMemberArrayValue
// FieldMemberBlobValue
// FieldMemberBooleanValue
// FieldMemberDoubleValue
// FieldMemberIsNull
// FieldMemberLongValue
// FieldMemberStringValue
type Field interface {
isField()
}
// An array of values.
type FieldMemberArrayValue struct {
Value ArrayValue
noSmithyDocumentSerde
}
func (*FieldMemberArrayValue) isField() {}
// A value of BLOB data type.
type FieldMemberBlobValue struct {
Value []byte
noSmithyDocumentSerde
}
func (*FieldMemberBlobValue) isField() {}
// A value of Boolean data type.
type FieldMemberBooleanValue struct {
Value bool
noSmithyDocumentSerde
}
func (*FieldMemberBooleanValue) isField() {}
// A value of double data type.
type FieldMemberDoubleValue struct {
Value float64
noSmithyDocumentSerde
}
func (*FieldMemberDoubleValue) isField() {}
// A NULL value.
type FieldMemberIsNull struct {
Value bool
noSmithyDocumentSerde
}
func (*FieldMemberIsNull) isField() {}
// A value of long data type.
type FieldMemberLongValue struct {
Value int64
noSmithyDocumentSerde
}
func (*FieldMemberLongValue) isField() {}
// A value of string data type.
type FieldMemberStringValue struct {
Value string
noSmithyDocumentSerde
}
func (*FieldMemberStringValue) isField() {}
// A record returned by a call. This data structure is only used with the
// deprecated ExecuteSql operation. Use the BatchExecuteStatement or
// ExecuteStatement operation instead.
type Record struct {
// The values returned in the record.
Values []Value
noSmithyDocumentSerde
}
// The result set returned by a SQL statement. This data structure is only used
// with the deprecated ExecuteSql operation. Use the BatchExecuteStatement or
// ExecuteStatement operation instead.
type ResultFrame struct {
// The records in the result set.
Records []Record
// The result-set metadata in the result set.
ResultSetMetadata *ResultSetMetadata
noSmithyDocumentSerde
}
// The metadata of the result set returned by a SQL statement.
type ResultSetMetadata struct {
// The number of columns in the result set.
ColumnCount int64
// The metadata of the columns in the result set.
ColumnMetadata []ColumnMetadata
noSmithyDocumentSerde
}
// Options that control how the result set is returned.
type ResultSetOptions struct {
// A value that indicates how a field of DECIMAL type is represented in the
// response. The value of STRING, the default, specifies that it is converted to a
// String value. The value of DOUBLE_OR_LONG specifies that it is converted to a
// Long value if its scale is 0, or to a Double value otherwise. Conversion to
// Double or Long can result in roundoff errors due to precision loss. We recommend
// converting to String, especially when working with currency values.
DecimalReturnType DecimalReturnType
// A value that indicates how a field of LONG type is represented. Allowed values
// are LONG and STRING. The default is LONG. Specify STRING if the length or
// precision of numeric values might cause truncation or rounding errors.
LongReturnType LongReturnType
noSmithyDocumentSerde
}
// A parameter used in a SQL statement.
type SqlParameter struct {
// The name of the parameter.
Name *string
// A hint that specifies the correct object type for data type mapping. Possible
// values are as follows:
//
// * DATE - The corresponding String parameter value is
// sent as an object of DATE type to the database. The accepted format is
// YYYY-MM-DD.
//
// * DECIMAL - The corresponding String parameter value is sent as an
// object of DECIMAL type to the database.
//
// * JSON - The corresponding String
// parameter value is sent as an object of JSON type to the database.
//
// * TIME - The
// corresponding String parameter value is sent as an object of TIME type to the
// database. The accepted format is HH:MM:SS[.FFF].
//
// * TIMESTAMP - The
// corresponding String parameter value is sent as an object of TIMESTAMP type to
// the database. The accepted format is YYYY-MM-DD HH:MM:SS[.FFF].
//
// * UUID - The
// corresponding String parameter value is sent as an object of UUID type to the
// database.
TypeHint TypeHint
// The value of the parameter.
Value Field
noSmithyDocumentSerde
}
// The result of a SQL statement. This data structure is only used with the
// deprecated ExecuteSql operation. Use the BatchExecuteStatement or
// ExecuteStatement operation instead.
type SqlStatementResult struct {
// The number of records updated by a SQL statement.
NumberOfRecordsUpdated int64
// The result set of the SQL statement.
ResultFrame *ResultFrame
noSmithyDocumentSerde
}
// A structure value returned by a call. This data structure is only used with the
// deprecated ExecuteSql operation. Use the BatchExecuteStatement or
// ExecuteStatement operation instead.
type StructValue struct {
// The attributes returned in the record.
Attributes []Value
noSmithyDocumentSerde
}
// The response elements represent the results of an update.
type UpdateResult struct {
// Values for fields generated during the request.
GeneratedFields []Field
noSmithyDocumentSerde
}
// Contains the value of a column. This data structure is only used with the
// deprecated ExecuteSql operation. Use the BatchExecuteStatement or
// ExecuteStatement operation instead.
//
// The following types satisfy this interface:
// ValueMemberArrayValues
// ValueMemberBigIntValue
// ValueMemberBitValue
// ValueMemberBlobValue
// ValueMemberDoubleValue
// ValueMemberIntValue
// ValueMemberIsNull
// ValueMemberRealValue
// ValueMemberStringValue
// ValueMemberStructValue
type Value interface {
isValue()
}
// An array of column values.
type ValueMemberArrayValues struct {
Value []Value
noSmithyDocumentSerde
}
func (*ValueMemberArrayValues) isValue() {}
// A value for a column of big integer data type.
type ValueMemberBigIntValue struct {
Value int64
noSmithyDocumentSerde
}
func (*ValueMemberBigIntValue) isValue() {}
// A value for a column of BIT data type.
type ValueMemberBitValue struct {
Value bool
noSmithyDocumentSerde
}
func (*ValueMemberBitValue) isValue() {}
// A value for a column of BLOB data type.
type ValueMemberBlobValue struct {
Value []byte
noSmithyDocumentSerde
}
func (*ValueMemberBlobValue) isValue() {}
// A value for a column of double data type.
type ValueMemberDoubleValue struct {
Value float64
noSmithyDocumentSerde
}
func (*ValueMemberDoubleValue) isValue() {}
// A value for a column of integer data type.
type ValueMemberIntValue struct {
Value int32
noSmithyDocumentSerde
}
func (*ValueMemberIntValue) isValue() {}
// A NULL value.
type ValueMemberIsNull struct {
Value bool
noSmithyDocumentSerde
}
func (*ValueMemberIsNull) isValue() {}
// A value for a column of real data type.
type ValueMemberRealValue struct {
Value float32
noSmithyDocumentSerde
}
func (*ValueMemberRealValue) isValue() {}
// A value for a column of string data type.
type ValueMemberStringValue struct {
Value string
noSmithyDocumentSerde
}
func (*ValueMemberStringValue) isValue() {}
// A value for a column of STRUCT data type.
type ValueMemberStructValue struct {
Value StructValue
noSmithyDocumentSerde
}
func (*ValueMemberStructValue) isValue() {}
type noSmithyDocumentSerde = smithydocument.NoSerde
// UnknownUnionMember is returned when a union member is returned over the wire,
// but has an unknown tag.
type UnknownUnionMember struct {
Tag string
Value []byte
noSmithyDocumentSerde
}
func (*UnknownUnionMember) isArrayValue() {}
func (*UnknownUnionMember) isField() {}
func (*UnknownUnionMember) isValue() {}