-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathexport.go
454 lines (339 loc) · 17.1 KB
/
export.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
442
443
444
445
446
447
448
449
450
451
452
453
454
// This source file is part of the EdgeDB open source project.
//
// Copyright EdgeDB Inc. and the EdgeDB authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// This file is auto generated. Do not edit!
// run 'go generate ./...' to regenerate
package edgedb
import (
edgedb "github.com/edgedb/edgedb-go/internal/client"
"github.com/edgedb/edgedb-go/internal/edgedbtypes"
)
const (
// NetworkError indicates that the transaction was interupted
// by a network error.
NetworkError = edgedb.NetworkError
// Serializable is the only isolation level
Serializable = edgedb.Serializable
// TLSModeDefault makes security mode inferred from other options
TLSModeDefault = edgedb.TLSModeDefault
// TLSModeInsecure results in no certificate verification whatsoever
TLSModeInsecure = edgedb.TLSModeInsecure
// TLSModeNoHostVerification enables certificate verification
// against CAs, but hostname matching is not performed.
TLSModeNoHostVerification = edgedb.TLSModeNoHostVerification
// TLSModeStrict enables full certificate and hostname verification.
TLSModeStrict = edgedb.TLSModeStrict
// TxConflict indicates that the server could not complete a transaction
// because it encountered a deadlock or serialization error.
TxConflict = edgedb.TxConflict
)
type (
// Client is a connection pool and is safe for concurrent use.
Client = edgedb.Client
// DateDuration represents the elapsed time between two dates in a fuzzy human
// way.
DateDuration = edgedbtypes.DateDuration
// Duration represents the elapsed time between two instants
// as an int64 microsecond count.
Duration = edgedbtypes.Duration
// Error is the error type returned from edgedb.
Error = edgedb.Error
// ErrorCategory values represent EdgeDB's error types.
ErrorCategory = edgedb.ErrorCategory
// ErrorTag is the argument type to Error.HasTag().
ErrorTag = edgedb.ErrorTag
// Executor is a common interface between *Client and *Tx,
// that can run queries on an EdgeDB database.
Executor = edgedb.Executor
// IsolationLevel documentation can be found here
// https://www.edgedb.com/docs/reference/edgeql/tx_start#parameters
IsolationLevel = edgedb.IsolationLevel
// LocalDate is a date without a time zone.
// https://www.edgedb.com/docs/stdlib/datetime#type::cal::local_date
LocalDate = edgedbtypes.LocalDate
// LocalDateTime is a date and time without timezone.
// https://www.edgedb.com/docs/stdlib/datetime#type::cal::local_datetime
LocalDateTime = edgedbtypes.LocalDateTime
// LocalTime is a time without a time zone.
// https://www.edgedb.com/docs/stdlib/datetime#type::cal::local_time
LocalTime = edgedbtypes.LocalTime
// Memory represents memory in bytes.
Memory = edgedbtypes.Memory
// ModuleAlias is an alias name and module name pair.
ModuleAlias = edgedb.ModuleAlias
// Optional represents a shape field that is not required.
// Optional is embedded in structs to make them optional. For example:
//
// type User struct {
// edgedb.Optional
// Name string `edgedb:"name"`
// }
Optional = edgedbtypes.Optional
// OptionalBigInt is an optional *big.Int. Optional types must be used for out
// parameters when a shape field is not required.
OptionalBigInt = edgedbtypes.OptionalBigInt
// OptionalBool is an optional bool. Optional types must be used for out
// parameters when a shape field is not required.
OptionalBool = edgedbtypes.OptionalBool
// OptionalBytes is an optional []byte. Optional types must be used for out
// parameters when a shape field is not required.
OptionalBytes = edgedbtypes.OptionalBytes
// OptionalDateDuration is an optional DateDuration. Optional types
// must be used for out parameters when a shape field is not required.
OptionalDateDuration = edgedbtypes.OptionalDateDuration
// OptionalDateTime is an optional time.Time. Optional types must be used for
// out parameters when a shape field is not required.
OptionalDateTime = edgedbtypes.OptionalDateTime
// OptionalDuration is an optional Duration. Optional types must be used for
// out parameters when a shape field is not required.
OptionalDuration = edgedbtypes.OptionalDuration
// OptionalFloat32 is an optional float32. Optional types must be used for out
// parameters when a shape field is not required.
OptionalFloat32 = edgedbtypes.OptionalFloat32
// OptionalFloat64 is an optional float64. Optional types must be used for out
// parameters when a shape field is not required.
OptionalFloat64 = edgedbtypes.OptionalFloat64
// OptionalInt16 is an optional int16. Optional types must be used for out
// parameters when a shape field is not required.
OptionalInt16 = edgedbtypes.OptionalInt16
// OptionalInt32 is an optional int32. Optional types must be used for out
// parameters when a shape field is not required.
OptionalInt32 = edgedbtypes.OptionalInt32
// OptionalInt64 is an optional int64. Optional types must be used for out
// parameters when a shape field is not required.
OptionalInt64 = edgedbtypes.OptionalInt64
// OptionalLocalDate is an optional LocalDate. Optional types must be used for
// out parameters when a shape field is not required.
OptionalLocalDate = edgedbtypes.OptionalLocalDate
// OptionalLocalDateTime is an optional LocalDateTime. Optional types must be
// used for out parameters when a shape field is not required.
OptionalLocalDateTime = edgedbtypes.OptionalLocalDateTime
// OptionalLocalTime is an optional LocalTime. Optional types must be used for
// out parameters when a shape field is not required.
OptionalLocalTime = edgedbtypes.OptionalLocalTime
// OptionalMemory is an optional Memory. Optional types must be used for
// out parameters when a shape field is not required.
OptionalMemory = edgedbtypes.OptionalMemory
// OptionalRangeDateTime is an optional RangeDateTime. Optional
// types must be used for out parameters when a shape field is not required.
OptionalRangeDateTime = edgedbtypes.OptionalRangeDateTime
// OptionalRangeFloat32 is an optional RangeFloat32. Optional
// types must be used for out parameters when a shape field is not required.
OptionalRangeFloat32 = edgedbtypes.OptionalRangeFloat32
// OptionalRangeFloat64 is an optional RangeFloat64. Optional
// types must be used for out parameters when a shape field is not required.
OptionalRangeFloat64 = edgedbtypes.OptionalRangeFloat64
// OptionalRangeInt32 is an optional RangeInt32. Optional types must be used
// for out parameters when a shape field is not required.
OptionalRangeInt32 = edgedbtypes.OptionalRangeInt32
// OptionalRangeInt64 is an optional RangeInt64. Optional
// types must be used for out parameters when a shape field is not required.
OptionalRangeInt64 = edgedbtypes.OptionalRangeInt64
// OptionalRangeLocalDate is an optional RangeLocalDate. Optional types must be
// used for out parameters when a shape field is not required.
OptionalRangeLocalDate = edgedbtypes.OptionalRangeLocalDate
// OptionalRangeLocalDateTime is an optional RangeLocalDateTime. Optional
// types must be used for out parameters when a shape field is not required.
OptionalRangeLocalDateTime = edgedbtypes.OptionalRangeLocalDateTime
// OptionalRelativeDuration is an optional RelativeDuration. Optional types
// must be used for out parameters when a shape field is not required.
OptionalRelativeDuration = edgedbtypes.OptionalRelativeDuration
// OptionalStr is an optional string. Optional types must be used for out
// parameters when a shape field is not required.
OptionalStr = edgedbtypes.OptionalStr
// OptionalUUID is an optional UUID. Optional types must be used for out
// parameters when a shape field is not required.
OptionalUUID = edgedbtypes.OptionalUUID
// Options for connecting to an EdgeDB server
Options = edgedb.Options
// RangeDateTime is an interval of time.Time values.
RangeDateTime = edgedbtypes.RangeDateTime
// RangeFloat32 is an interval of float32 values.
RangeFloat32 = edgedbtypes.RangeFloat32
// RangeFloat64 is an interval of float64 values.
RangeFloat64 = edgedbtypes.RangeFloat64
// RangeInt32 is an interval of int32 values.
RangeInt32 = edgedbtypes.RangeInt32
// RangeInt64 is an interval of int64 values.
RangeInt64 = edgedbtypes.RangeInt64
// RangeLocalDate is an interval of LocalDate values.
RangeLocalDate = edgedbtypes.RangeLocalDate
// RangeLocalDateTime is an interval of LocalDateTime values.
RangeLocalDateTime = edgedbtypes.RangeLocalDateTime
// RelativeDuration represents the elapsed time between two instants in a fuzzy
// human way.
RelativeDuration = edgedbtypes.RelativeDuration
// RetryBackoff returns the duration to wait after the nth attempt
// before making the next attempt when retrying a transaction.
RetryBackoff = edgedb.RetryBackoff
// RetryCondition represents scenarios that can cause a transaction
// run in Tx() methods to be retried.
RetryCondition = edgedb.RetryCondition
// RetryOptions configures how Tx() retries failed transactions. Use
// NewRetryOptions to get a default RetryOptions value instead of creating one
// yourself.
RetryOptions = edgedb.RetryOptions
// RetryRule determines how transactions should be retried when run in Tx()
// methods. See Client.Tx() for details.
RetryRule = edgedb.RetryRule
// TLSOptions contains the parameters needed to configure TLS on EdgeDB
// server connections.
TLSOptions = edgedb.TLSOptions
// TLSSecurityMode specifies how strict TLS validation is.
TLSSecurityMode = edgedb.TLSSecurityMode
// Tx is a transaction. Use Client.Tx() to get a transaction.
Tx = edgedb.Tx
// TxBlock is work to be done in a transaction.
TxBlock = edgedb.TxBlock
// TxOptions configures how transactions behave.
TxOptions = edgedb.TxOptions
// UUID is a universally unique identifier
// https://www.edgedb.com/docs/stdlib/uuid
UUID = edgedbtypes.UUID
// WarningHandler takes a slice of edgedb.Error that represent warnings and
// optionally returns an error. This can be used to log warnings, increment
// metrics, promote warnings to errors by returning them etc.
WarningHandler = edgedb.WarningHandler
)
var (
// CreateClient returns a new client. The client connects lazily. Call
// Client.EnsureConnected() to force a connection.
CreateClient = edgedb.CreateClient
// CreateClientDSN returns a new client. See also CreateClient.
//
// dsn is either an instance name
// https://www.edgedb.com/docs/clients/connection
// or it specifies a single string in the following format:
//
// edgedb://user:password@host:port/database?option=value.
//
// The following options are recognized: host, port, user, database, password.
CreateClientDSN = edgedb.CreateClientDSN
// DurationFromNanoseconds creates a Duration represented as microseconds
// from a [time.Duration] represented as nanoseconds.
DurationFromNanoseconds = edgedbtypes.DurationFromNanoseconds
// LogWarnings is an edgedb.WarningHandler that logs warnings.
LogWarnings = edgedb.LogWarnings
// NewDateDuration returns a new DateDuration
NewDateDuration = edgedbtypes.NewDateDuration
// NewLocalDate returns a new LocalDate
NewLocalDate = edgedbtypes.NewLocalDate
// NewLocalDateTime returns a new LocalDateTime
NewLocalDateTime = edgedbtypes.NewLocalDateTime
// NewLocalTime returns a new LocalTime
NewLocalTime = edgedbtypes.NewLocalTime
// NewOptionalBigInt is a convenience function for creating an OptionalBigInt
// with its value set to v.
NewOptionalBigInt = edgedbtypes.NewOptionalBigInt
// NewOptionalBool is a convenience function for creating an OptionalBool with
// its value set to v.
NewOptionalBool = edgedbtypes.NewOptionalBool
// NewOptionalBytes is a convenience function for creating an OptionalBytes
// with its value set to v.
NewOptionalBytes = edgedbtypes.NewOptionalBytes
// NewOptionalDateDuration is a convenience function for creating an
// OptionalDateDuration with its value set to v.
NewOptionalDateDuration = edgedbtypes.NewOptionalDateDuration
// NewOptionalDateTime is a convenience function for creating an
// OptionalDateTime with its value set to v.
NewOptionalDateTime = edgedbtypes.NewOptionalDateTime
// NewOptionalDuration is a convenience function for creating an
// OptionalDuration with its value set to v.
NewOptionalDuration = edgedbtypes.NewOptionalDuration
// NewOptionalFloat32 is a convenience function for creating an OptionalFloat32
// with its value set to v.
NewOptionalFloat32 = edgedbtypes.NewOptionalFloat32
// NewOptionalFloat64 is a convenience function for creating an OptionalFloat64
// with its value set to v.
NewOptionalFloat64 = edgedbtypes.NewOptionalFloat64
// NewOptionalInt16 is a convenience function for creating an OptionalInt16
// with its value set to v.
NewOptionalInt16 = edgedbtypes.NewOptionalInt16
// NewOptionalInt32 is a convenience function for creating an OptionalInt32
// with its value set to v.
NewOptionalInt32 = edgedbtypes.NewOptionalInt32
// NewOptionalInt64 is a convenience function for creating an OptionalInt64
// with its value set to v.
NewOptionalInt64 = edgedbtypes.NewOptionalInt64
// NewOptionalLocalDate is a convenience function for creating an
// OptionalLocalDate with its value set to v.
NewOptionalLocalDate = edgedbtypes.NewOptionalLocalDate
// NewOptionalLocalDateTime is a convenience function for creating an
// OptionalLocalDateTime with its value set to v.
NewOptionalLocalDateTime = edgedbtypes.NewOptionalLocalDateTime
// NewOptionalLocalTime is a convenience function for creating an
// OptionalLocalTime with its value set to v.
NewOptionalLocalTime = edgedbtypes.NewOptionalLocalTime
// NewOptionalMemory is a convenience function for creating an
// OptionalMemory with its value set to v.
NewOptionalMemory = edgedbtypes.NewOptionalMemory
// NewOptionalRangeDateTime is a convenience function for creating an
// OptionalRangeDateTime with its value set to v.
NewOptionalRangeDateTime = edgedbtypes.NewOptionalRangeDateTime
// NewOptionalRangeFloat32 is a convenience function for creating an
// OptionalRangeFloat32 with its value set to v.
NewOptionalRangeFloat32 = edgedbtypes.NewOptionalRangeFloat32
// NewOptionalRangeFloat64 is a convenience function for creating an
// OptionalRangeFloat64 with its value set to v.
NewOptionalRangeFloat64 = edgedbtypes.NewOptionalRangeFloat64
// NewOptionalRangeInt32 is a convenience function for creating an
// OptionalRangeInt32 with its value set to v.
NewOptionalRangeInt32 = edgedbtypes.NewOptionalRangeInt32
// NewOptionalRangeInt64 is a convenience function for creating an
// OptionalRangeInt64 with its value set to v.
NewOptionalRangeInt64 = edgedbtypes.NewOptionalRangeInt64
// NewOptionalRangeLocalDate is a convenience function for creating an
// OptionalRangeLocalDate with its value set to v.
NewOptionalRangeLocalDate = edgedbtypes.NewOptionalRangeLocalDate
// NewOptionalRangeLocalDateTime is a convenience function for creating an
// OptionalRangeLocalDateTime with its value set to v.
NewOptionalRangeLocalDateTime = edgedbtypes.NewOptionalRangeLocalDateTime
// NewOptionalRelativeDuration is a convenience function for creating an
// OptionalRelativeDuration with its value set to v.
NewOptionalRelativeDuration = edgedbtypes.NewOptionalRelativeDuration
// NewOptionalStr is a convenience function for creating an OptionalStr with
// its value set to v.
NewOptionalStr = edgedbtypes.NewOptionalStr
// NewOptionalUUID is a convenience function for creating an OptionalUUID with
// its value set to v.
NewOptionalUUID = edgedbtypes.NewOptionalUUID
// NewRangeDateTime creates a new RangeDateTime value.
NewRangeDateTime = edgedbtypes.NewRangeDateTime
// NewRangeFloat32 creates a new RangeFloat32 value.
NewRangeFloat32 = edgedbtypes.NewRangeFloat32
// NewRangeFloat64 creates a new RangeFloat64 value.
NewRangeFloat64 = edgedbtypes.NewRangeFloat64
// NewRangeInt32 creates a new RangeInt32 value.
NewRangeInt32 = edgedbtypes.NewRangeInt32
// NewRangeInt64 creates a new RangeInt64 value.
NewRangeInt64 = edgedbtypes.NewRangeInt64
// NewRangeLocalDate creates a new RangeLocalDate value.
NewRangeLocalDate = edgedbtypes.NewRangeLocalDate
// NewRangeLocalDateTime creates a new RangeLocalDateTime value.
NewRangeLocalDateTime = edgedbtypes.NewRangeLocalDateTime
// NewRelativeDuration returns a new RelativeDuration
NewRelativeDuration = edgedbtypes.NewRelativeDuration
// NewRetryOptions returns the default retry options.
NewRetryOptions = edgedb.NewRetryOptions
// NewRetryRule returns the default RetryRule value.
NewRetryRule = edgedb.NewRetryRule
// NewTxOptions returns the default TxOptions value.
NewTxOptions = edgedb.NewTxOptions
// ParseUUID parses s into a UUID or returns an error.
ParseUUID = edgedbtypes.ParseUUID
// WarningsAsErrors is an edgedb.WarningHandler that returns warnings as
// errors.
WarningsAsErrors = edgedb.WarningsAsErrors
)