Skip to content

Commit 69baf40

Browse files
author
New year
committed
crud: replace usage of optional types in crud with go-option
fixed #492
1 parent 5652c38 commit 69baf40

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

crud/options.go

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -256,27 +256,27 @@ func (opts SimpleOperationObjectOpts) EncodeMsgpack(enc *msgpack.Encoder) error
256256
type OperationManyOpts struct {
257257
// Timeout is a `vshard.call` timeout and vshard
258258
// master discovery timeout (in seconds).
259-
Timeout OptFloat64
259+
Timeout option.Float64
260260
// VshardRouter is cartridge vshard group name or
261261
// vshard router instance.
262-
VshardRouter OptString
262+
VshardRouter option.String
263263
// Fields is field names for getting only a subset of fields.
264-
Fields OptTuple
264+
Fields OptAny
265265
// StopOnError is a parameter to stop on a first error and report
266266
// error regarding the failed operation and error about what tuples
267267
// were not performed.
268-
StopOnError OptBool
268+
StopOnError option.Bool
269269
// RollbackOnError is a parameter because of what any failed operation
270270
// will lead to rollback on a storage, where the operation is failed.
271-
RollbackOnError OptBool
271+
RollbackOnError option.Bool
272272
// FetchLatestMetadata guarantees the up-to-date metadata (space format)
273273
// in first return value, otherwise it may not take into account
274274
// the latest migration of the data format. Performance overhead is up to 15%.
275275
// Disabled by default.
276-
FetchLatestMetadata OptBool
276+
FetchLatestMetadata option.Bool
277277
// Noreturn suppresses successfully processed data (first return value is `nil`).
278278
// Disabled by default.
279-
Noreturn OptBool
279+
Noreturn option.Bool
280280
}
281281

282282
// EncodeMsgpack provides custom msgpack encoder.
@@ -304,30 +304,30 @@ func (opts OperationManyOpts) EncodeMsgpack(enc *msgpack.Encoder) error {
304304
type OperationObjectManyOpts struct {
305305
// Timeout is a `vshard.call` timeout and vshard
306306
// master discovery timeout (in seconds).
307-
Timeout OptFloat64
307+
Timeout option.Float64
308308
// VshardRouter is cartridge vshard group name or
309309
// vshard router instance.
310-
VshardRouter OptString
310+
VshardRouter option.String
311311
// Fields is field names for getting only a subset of fields.
312-
Fields OptTuple
312+
Fields OptAny
313313
// StopOnError is a parameter to stop on a first error and report
314314
// error regarding the failed operation and error about what tuples
315315
// were not performed.
316-
StopOnError OptBool
316+
StopOnError option.Bool
317317
// RollbackOnError is a parameter because of what any failed operation
318318
// will lead to rollback on a storage, where the operation is failed.
319-
RollbackOnError OptBool
319+
RollbackOnError option.Bool
320320
// SkipNullabilityCheckOnFlatten is a parameter to allow
321321
// setting null values to non-nullable fields.
322-
SkipNullabilityCheckOnFlatten OptBool
322+
SkipNullabilityCheckOnFlatten option.Bool
323323
// FetchLatestMetadata guarantees the up-to-date metadata (space format)
324324
// in first return value, otherwise it may not take into account
325325
// the latest migration of the data format. Performance overhead is up to 15%.
326326
// Disabled by default.
327-
FetchLatestMetadata OptBool
327+
FetchLatestMetadata option.Bool
328328
// Noreturn suppresses successfully processed data (first return value is `nil`).
329329
// Disabled by default.
330-
Noreturn OptBool
330+
Noreturn option.Bool
331331
}
332332

333333
// EncodeMsgpack provides custom msgpack encoder.
@@ -356,17 +356,17 @@ func (opts OperationObjectManyOpts) EncodeMsgpack(enc *msgpack.Encoder) error {
356356
type BorderOpts struct {
357357
// Timeout is a `vshard.call` timeout and vshard
358358
// master discovery timeout (in seconds).
359-
Timeout OptFloat64
359+
Timeout option.Float64
360360
// VshardRouter is cartridge vshard group name or
361361
// vshard router instance.
362-
VshardRouter OptString
362+
VshardRouter option.String
363363
// Fields is field names for getting only a subset of fields.
364-
Fields OptTuple
364+
Fields OptAny
365365
// FetchLatestMetadata guarantees the up-to-date metadata (space format)
366366
// in first return value, otherwise it may not take into account
367367
// the latest migration of the data format. Performance overhead is up to 15%.
368368
// Disabled by default.
369-
FetchLatestMetadata OptBool
369+
FetchLatestMetadata option.Bool
370370
}
371371

372372
// EncodeMsgpack provides custom msgpack encoder.

0 commit comments

Comments
 (0)