@sqlanvil/cli 1.9.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/bundle.js +1237 -50
  2. package/package.json +1 -1
  3. package/worker_bundle.js +625 -0
package/worker_bundle.js CHANGED
@@ -15188,6 +15188,7 @@ const sqlanvil = $root.sqlanvil = (() => {
15188
15188
  * @property {string|null} [charset] MysqlOptions charset
15189
15189
  * @property {string|null} [collation] MysqlOptions collation
15190
15190
  * @property {Array.<sqlanvil.MysqlOptions.IIndex>|null} [indexes] MysqlOptions indexes
15191
+ * @property {sqlanvil.MysqlOptions.IPartition|null} [partition] MysqlOptions partition
15191
15192
  */
15192
15193
 
15193
15194
  /**
@@ -15238,6 +15239,14 @@ const sqlanvil = $root.sqlanvil = (() => {
15238
15239
  */
15239
15240
  MysqlOptions.prototype.indexes = $util.emptyArray;
15240
15241
 
15242
+ /**
15243
+ * MysqlOptions partition.
15244
+ * @member {sqlanvil.MysqlOptions.IPartition|null|undefined} partition
15245
+ * @memberof sqlanvil.MysqlOptions
15246
+ * @instance
15247
+ */
15248
+ MysqlOptions.prototype.partition = null;
15249
+
15241
15250
  /**
15242
15251
  * Creates a new MysqlOptions instance using the specified properties.
15243
15252
  * @function create
@@ -15271,6 +15280,8 @@ const sqlanvil = $root.sqlanvil = (() => {
15271
15280
  if (message.indexes != null && message.indexes.length)
15272
15281
  for (let i = 0; i < message.indexes.length; ++i)
15273
15282
  $root.sqlanvil.MysqlOptions.Index.encode(message.indexes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
15283
+ if (message.partition != null && Object.hasOwnProperty.call(message, "partition"))
15284
+ $root.sqlanvil.MysqlOptions.Partition.encode(message.partition, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
15274
15285
  return writer;
15275
15286
  };
15276
15287
 
@@ -15329,6 +15340,10 @@ const sqlanvil = $root.sqlanvil = (() => {
15329
15340
  message.indexes.push($root.sqlanvil.MysqlOptions.Index.decode(reader, reader.uint32(), undefined, long + 1));
15330
15341
  break;
15331
15342
  }
15343
+ case 5: {
15344
+ message.partition = $root.sqlanvil.MysqlOptions.Partition.decode(reader, reader.uint32(), undefined, long + 1);
15345
+ break;
15346
+ }
15332
15347
  default:
15333
15348
  reader.skipType(tag & 7, long);
15334
15349
  break;
@@ -15386,6 +15401,11 @@ const sqlanvil = $root.sqlanvil = (() => {
15386
15401
  return "indexes." + error;
15387
15402
  }
15388
15403
  }
15404
+ if (message.partition != null && message.hasOwnProperty("partition")) {
15405
+ let error = $root.sqlanvil.MysqlOptions.Partition.verify(message.partition, long + 1);
15406
+ if (error)
15407
+ return "partition." + error;
15408
+ }
15389
15409
  return null;
15390
15410
  };
15391
15411
 
@@ -15421,6 +15441,11 @@ const sqlanvil = $root.sqlanvil = (() => {
15421
15441
  message.indexes[i] = $root.sqlanvil.MysqlOptions.Index.fromObject(object.indexes[i], long + 1);
15422
15442
  }
15423
15443
  }
15444
+ if (object.partition != null) {
15445
+ if (typeof object.partition !== "object")
15446
+ throw TypeError(".sqlanvil.MysqlOptions.partition: object expected");
15447
+ message.partition = $root.sqlanvil.MysqlOptions.Partition.fromObject(object.partition, long + 1);
15448
+ }
15424
15449
  return message;
15425
15450
  };
15426
15451
 
@@ -15443,6 +15468,7 @@ const sqlanvil = $root.sqlanvil = (() => {
15443
15468
  object.engine = "";
15444
15469
  object.charset = "";
15445
15470
  object.collation = "";
15471
+ object.partition = null;
15446
15472
  }
15447
15473
  if (message.engine != null && message.hasOwnProperty("engine"))
15448
15474
  object.engine = message.engine;
@@ -15455,6 +15481,8 @@ const sqlanvil = $root.sqlanvil = (() => {
15455
15481
  for (let j = 0; j < message.indexes.length; ++j)
15456
15482
  object.indexes[j] = $root.sqlanvil.MysqlOptions.Index.toObject(message.indexes[j], options);
15457
15483
  }
15484
+ if (message.partition != null && message.hasOwnProperty("partition"))
15485
+ object.partition = $root.sqlanvil.MysqlOptions.Partition.toObject(message.partition, options);
15458
15486
  return object;
15459
15487
  };
15460
15488
 
@@ -15765,6 +15793,603 @@ const sqlanvil = $root.sqlanvil = (() => {
15765
15793
  return Index;
15766
15794
  })();
15767
15795
 
15796
+ MysqlOptions.Partition = (function() {
15797
+
15798
+ /**
15799
+ * Properties of a Partition.
15800
+ * @memberof sqlanvil.MysqlOptions
15801
+ * @interface IPartition
15802
+ * @property {sqlanvil.MysqlOptions.Partition.Kind|null} [kind] Partition kind
15803
+ * @property {string|null} [expression] Partition expression
15804
+ * @property {Array.<sqlanvil.MysqlOptions.Partition.IBound>|null} [partitions] Partition partitions
15805
+ * @property {number|null} [count] Partition count
15806
+ */
15807
+
15808
+ /**
15809
+ * Constructs a new Partition.
15810
+ * @memberof sqlanvil.MysqlOptions
15811
+ * @classdesc Represents a Partition.
15812
+ * @implements IPartition
15813
+ * @constructor
15814
+ * @param {sqlanvil.MysqlOptions.IPartition=} [properties] Properties to set
15815
+ */
15816
+ function Partition(properties) {
15817
+ this.partitions = [];
15818
+ if (properties)
15819
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
15820
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
15821
+ this[keys[i]] = properties[keys[i]];
15822
+ }
15823
+
15824
+ /**
15825
+ * Partition kind.
15826
+ * @member {sqlanvil.MysqlOptions.Partition.Kind} kind
15827
+ * @memberof sqlanvil.MysqlOptions.Partition
15828
+ * @instance
15829
+ */
15830
+ Partition.prototype.kind = 0;
15831
+
15832
+ /**
15833
+ * Partition expression.
15834
+ * @member {string} expression
15835
+ * @memberof sqlanvil.MysqlOptions.Partition
15836
+ * @instance
15837
+ */
15838
+ Partition.prototype.expression = "";
15839
+
15840
+ /**
15841
+ * Partition partitions.
15842
+ * @member {Array.<sqlanvil.MysqlOptions.Partition.IBound>} partitions
15843
+ * @memberof sqlanvil.MysqlOptions.Partition
15844
+ * @instance
15845
+ */
15846
+ Partition.prototype.partitions = $util.emptyArray;
15847
+
15848
+ /**
15849
+ * Partition count.
15850
+ * @member {number} count
15851
+ * @memberof sqlanvil.MysqlOptions.Partition
15852
+ * @instance
15853
+ */
15854
+ Partition.prototype.count = 0;
15855
+
15856
+ /**
15857
+ * Creates a new Partition instance using the specified properties.
15858
+ * @function create
15859
+ * @memberof sqlanvil.MysqlOptions.Partition
15860
+ * @static
15861
+ * @param {sqlanvil.MysqlOptions.IPartition=} [properties] Properties to set
15862
+ * @returns {sqlanvil.MysqlOptions.Partition} Partition instance
15863
+ */
15864
+ Partition.create = function create(properties) {
15865
+ return new Partition(properties);
15866
+ };
15867
+
15868
+ /**
15869
+ * Encodes the specified Partition message. Does not implicitly {@link sqlanvil.MysqlOptions.Partition.verify|verify} messages.
15870
+ * @function encode
15871
+ * @memberof sqlanvil.MysqlOptions.Partition
15872
+ * @static
15873
+ * @param {sqlanvil.MysqlOptions.IPartition} message Partition message or plain object to encode
15874
+ * @param {$protobuf.Writer} [writer] Writer to encode to
15875
+ * @returns {$protobuf.Writer} Writer
15876
+ */
15877
+ Partition.encode = function encode(message, writer) {
15878
+ if (!writer)
15879
+ writer = $Writer.create();
15880
+ if (message.kind != null && Object.hasOwnProperty.call(message, "kind"))
15881
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kind);
15882
+ if (message.expression != null && Object.hasOwnProperty.call(message, "expression"))
15883
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.expression);
15884
+ if (message.partitions != null && message.partitions.length)
15885
+ for (let i = 0; i < message.partitions.length; ++i)
15886
+ $root.sqlanvil.MysqlOptions.Partition.Bound.encode(message.partitions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
15887
+ if (message.count != null && Object.hasOwnProperty.call(message, "count"))
15888
+ writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.count);
15889
+ return writer;
15890
+ };
15891
+
15892
+ /**
15893
+ * Encodes the specified Partition message, length delimited. Does not implicitly {@link sqlanvil.MysqlOptions.Partition.verify|verify} messages.
15894
+ * @function encodeDelimited
15895
+ * @memberof sqlanvil.MysqlOptions.Partition
15896
+ * @static
15897
+ * @param {sqlanvil.MysqlOptions.IPartition} message Partition message or plain object to encode
15898
+ * @param {$protobuf.Writer} [writer] Writer to encode to
15899
+ * @returns {$protobuf.Writer} Writer
15900
+ */
15901
+ Partition.encodeDelimited = function encodeDelimited(message, writer) {
15902
+ return this.encode(message, writer).ldelim();
15903
+ };
15904
+
15905
+ /**
15906
+ * Decodes a Partition message from the specified reader or buffer.
15907
+ * @function decode
15908
+ * @memberof sqlanvil.MysqlOptions.Partition
15909
+ * @static
15910
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
15911
+ * @param {number} [length] Message length if known beforehand
15912
+ * @returns {sqlanvil.MysqlOptions.Partition} Partition
15913
+ * @throws {Error} If the payload is not a reader or valid buffer
15914
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
15915
+ */
15916
+ Partition.decode = function decode(reader, length, error, long) {
15917
+ if (!(reader instanceof $Reader))
15918
+ reader = $Reader.create(reader);
15919
+ if (long === undefined)
15920
+ long = 0;
15921
+ if (long > $Reader.recursionLimit)
15922
+ throw Error("maximum nesting depth exceeded");
15923
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.MysqlOptions.Partition();
15924
+ while (reader.pos < end) {
15925
+ let tag = reader.uint32();
15926
+ if (tag === error)
15927
+ break;
15928
+ switch (tag >>> 3) {
15929
+ case 1: {
15930
+ message.kind = reader.int32();
15931
+ break;
15932
+ }
15933
+ case 2: {
15934
+ message.expression = reader.string();
15935
+ break;
15936
+ }
15937
+ case 3: {
15938
+ if (!(message.partitions && message.partitions.length))
15939
+ message.partitions = [];
15940
+ message.partitions.push($root.sqlanvil.MysqlOptions.Partition.Bound.decode(reader, reader.uint32(), undefined, long + 1));
15941
+ break;
15942
+ }
15943
+ case 4: {
15944
+ message.count = reader.uint32();
15945
+ break;
15946
+ }
15947
+ default:
15948
+ reader.skipType(tag & 7, long);
15949
+ break;
15950
+ }
15951
+ }
15952
+ return message;
15953
+ };
15954
+
15955
+ /**
15956
+ * Decodes a Partition message from the specified reader or buffer, length delimited.
15957
+ * @function decodeDelimited
15958
+ * @memberof sqlanvil.MysqlOptions.Partition
15959
+ * @static
15960
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
15961
+ * @returns {sqlanvil.MysqlOptions.Partition} Partition
15962
+ * @throws {Error} If the payload is not a reader or valid buffer
15963
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
15964
+ */
15965
+ Partition.decodeDelimited = function decodeDelimited(reader) {
15966
+ if (!(reader instanceof $Reader))
15967
+ reader = new $Reader(reader);
15968
+ return this.decode(reader, reader.uint32());
15969
+ };
15970
+
15971
+ /**
15972
+ * Verifies a Partition message.
15973
+ * @function verify
15974
+ * @memberof sqlanvil.MysqlOptions.Partition
15975
+ * @static
15976
+ * @param {Object.<string,*>} message Plain object to verify
15977
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
15978
+ */
15979
+ Partition.verify = function verify(message, long) {
15980
+ if (typeof message !== "object" || message === null)
15981
+ return "object expected";
15982
+ if (long === undefined)
15983
+ long = 0;
15984
+ if (long > $util.recursionLimit)
15985
+ return "maximum nesting depth exceeded";
15986
+ if (message.kind != null && message.hasOwnProperty("kind"))
15987
+ switch (message.kind) {
15988
+ default:
15989
+ return "kind: enum value expected";
15990
+ case 0:
15991
+ case 1:
15992
+ case 2:
15993
+ case 3:
15994
+ break;
15995
+ }
15996
+ if (message.expression != null && message.hasOwnProperty("expression"))
15997
+ if (!$util.isString(message.expression))
15998
+ return "expression: string expected";
15999
+ if (message.partitions != null && message.hasOwnProperty("partitions")) {
16000
+ if (!Array.isArray(message.partitions))
16001
+ return "partitions: array expected";
16002
+ for (let i = 0; i < message.partitions.length; ++i) {
16003
+ let error = $root.sqlanvil.MysqlOptions.Partition.Bound.verify(message.partitions[i], long + 1);
16004
+ if (error)
16005
+ return "partitions." + error;
16006
+ }
16007
+ }
16008
+ if (message.count != null && message.hasOwnProperty("count"))
16009
+ if (!$util.isInteger(message.count))
16010
+ return "count: integer expected";
16011
+ return null;
16012
+ };
16013
+
16014
+ /**
16015
+ * Creates a Partition message from a plain object. Also converts values to their respective internal types.
16016
+ * @function fromObject
16017
+ * @memberof sqlanvil.MysqlOptions.Partition
16018
+ * @static
16019
+ * @param {Object.<string,*>} object Plain object
16020
+ * @returns {sqlanvil.MysqlOptions.Partition} Partition
16021
+ */
16022
+ Partition.fromObject = function fromObject(object, long) {
16023
+ if (object instanceof $root.sqlanvil.MysqlOptions.Partition)
16024
+ return object;
16025
+ if (long === undefined)
16026
+ long = 0;
16027
+ if (long > $util.recursionLimit)
16028
+ throw Error("maximum nesting depth exceeded");
16029
+ let message = new $root.sqlanvil.MysqlOptions.Partition();
16030
+ switch (object.kind) {
16031
+ default:
16032
+ if (typeof object.kind === "number") {
16033
+ message.kind = object.kind;
16034
+ break;
16035
+ }
16036
+ break;
16037
+ case "RANGE":
16038
+ case 0:
16039
+ message.kind = 0;
16040
+ break;
16041
+ case "LIST":
16042
+ case 1:
16043
+ message.kind = 1;
16044
+ break;
16045
+ case "HASH":
16046
+ case 2:
16047
+ message.kind = 2;
16048
+ break;
16049
+ case "KEY":
16050
+ case 3:
16051
+ message.kind = 3;
16052
+ break;
16053
+ }
16054
+ if (object.expression != null)
16055
+ message.expression = String(object.expression);
16056
+ if (object.partitions) {
16057
+ if (!Array.isArray(object.partitions))
16058
+ throw TypeError(".sqlanvil.MysqlOptions.Partition.partitions: array expected");
16059
+ message.partitions = [];
16060
+ for (let i = 0; i < object.partitions.length; ++i) {
16061
+ if (typeof object.partitions[i] !== "object")
16062
+ throw TypeError(".sqlanvil.MysqlOptions.Partition.partitions: object expected");
16063
+ message.partitions[i] = $root.sqlanvil.MysqlOptions.Partition.Bound.fromObject(object.partitions[i], long + 1);
16064
+ }
16065
+ }
16066
+ if (object.count != null)
16067
+ message.count = object.count >>> 0;
16068
+ return message;
16069
+ };
16070
+
16071
+ /**
16072
+ * Creates a plain object from a Partition message. Also converts values to other types if specified.
16073
+ * @function toObject
16074
+ * @memberof sqlanvil.MysqlOptions.Partition
16075
+ * @static
16076
+ * @param {sqlanvil.MysqlOptions.Partition} message Partition
16077
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
16078
+ * @returns {Object.<string,*>} Plain object
16079
+ */
16080
+ Partition.toObject = function toObject(message, options) {
16081
+ if (!options)
16082
+ options = {};
16083
+ let object = {};
16084
+ if (options.arrays || options.defaults)
16085
+ object.partitions = [];
16086
+ if (options.defaults) {
16087
+ object.kind = options.enums === String ? "RANGE" : 0;
16088
+ object.expression = "";
16089
+ object.count = 0;
16090
+ }
16091
+ if (message.kind != null && message.hasOwnProperty("kind"))
16092
+ object.kind = options.enums === String ? $root.sqlanvil.MysqlOptions.Partition.Kind[message.kind] === undefined ? message.kind : $root.sqlanvil.MysqlOptions.Partition.Kind[message.kind] : message.kind;
16093
+ if (message.expression != null && message.hasOwnProperty("expression"))
16094
+ object.expression = message.expression;
16095
+ if (message.partitions && message.partitions.length) {
16096
+ object.partitions = [];
16097
+ for (let j = 0; j < message.partitions.length; ++j)
16098
+ object.partitions[j] = $root.sqlanvil.MysqlOptions.Partition.Bound.toObject(message.partitions[j], options);
16099
+ }
16100
+ if (message.count != null && message.hasOwnProperty("count"))
16101
+ object.count = message.count;
16102
+ return object;
16103
+ };
16104
+
16105
+ /**
16106
+ * Converts this Partition to JSON.
16107
+ * @function toJSON
16108
+ * @memberof sqlanvil.MysqlOptions.Partition
16109
+ * @instance
16110
+ * @returns {Object.<string,*>} JSON object
16111
+ */
16112
+ Partition.prototype.toJSON = function toJSON() {
16113
+ return this.constructor.toObject(this, $protobuf__namespace.util.toJSONOptions);
16114
+ };
16115
+
16116
+ /**
16117
+ * Gets the default type url for Partition
16118
+ * @function getTypeUrl
16119
+ * @memberof sqlanvil.MysqlOptions.Partition
16120
+ * @static
16121
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
16122
+ * @returns {string} The default type url
16123
+ */
16124
+ Partition.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
16125
+ if (typeUrlPrefix === undefined) {
16126
+ typeUrlPrefix = "type.googleapis.com";
16127
+ }
16128
+ return typeUrlPrefix + "/sqlanvil.MysqlOptions.Partition";
16129
+ };
16130
+
16131
+ /**
16132
+ * Kind enum.
16133
+ * @name sqlanvil.MysqlOptions.Partition.Kind
16134
+ * @enum {number}
16135
+ * @property {number} RANGE=0 RANGE value
16136
+ * @property {number} LIST=1 LIST value
16137
+ * @property {number} HASH=2 HASH value
16138
+ * @property {number} KEY=3 KEY value
16139
+ */
16140
+ Partition.Kind = (function() {
16141
+ const valuesById = {}, values = Object.create(valuesById);
16142
+ values[valuesById[0] = "RANGE"] = 0;
16143
+ values[valuesById[1] = "LIST"] = 1;
16144
+ values[valuesById[2] = "HASH"] = 2;
16145
+ values[valuesById[3] = "KEY"] = 3;
16146
+ return values;
16147
+ })();
16148
+
16149
+ Partition.Bound = (function() {
16150
+
16151
+ /**
16152
+ * Properties of a Bound.
16153
+ * @memberof sqlanvil.MysqlOptions.Partition
16154
+ * @interface IBound
16155
+ * @property {string|null} [name] Bound name
16156
+ * @property {string|null} [values] Bound values
16157
+ */
16158
+
16159
+ /**
16160
+ * Constructs a new Bound.
16161
+ * @memberof sqlanvil.MysqlOptions.Partition
16162
+ * @classdesc Represents a Bound.
16163
+ * @implements IBound
16164
+ * @constructor
16165
+ * @param {sqlanvil.MysqlOptions.Partition.IBound=} [properties] Properties to set
16166
+ */
16167
+ function Bound(properties) {
16168
+ if (properties)
16169
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
16170
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
16171
+ this[keys[i]] = properties[keys[i]];
16172
+ }
16173
+
16174
+ /**
16175
+ * Bound name.
16176
+ * @member {string} name
16177
+ * @memberof sqlanvil.MysqlOptions.Partition.Bound
16178
+ * @instance
16179
+ */
16180
+ Bound.prototype.name = "";
16181
+
16182
+ /**
16183
+ * Bound values.
16184
+ * @member {string} values
16185
+ * @memberof sqlanvil.MysqlOptions.Partition.Bound
16186
+ * @instance
16187
+ */
16188
+ Bound.prototype.values = "";
16189
+
16190
+ /**
16191
+ * Creates a new Bound instance using the specified properties.
16192
+ * @function create
16193
+ * @memberof sqlanvil.MysqlOptions.Partition.Bound
16194
+ * @static
16195
+ * @param {sqlanvil.MysqlOptions.Partition.IBound=} [properties] Properties to set
16196
+ * @returns {sqlanvil.MysqlOptions.Partition.Bound} Bound instance
16197
+ */
16198
+ Bound.create = function create(properties) {
16199
+ return new Bound(properties);
16200
+ };
16201
+
16202
+ /**
16203
+ * Encodes the specified Bound message. Does not implicitly {@link sqlanvil.MysqlOptions.Partition.Bound.verify|verify} messages.
16204
+ * @function encode
16205
+ * @memberof sqlanvil.MysqlOptions.Partition.Bound
16206
+ * @static
16207
+ * @param {sqlanvil.MysqlOptions.Partition.IBound} message Bound message or plain object to encode
16208
+ * @param {$protobuf.Writer} [writer] Writer to encode to
16209
+ * @returns {$protobuf.Writer} Writer
16210
+ */
16211
+ Bound.encode = function encode(message, writer) {
16212
+ if (!writer)
16213
+ writer = $Writer.create();
16214
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
16215
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
16216
+ if (message.values != null && Object.hasOwnProperty.call(message, "values"))
16217
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.values);
16218
+ return writer;
16219
+ };
16220
+
16221
+ /**
16222
+ * Encodes the specified Bound message, length delimited. Does not implicitly {@link sqlanvil.MysqlOptions.Partition.Bound.verify|verify} messages.
16223
+ * @function encodeDelimited
16224
+ * @memberof sqlanvil.MysqlOptions.Partition.Bound
16225
+ * @static
16226
+ * @param {sqlanvil.MysqlOptions.Partition.IBound} message Bound message or plain object to encode
16227
+ * @param {$protobuf.Writer} [writer] Writer to encode to
16228
+ * @returns {$protobuf.Writer} Writer
16229
+ */
16230
+ Bound.encodeDelimited = function encodeDelimited(message, writer) {
16231
+ return this.encode(message, writer).ldelim();
16232
+ };
16233
+
16234
+ /**
16235
+ * Decodes a Bound message from the specified reader or buffer.
16236
+ * @function decode
16237
+ * @memberof sqlanvil.MysqlOptions.Partition.Bound
16238
+ * @static
16239
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
16240
+ * @param {number} [length] Message length if known beforehand
16241
+ * @returns {sqlanvil.MysqlOptions.Partition.Bound} Bound
16242
+ * @throws {Error} If the payload is not a reader or valid buffer
16243
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
16244
+ */
16245
+ Bound.decode = function decode(reader, length, error, long) {
16246
+ if (!(reader instanceof $Reader))
16247
+ reader = $Reader.create(reader);
16248
+ if (long === undefined)
16249
+ long = 0;
16250
+ if (long > $Reader.recursionLimit)
16251
+ throw Error("maximum nesting depth exceeded");
16252
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.MysqlOptions.Partition.Bound();
16253
+ while (reader.pos < end) {
16254
+ let tag = reader.uint32();
16255
+ if (tag === error)
16256
+ break;
16257
+ switch (tag >>> 3) {
16258
+ case 1: {
16259
+ message.name = reader.string();
16260
+ break;
16261
+ }
16262
+ case 2: {
16263
+ message.values = reader.string();
16264
+ break;
16265
+ }
16266
+ default:
16267
+ reader.skipType(tag & 7, long);
16268
+ break;
16269
+ }
16270
+ }
16271
+ return message;
16272
+ };
16273
+
16274
+ /**
16275
+ * Decodes a Bound message from the specified reader or buffer, length delimited.
16276
+ * @function decodeDelimited
16277
+ * @memberof sqlanvil.MysqlOptions.Partition.Bound
16278
+ * @static
16279
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
16280
+ * @returns {sqlanvil.MysqlOptions.Partition.Bound} Bound
16281
+ * @throws {Error} If the payload is not a reader or valid buffer
16282
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
16283
+ */
16284
+ Bound.decodeDelimited = function decodeDelimited(reader) {
16285
+ if (!(reader instanceof $Reader))
16286
+ reader = new $Reader(reader);
16287
+ return this.decode(reader, reader.uint32());
16288
+ };
16289
+
16290
+ /**
16291
+ * Verifies a Bound message.
16292
+ * @function verify
16293
+ * @memberof sqlanvil.MysqlOptions.Partition.Bound
16294
+ * @static
16295
+ * @param {Object.<string,*>} message Plain object to verify
16296
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
16297
+ */
16298
+ Bound.verify = function verify(message, long) {
16299
+ if (typeof message !== "object" || message === null)
16300
+ return "object expected";
16301
+ if (long === undefined)
16302
+ long = 0;
16303
+ if (long > $util.recursionLimit)
16304
+ return "maximum nesting depth exceeded";
16305
+ if (message.name != null && message.hasOwnProperty("name"))
16306
+ if (!$util.isString(message.name))
16307
+ return "name: string expected";
16308
+ if (message.values != null && message.hasOwnProperty("values"))
16309
+ if (!$util.isString(message.values))
16310
+ return "values: string expected";
16311
+ return null;
16312
+ };
16313
+
16314
+ /**
16315
+ * Creates a Bound message from a plain object. Also converts values to their respective internal types.
16316
+ * @function fromObject
16317
+ * @memberof sqlanvil.MysqlOptions.Partition.Bound
16318
+ * @static
16319
+ * @param {Object.<string,*>} object Plain object
16320
+ * @returns {sqlanvil.MysqlOptions.Partition.Bound} Bound
16321
+ */
16322
+ Bound.fromObject = function fromObject(object, long) {
16323
+ if (object instanceof $root.sqlanvil.MysqlOptions.Partition.Bound)
16324
+ return object;
16325
+ if (long === undefined)
16326
+ long = 0;
16327
+ if (long > $util.recursionLimit)
16328
+ throw Error("maximum nesting depth exceeded");
16329
+ let message = new $root.sqlanvil.MysqlOptions.Partition.Bound();
16330
+ if (object.name != null)
16331
+ message.name = String(object.name);
16332
+ if (object.values != null)
16333
+ message.values = String(object.values);
16334
+ return message;
16335
+ };
16336
+
16337
+ /**
16338
+ * Creates a plain object from a Bound message. Also converts values to other types if specified.
16339
+ * @function toObject
16340
+ * @memberof sqlanvil.MysqlOptions.Partition.Bound
16341
+ * @static
16342
+ * @param {sqlanvil.MysqlOptions.Partition.Bound} message Bound
16343
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
16344
+ * @returns {Object.<string,*>} Plain object
16345
+ */
16346
+ Bound.toObject = function toObject(message, options) {
16347
+ if (!options)
16348
+ options = {};
16349
+ let object = {};
16350
+ if (options.defaults) {
16351
+ object.name = "";
16352
+ object.values = "";
16353
+ }
16354
+ if (message.name != null && message.hasOwnProperty("name"))
16355
+ object.name = message.name;
16356
+ if (message.values != null && message.hasOwnProperty("values"))
16357
+ object.values = message.values;
16358
+ return object;
16359
+ };
16360
+
16361
+ /**
16362
+ * Converts this Bound to JSON.
16363
+ * @function toJSON
16364
+ * @memberof sqlanvil.MysqlOptions.Partition.Bound
16365
+ * @instance
16366
+ * @returns {Object.<string,*>} JSON object
16367
+ */
16368
+ Bound.prototype.toJSON = function toJSON() {
16369
+ return this.constructor.toObject(this, $protobuf__namespace.util.toJSONOptions);
16370
+ };
16371
+
16372
+ /**
16373
+ * Gets the default type url for Bound
16374
+ * @function getTypeUrl
16375
+ * @memberof sqlanvil.MysqlOptions.Partition.Bound
16376
+ * @static
16377
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
16378
+ * @returns {string} The default type url
16379
+ */
16380
+ Bound.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
16381
+ if (typeUrlPrefix === undefined) {
16382
+ typeUrlPrefix = "type.googleapis.com";
16383
+ }
16384
+ return typeUrlPrefix + "/sqlanvil.MysqlOptions.Partition.Bound";
16385
+ };
16386
+
16387
+ return Bound;
16388
+ })();
16389
+
16390
+ return Partition;
16391
+ })();
16392
+
15768
16393
  return MysqlOptions;
15769
16394
  })();
15770
16395