@sqlanvil/cli 1.5.0 → 1.6.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 +795 -13
  2. package/package.json +1 -1
  3. package/worker_bundle.js +650 -0
package/worker_bundle.js CHANGED
@@ -3759,6 +3759,7 @@ const sqlanvil = $root.sqlanvil = (() => {
3759
3759
  * @property {string|null} [reservation] TableConfig reservation
3760
3760
  * @property {sqlanvil.IPostgresOptions|null} [postgres] TableConfig postgres
3761
3761
  * @property {sqlanvil.ISupabaseOptions|null} [supabase] TableConfig supabase
3762
+ * @property {sqlanvil.IMysqlOptions|null} [mysql] TableConfig mysql
3762
3763
  */
3763
3764
 
3764
3765
  /**
@@ -3984,6 +3985,14 @@ const sqlanvil = $root.sqlanvil = (() => {
3984
3985
  */
3985
3986
  TableConfig.prototype.supabase = null;
3986
3987
 
3988
+ /**
3989
+ * TableConfig mysql.
3990
+ * @member {sqlanvil.IMysqlOptions|null|undefined} mysql
3991
+ * @memberof sqlanvil.ActionConfig.TableConfig
3992
+ * @instance
3993
+ */
3994
+ TableConfig.prototype.mysql = null;
3995
+
3987
3996
  /**
3988
3997
  * Creates a new TableConfig instance using the specified properties.
3989
3998
  * @function create
@@ -4066,6 +4075,8 @@ const sqlanvil = $root.sqlanvil = (() => {
4066
4075
  $root.sqlanvil.PostgresOptions.encode(message.postgres, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim();
4067
4076
  if (message.supabase != null && Object.hasOwnProperty.call(message, "supabase"))
4068
4077
  $root.sqlanvil.SupabaseOptions.encode(message.supabase, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim();
4078
+ if (message.mysql != null && Object.hasOwnProperty.call(message, "mysql"))
4079
+ $root.sqlanvil.MysqlOptions.encode(message.mysql, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim();
4069
4080
  return writer;
4070
4081
  };
4071
4082
 
@@ -4252,6 +4263,10 @@ const sqlanvil = $root.sqlanvil = (() => {
4252
4263
  message.supabase = $root.sqlanvil.SupabaseOptions.decode(reader, reader.uint32());
4253
4264
  break;
4254
4265
  }
4266
+ case 27: {
4267
+ message.mysql = $root.sqlanvil.MysqlOptions.decode(reader, reader.uint32());
4268
+ break;
4269
+ }
4255
4270
  default:
4256
4271
  reader.skipType(tag & 7);
4257
4272
  break;
@@ -4410,6 +4425,11 @@ const sqlanvil = $root.sqlanvil = (() => {
4410
4425
  if (error)
4411
4426
  return "supabase." + error;
4412
4427
  }
4428
+ if (message.mysql != null && message.hasOwnProperty("mysql")) {
4429
+ let error = $root.sqlanvil.MysqlOptions.verify(message.mysql);
4430
+ if (error)
4431
+ return "mysql." + error;
4432
+ }
4413
4433
  return null;
4414
4434
  };
4415
4435
 
@@ -4536,6 +4556,11 @@ const sqlanvil = $root.sqlanvil = (() => {
4536
4556
  throw TypeError(".sqlanvil.ActionConfig.TableConfig.supabase: object expected");
4537
4557
  message.supabase = $root.sqlanvil.SupabaseOptions.fromObject(object.supabase);
4538
4558
  }
4559
+ if (object.mysql != null) {
4560
+ if (typeof object.mysql !== "object")
4561
+ throw TypeError(".sqlanvil.ActionConfig.TableConfig.mysql: object expected");
4562
+ message.mysql = $root.sqlanvil.MysqlOptions.fromObject(object.mysql);
4563
+ }
4539
4564
  return message;
4540
4565
  };
4541
4566
 
@@ -4582,6 +4607,7 @@ const sqlanvil = $root.sqlanvil = (() => {
4582
4607
  object.reservation = "";
4583
4608
  object.postgres = null;
4584
4609
  object.supabase = null;
4610
+ object.mysql = null;
4585
4611
  }
4586
4612
  if (message.name != null && message.hasOwnProperty("name"))
4587
4613
  object.name = message.name;
@@ -4658,6 +4684,8 @@ const sqlanvil = $root.sqlanvil = (() => {
4658
4684
  object.postgres = $root.sqlanvil.PostgresOptions.toObject(message.postgres, options);
4659
4685
  if (message.supabase != null && message.hasOwnProperty("supabase"))
4660
4686
  object.supabase = $root.sqlanvil.SupabaseOptions.toObject(message.supabase, options);
4687
+ if (message.mysql != null && message.hasOwnProperty("mysql"))
4688
+ object.mysql = $root.sqlanvil.MysqlOptions.toObject(message.mysql, options);
4661
4689
  return object;
4662
4690
  };
4663
4691
 
@@ -5860,6 +5888,7 @@ const sqlanvil = $root.sqlanvil = (() => {
5860
5888
  * @property {string|null} [reservation] IncrementalTableConfig reservation
5861
5889
  * @property {sqlanvil.IPostgresOptions|null} [postgres] IncrementalTableConfig postgres
5862
5890
  * @property {sqlanvil.ISupabaseOptions|null} [supabase] IncrementalTableConfig supabase
5891
+ * @property {sqlanvil.IMysqlOptions|null} [mysql] IncrementalTableConfig mysql
5863
5892
  */
5864
5893
 
5865
5894
  /**
@@ -6118,6 +6147,14 @@ const sqlanvil = $root.sqlanvil = (() => {
6118
6147
  */
6119
6148
  IncrementalTableConfig.prototype.supabase = null;
6120
6149
 
6150
+ /**
6151
+ * IncrementalTableConfig mysql.
6152
+ * @member {sqlanvil.IMysqlOptions|null|undefined} mysql
6153
+ * @memberof sqlanvil.ActionConfig.IncrementalTableConfig
6154
+ * @instance
6155
+ */
6156
+ IncrementalTableConfig.prototype.mysql = null;
6157
+
6121
6158
  /**
6122
6159
  * Creates a new IncrementalTableConfig instance using the specified properties.
6123
6160
  * @function create
@@ -6209,6 +6246,8 @@ const sqlanvil = $root.sqlanvil = (() => {
6209
6246
  $root.sqlanvil.PostgresOptions.encode(message.postgres, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim();
6210
6247
  if (message.supabase != null && Object.hasOwnProperty.call(message, "supabase"))
6211
6248
  $root.sqlanvil.SupabaseOptions.encode(message.supabase, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim();
6249
+ if (message.mysql != null && Object.hasOwnProperty.call(message, "mysql"))
6250
+ $root.sqlanvil.MysqlOptions.encode(message.mysql, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim();
6212
6251
  return writer;
6213
6252
  };
6214
6253
 
@@ -6413,6 +6452,10 @@ const sqlanvil = $root.sqlanvil = (() => {
6413
6452
  message.supabase = $root.sqlanvil.SupabaseOptions.decode(reader, reader.uint32());
6414
6453
  break;
6415
6454
  }
6455
+ case 30: {
6456
+ message.mysql = $root.sqlanvil.MysqlOptions.decode(reader, reader.uint32());
6457
+ break;
6458
+ }
6416
6459
  default:
6417
6460
  reader.skipType(tag & 7);
6418
6461
  break;
@@ -6594,6 +6637,11 @@ const sqlanvil = $root.sqlanvil = (() => {
6594
6637
  if (error)
6595
6638
  return "supabase." + error;
6596
6639
  }
6640
+ if (message.mysql != null && message.hasOwnProperty("mysql")) {
6641
+ let error = $root.sqlanvil.MysqlOptions.verify(message.mysql);
6642
+ if (error)
6643
+ return "mysql." + error;
6644
+ }
6597
6645
  return null;
6598
6646
  };
6599
6647
 
@@ -6755,6 +6803,11 @@ const sqlanvil = $root.sqlanvil = (() => {
6755
6803
  throw TypeError(".sqlanvil.ActionConfig.IncrementalTableConfig.supabase: object expected");
6756
6804
  message.supabase = $root.sqlanvil.SupabaseOptions.fromObject(object.supabase);
6757
6805
  }
6806
+ if (object.mysql != null) {
6807
+ if (typeof object.mysql !== "object")
6808
+ throw TypeError(".sqlanvil.ActionConfig.IncrementalTableConfig.mysql: object expected");
6809
+ message.mysql = $root.sqlanvil.MysqlOptions.fromObject(object.mysql);
6810
+ }
6758
6811
  return message;
6759
6812
  };
6760
6813
 
@@ -6805,6 +6858,7 @@ const sqlanvil = $root.sqlanvil = (() => {
6805
6858
  object.reservation = "";
6806
6859
  object.postgres = null;
6807
6860
  object.supabase = null;
6861
+ object.mysql = null;
6808
6862
  }
6809
6863
  if (message.name != null && message.hasOwnProperty("name"))
6810
6864
  object.name = message.name;
@@ -6892,6 +6946,8 @@ const sqlanvil = $root.sqlanvil = (() => {
6892
6946
  object.postgres = $root.sqlanvil.PostgresOptions.toObject(message.postgres, options);
6893
6947
  if (message.supabase != null && message.hasOwnProperty("supabase"))
6894
6948
  object.supabase = $root.sqlanvil.SupabaseOptions.toObject(message.supabase, options);
6949
+ if (message.mysql != null && message.hasOwnProperty("mysql"))
6950
+ object.mysql = $root.sqlanvil.MysqlOptions.toObject(message.mysql, options);
6895
6951
  return object;
6896
6952
  };
6897
6953
 
@@ -13352,6 +13408,572 @@ const sqlanvil = $root.sqlanvil = (() => {
13352
13408
  return PostgresOptions;
13353
13409
  })();
13354
13410
 
13411
+ sqlanvil.MysqlOptions = (function() {
13412
+
13413
+ /**
13414
+ * Properties of a MysqlOptions.
13415
+ * @memberof sqlanvil
13416
+ * @interface IMysqlOptions
13417
+ * @property {string|null} [engine] MysqlOptions engine
13418
+ * @property {string|null} [charset] MysqlOptions charset
13419
+ * @property {string|null} [collation] MysqlOptions collation
13420
+ * @property {Array.<sqlanvil.MysqlOptions.IIndex>|null} [indexes] MysqlOptions indexes
13421
+ */
13422
+
13423
+ /**
13424
+ * Constructs a new MysqlOptions.
13425
+ * @memberof sqlanvil
13426
+ * @classdesc Represents a MysqlOptions.
13427
+ * @implements IMysqlOptions
13428
+ * @constructor
13429
+ * @param {sqlanvil.IMysqlOptions=} [properties] Properties to set
13430
+ */
13431
+ function MysqlOptions(properties) {
13432
+ this.indexes = [];
13433
+ if (properties)
13434
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
13435
+ if (properties[keys[i]] != null)
13436
+ this[keys[i]] = properties[keys[i]];
13437
+ }
13438
+
13439
+ /**
13440
+ * MysqlOptions engine.
13441
+ * @member {string} engine
13442
+ * @memberof sqlanvil.MysqlOptions
13443
+ * @instance
13444
+ */
13445
+ MysqlOptions.prototype.engine = "";
13446
+
13447
+ /**
13448
+ * MysqlOptions charset.
13449
+ * @member {string} charset
13450
+ * @memberof sqlanvil.MysqlOptions
13451
+ * @instance
13452
+ */
13453
+ MysqlOptions.prototype.charset = "";
13454
+
13455
+ /**
13456
+ * MysqlOptions collation.
13457
+ * @member {string} collation
13458
+ * @memberof sqlanvil.MysqlOptions
13459
+ * @instance
13460
+ */
13461
+ MysqlOptions.prototype.collation = "";
13462
+
13463
+ /**
13464
+ * MysqlOptions indexes.
13465
+ * @member {Array.<sqlanvil.MysqlOptions.IIndex>} indexes
13466
+ * @memberof sqlanvil.MysqlOptions
13467
+ * @instance
13468
+ */
13469
+ MysqlOptions.prototype.indexes = $util.emptyArray;
13470
+
13471
+ /**
13472
+ * Creates a new MysqlOptions instance using the specified properties.
13473
+ * @function create
13474
+ * @memberof sqlanvil.MysqlOptions
13475
+ * @static
13476
+ * @param {sqlanvil.IMysqlOptions=} [properties] Properties to set
13477
+ * @returns {sqlanvil.MysqlOptions} MysqlOptions instance
13478
+ */
13479
+ MysqlOptions.create = function create(properties) {
13480
+ return new MysqlOptions(properties);
13481
+ };
13482
+
13483
+ /**
13484
+ * Encodes the specified MysqlOptions message. Does not implicitly {@link sqlanvil.MysqlOptions.verify|verify} messages.
13485
+ * @function encode
13486
+ * @memberof sqlanvil.MysqlOptions
13487
+ * @static
13488
+ * @param {sqlanvil.IMysqlOptions} message MysqlOptions message or plain object to encode
13489
+ * @param {$protobuf.Writer} [writer] Writer to encode to
13490
+ * @returns {$protobuf.Writer} Writer
13491
+ */
13492
+ MysqlOptions.encode = function encode(message, writer) {
13493
+ if (!writer)
13494
+ writer = $Writer.create();
13495
+ if (message.engine != null && Object.hasOwnProperty.call(message, "engine"))
13496
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.engine);
13497
+ if (message.charset != null && Object.hasOwnProperty.call(message, "charset"))
13498
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.charset);
13499
+ if (message.collation != null && Object.hasOwnProperty.call(message, "collation"))
13500
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.collation);
13501
+ if (message.indexes != null && message.indexes.length)
13502
+ for (let i = 0; i < message.indexes.length; ++i)
13503
+ $root.sqlanvil.MysqlOptions.Index.encode(message.indexes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
13504
+ return writer;
13505
+ };
13506
+
13507
+ /**
13508
+ * Encodes the specified MysqlOptions message, length delimited. Does not implicitly {@link sqlanvil.MysqlOptions.verify|verify} messages.
13509
+ * @function encodeDelimited
13510
+ * @memberof sqlanvil.MysqlOptions
13511
+ * @static
13512
+ * @param {sqlanvil.IMysqlOptions} message MysqlOptions message or plain object to encode
13513
+ * @param {$protobuf.Writer} [writer] Writer to encode to
13514
+ * @returns {$protobuf.Writer} Writer
13515
+ */
13516
+ MysqlOptions.encodeDelimited = function encodeDelimited(message, writer) {
13517
+ return this.encode(message, writer).ldelim();
13518
+ };
13519
+
13520
+ /**
13521
+ * Decodes a MysqlOptions message from the specified reader or buffer.
13522
+ * @function decode
13523
+ * @memberof sqlanvil.MysqlOptions
13524
+ * @static
13525
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
13526
+ * @param {number} [length] Message length if known beforehand
13527
+ * @returns {sqlanvil.MysqlOptions} MysqlOptions
13528
+ * @throws {Error} If the payload is not a reader or valid buffer
13529
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
13530
+ */
13531
+ MysqlOptions.decode = function decode(reader, length, error) {
13532
+ if (!(reader instanceof $Reader))
13533
+ reader = $Reader.create(reader);
13534
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.MysqlOptions();
13535
+ while (reader.pos < end) {
13536
+ let tag = reader.uint32();
13537
+ if (tag === error)
13538
+ break;
13539
+ switch (tag >>> 3) {
13540
+ case 1: {
13541
+ message.engine = reader.string();
13542
+ break;
13543
+ }
13544
+ case 2: {
13545
+ message.charset = reader.string();
13546
+ break;
13547
+ }
13548
+ case 3: {
13549
+ message.collation = reader.string();
13550
+ break;
13551
+ }
13552
+ case 4: {
13553
+ if (!(message.indexes && message.indexes.length))
13554
+ message.indexes = [];
13555
+ message.indexes.push($root.sqlanvil.MysqlOptions.Index.decode(reader, reader.uint32()));
13556
+ break;
13557
+ }
13558
+ default:
13559
+ reader.skipType(tag & 7);
13560
+ break;
13561
+ }
13562
+ }
13563
+ return message;
13564
+ };
13565
+
13566
+ /**
13567
+ * Decodes a MysqlOptions message from the specified reader or buffer, length delimited.
13568
+ * @function decodeDelimited
13569
+ * @memberof sqlanvil.MysqlOptions
13570
+ * @static
13571
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
13572
+ * @returns {sqlanvil.MysqlOptions} MysqlOptions
13573
+ * @throws {Error} If the payload is not a reader or valid buffer
13574
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
13575
+ */
13576
+ MysqlOptions.decodeDelimited = function decodeDelimited(reader) {
13577
+ if (!(reader instanceof $Reader))
13578
+ reader = new $Reader(reader);
13579
+ return this.decode(reader, reader.uint32());
13580
+ };
13581
+
13582
+ /**
13583
+ * Verifies a MysqlOptions message.
13584
+ * @function verify
13585
+ * @memberof sqlanvil.MysqlOptions
13586
+ * @static
13587
+ * @param {Object.<string,*>} message Plain object to verify
13588
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
13589
+ */
13590
+ MysqlOptions.verify = function verify(message) {
13591
+ if (typeof message !== "object" || message === null)
13592
+ return "object expected";
13593
+ if (message.engine != null && message.hasOwnProperty("engine"))
13594
+ if (!$util.isString(message.engine))
13595
+ return "engine: string expected";
13596
+ if (message.charset != null && message.hasOwnProperty("charset"))
13597
+ if (!$util.isString(message.charset))
13598
+ return "charset: string expected";
13599
+ if (message.collation != null && message.hasOwnProperty("collation"))
13600
+ if (!$util.isString(message.collation))
13601
+ return "collation: string expected";
13602
+ if (message.indexes != null && message.hasOwnProperty("indexes")) {
13603
+ if (!Array.isArray(message.indexes))
13604
+ return "indexes: array expected";
13605
+ for (let i = 0; i < message.indexes.length; ++i) {
13606
+ let error = $root.sqlanvil.MysqlOptions.Index.verify(message.indexes[i]);
13607
+ if (error)
13608
+ return "indexes." + error;
13609
+ }
13610
+ }
13611
+ return null;
13612
+ };
13613
+
13614
+ /**
13615
+ * Creates a MysqlOptions message from a plain object. Also converts values to their respective internal types.
13616
+ * @function fromObject
13617
+ * @memberof sqlanvil.MysqlOptions
13618
+ * @static
13619
+ * @param {Object.<string,*>} object Plain object
13620
+ * @returns {sqlanvil.MysqlOptions} MysqlOptions
13621
+ */
13622
+ MysqlOptions.fromObject = function fromObject(object) {
13623
+ if (object instanceof $root.sqlanvil.MysqlOptions)
13624
+ return object;
13625
+ let message = new $root.sqlanvil.MysqlOptions();
13626
+ if (object.engine != null)
13627
+ message.engine = String(object.engine);
13628
+ if (object.charset != null)
13629
+ message.charset = String(object.charset);
13630
+ if (object.collation != null)
13631
+ message.collation = String(object.collation);
13632
+ if (object.indexes) {
13633
+ if (!Array.isArray(object.indexes))
13634
+ throw TypeError(".sqlanvil.MysqlOptions.indexes: array expected");
13635
+ message.indexes = [];
13636
+ for (let i = 0; i < object.indexes.length; ++i) {
13637
+ if (typeof object.indexes[i] !== "object")
13638
+ throw TypeError(".sqlanvil.MysqlOptions.indexes: object expected");
13639
+ message.indexes[i] = $root.sqlanvil.MysqlOptions.Index.fromObject(object.indexes[i]);
13640
+ }
13641
+ }
13642
+ return message;
13643
+ };
13644
+
13645
+ /**
13646
+ * Creates a plain object from a MysqlOptions message. Also converts values to other types if specified.
13647
+ * @function toObject
13648
+ * @memberof sqlanvil.MysqlOptions
13649
+ * @static
13650
+ * @param {sqlanvil.MysqlOptions} message MysqlOptions
13651
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
13652
+ * @returns {Object.<string,*>} Plain object
13653
+ */
13654
+ MysqlOptions.toObject = function toObject(message, options) {
13655
+ if (!options)
13656
+ options = {};
13657
+ let object = {};
13658
+ if (options.arrays || options.defaults)
13659
+ object.indexes = [];
13660
+ if (options.defaults) {
13661
+ object.engine = "";
13662
+ object.charset = "";
13663
+ object.collation = "";
13664
+ }
13665
+ if (message.engine != null && message.hasOwnProperty("engine"))
13666
+ object.engine = message.engine;
13667
+ if (message.charset != null && message.hasOwnProperty("charset"))
13668
+ object.charset = message.charset;
13669
+ if (message.collation != null && message.hasOwnProperty("collation"))
13670
+ object.collation = message.collation;
13671
+ if (message.indexes && message.indexes.length) {
13672
+ object.indexes = [];
13673
+ for (let j = 0; j < message.indexes.length; ++j)
13674
+ object.indexes[j] = $root.sqlanvil.MysqlOptions.Index.toObject(message.indexes[j], options);
13675
+ }
13676
+ return object;
13677
+ };
13678
+
13679
+ /**
13680
+ * Converts this MysqlOptions to JSON.
13681
+ * @function toJSON
13682
+ * @memberof sqlanvil.MysqlOptions
13683
+ * @instance
13684
+ * @returns {Object.<string,*>} JSON object
13685
+ */
13686
+ MysqlOptions.prototype.toJSON = function toJSON() {
13687
+ return this.constructor.toObject(this, $protobuf__namespace.util.toJSONOptions);
13688
+ };
13689
+
13690
+ /**
13691
+ * Gets the default type url for MysqlOptions
13692
+ * @function getTypeUrl
13693
+ * @memberof sqlanvil.MysqlOptions
13694
+ * @static
13695
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
13696
+ * @returns {string} The default type url
13697
+ */
13698
+ MysqlOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
13699
+ if (typeUrlPrefix === undefined) {
13700
+ typeUrlPrefix = "type.googleapis.com";
13701
+ }
13702
+ return typeUrlPrefix + "/sqlanvil.MysqlOptions";
13703
+ };
13704
+
13705
+ MysqlOptions.Index = (function() {
13706
+
13707
+ /**
13708
+ * Properties of an Index.
13709
+ * @memberof sqlanvil.MysqlOptions
13710
+ * @interface IIndex
13711
+ * @property {string|null} [name] Index name
13712
+ * @property {Array.<string>|null} [columns] Index columns
13713
+ * @property {boolean|null} [unique] Index unique
13714
+ */
13715
+
13716
+ /**
13717
+ * Constructs a new Index.
13718
+ * @memberof sqlanvil.MysqlOptions
13719
+ * @classdesc Represents an Index.
13720
+ * @implements IIndex
13721
+ * @constructor
13722
+ * @param {sqlanvil.MysqlOptions.IIndex=} [properties] Properties to set
13723
+ */
13724
+ function Index(properties) {
13725
+ this.columns = [];
13726
+ if (properties)
13727
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
13728
+ if (properties[keys[i]] != null)
13729
+ this[keys[i]] = properties[keys[i]];
13730
+ }
13731
+
13732
+ /**
13733
+ * Index name.
13734
+ * @member {string} name
13735
+ * @memberof sqlanvil.MysqlOptions.Index
13736
+ * @instance
13737
+ */
13738
+ Index.prototype.name = "";
13739
+
13740
+ /**
13741
+ * Index columns.
13742
+ * @member {Array.<string>} columns
13743
+ * @memberof sqlanvil.MysqlOptions.Index
13744
+ * @instance
13745
+ */
13746
+ Index.prototype.columns = $util.emptyArray;
13747
+
13748
+ /**
13749
+ * Index unique.
13750
+ * @member {boolean} unique
13751
+ * @memberof sqlanvil.MysqlOptions.Index
13752
+ * @instance
13753
+ */
13754
+ Index.prototype.unique = false;
13755
+
13756
+ /**
13757
+ * Creates a new Index instance using the specified properties.
13758
+ * @function create
13759
+ * @memberof sqlanvil.MysqlOptions.Index
13760
+ * @static
13761
+ * @param {sqlanvil.MysqlOptions.IIndex=} [properties] Properties to set
13762
+ * @returns {sqlanvil.MysqlOptions.Index} Index instance
13763
+ */
13764
+ Index.create = function create(properties) {
13765
+ return new Index(properties);
13766
+ };
13767
+
13768
+ /**
13769
+ * Encodes the specified Index message. Does not implicitly {@link sqlanvil.MysqlOptions.Index.verify|verify} messages.
13770
+ * @function encode
13771
+ * @memberof sqlanvil.MysqlOptions.Index
13772
+ * @static
13773
+ * @param {sqlanvil.MysqlOptions.IIndex} message Index message or plain object to encode
13774
+ * @param {$protobuf.Writer} [writer] Writer to encode to
13775
+ * @returns {$protobuf.Writer} Writer
13776
+ */
13777
+ Index.encode = function encode(message, writer) {
13778
+ if (!writer)
13779
+ writer = $Writer.create();
13780
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
13781
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
13782
+ if (message.columns != null && message.columns.length)
13783
+ for (let i = 0; i < message.columns.length; ++i)
13784
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.columns[i]);
13785
+ if (message.unique != null && Object.hasOwnProperty.call(message, "unique"))
13786
+ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unique);
13787
+ return writer;
13788
+ };
13789
+
13790
+ /**
13791
+ * Encodes the specified Index message, length delimited. Does not implicitly {@link sqlanvil.MysqlOptions.Index.verify|verify} messages.
13792
+ * @function encodeDelimited
13793
+ * @memberof sqlanvil.MysqlOptions.Index
13794
+ * @static
13795
+ * @param {sqlanvil.MysqlOptions.IIndex} message Index message or plain object to encode
13796
+ * @param {$protobuf.Writer} [writer] Writer to encode to
13797
+ * @returns {$protobuf.Writer} Writer
13798
+ */
13799
+ Index.encodeDelimited = function encodeDelimited(message, writer) {
13800
+ return this.encode(message, writer).ldelim();
13801
+ };
13802
+
13803
+ /**
13804
+ * Decodes an Index message from the specified reader or buffer.
13805
+ * @function decode
13806
+ * @memberof sqlanvil.MysqlOptions.Index
13807
+ * @static
13808
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
13809
+ * @param {number} [length] Message length if known beforehand
13810
+ * @returns {sqlanvil.MysqlOptions.Index} Index
13811
+ * @throws {Error} If the payload is not a reader or valid buffer
13812
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
13813
+ */
13814
+ Index.decode = function decode(reader, length, error) {
13815
+ if (!(reader instanceof $Reader))
13816
+ reader = $Reader.create(reader);
13817
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.MysqlOptions.Index();
13818
+ while (reader.pos < end) {
13819
+ let tag = reader.uint32();
13820
+ if (tag === error)
13821
+ break;
13822
+ switch (tag >>> 3) {
13823
+ case 1: {
13824
+ message.name = reader.string();
13825
+ break;
13826
+ }
13827
+ case 2: {
13828
+ if (!(message.columns && message.columns.length))
13829
+ message.columns = [];
13830
+ message.columns.push(reader.string());
13831
+ break;
13832
+ }
13833
+ case 3: {
13834
+ message.unique = reader.bool();
13835
+ break;
13836
+ }
13837
+ default:
13838
+ reader.skipType(tag & 7);
13839
+ break;
13840
+ }
13841
+ }
13842
+ return message;
13843
+ };
13844
+
13845
+ /**
13846
+ * Decodes an Index message from the specified reader or buffer, length delimited.
13847
+ * @function decodeDelimited
13848
+ * @memberof sqlanvil.MysqlOptions.Index
13849
+ * @static
13850
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
13851
+ * @returns {sqlanvil.MysqlOptions.Index} Index
13852
+ * @throws {Error} If the payload is not a reader or valid buffer
13853
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
13854
+ */
13855
+ Index.decodeDelimited = function decodeDelimited(reader) {
13856
+ if (!(reader instanceof $Reader))
13857
+ reader = new $Reader(reader);
13858
+ return this.decode(reader, reader.uint32());
13859
+ };
13860
+
13861
+ /**
13862
+ * Verifies an Index message.
13863
+ * @function verify
13864
+ * @memberof sqlanvil.MysqlOptions.Index
13865
+ * @static
13866
+ * @param {Object.<string,*>} message Plain object to verify
13867
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
13868
+ */
13869
+ Index.verify = function verify(message) {
13870
+ if (typeof message !== "object" || message === null)
13871
+ return "object expected";
13872
+ if (message.name != null && message.hasOwnProperty("name"))
13873
+ if (!$util.isString(message.name))
13874
+ return "name: string expected";
13875
+ if (message.columns != null && message.hasOwnProperty("columns")) {
13876
+ if (!Array.isArray(message.columns))
13877
+ return "columns: array expected";
13878
+ for (let i = 0; i < message.columns.length; ++i)
13879
+ if (!$util.isString(message.columns[i]))
13880
+ return "columns: string[] expected";
13881
+ }
13882
+ if (message.unique != null && message.hasOwnProperty("unique"))
13883
+ if (typeof message.unique !== "boolean")
13884
+ return "unique: boolean expected";
13885
+ return null;
13886
+ };
13887
+
13888
+ /**
13889
+ * Creates an Index message from a plain object. Also converts values to their respective internal types.
13890
+ * @function fromObject
13891
+ * @memberof sqlanvil.MysqlOptions.Index
13892
+ * @static
13893
+ * @param {Object.<string,*>} object Plain object
13894
+ * @returns {sqlanvil.MysqlOptions.Index} Index
13895
+ */
13896
+ Index.fromObject = function fromObject(object) {
13897
+ if (object instanceof $root.sqlanvil.MysqlOptions.Index)
13898
+ return object;
13899
+ let message = new $root.sqlanvil.MysqlOptions.Index();
13900
+ if (object.name != null)
13901
+ message.name = String(object.name);
13902
+ if (object.columns) {
13903
+ if (!Array.isArray(object.columns))
13904
+ throw TypeError(".sqlanvil.MysqlOptions.Index.columns: array expected");
13905
+ message.columns = [];
13906
+ for (let i = 0; i < object.columns.length; ++i)
13907
+ message.columns[i] = String(object.columns[i]);
13908
+ }
13909
+ if (object.unique != null)
13910
+ message.unique = Boolean(object.unique);
13911
+ return message;
13912
+ };
13913
+
13914
+ /**
13915
+ * Creates a plain object from an Index message. Also converts values to other types if specified.
13916
+ * @function toObject
13917
+ * @memberof sqlanvil.MysqlOptions.Index
13918
+ * @static
13919
+ * @param {sqlanvil.MysqlOptions.Index} message Index
13920
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
13921
+ * @returns {Object.<string,*>} Plain object
13922
+ */
13923
+ Index.toObject = function toObject(message, options) {
13924
+ if (!options)
13925
+ options = {};
13926
+ let object = {};
13927
+ if (options.arrays || options.defaults)
13928
+ object.columns = [];
13929
+ if (options.defaults) {
13930
+ object.name = "";
13931
+ object.unique = false;
13932
+ }
13933
+ if (message.name != null && message.hasOwnProperty("name"))
13934
+ object.name = message.name;
13935
+ if (message.columns && message.columns.length) {
13936
+ object.columns = [];
13937
+ for (let j = 0; j < message.columns.length; ++j)
13938
+ object.columns[j] = message.columns[j];
13939
+ }
13940
+ if (message.unique != null && message.hasOwnProperty("unique"))
13941
+ object.unique = message.unique;
13942
+ return object;
13943
+ };
13944
+
13945
+ /**
13946
+ * Converts this Index to JSON.
13947
+ * @function toJSON
13948
+ * @memberof sqlanvil.MysqlOptions.Index
13949
+ * @instance
13950
+ * @returns {Object.<string,*>} JSON object
13951
+ */
13952
+ Index.prototype.toJSON = function toJSON() {
13953
+ return this.constructor.toObject(this, $protobuf__namespace.util.toJSONOptions);
13954
+ };
13955
+
13956
+ /**
13957
+ * Gets the default type url for Index
13958
+ * @function getTypeUrl
13959
+ * @memberof sqlanvil.MysqlOptions.Index
13960
+ * @static
13961
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
13962
+ * @returns {string} The default type url
13963
+ */
13964
+ Index.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
13965
+ if (typeUrlPrefix === undefined) {
13966
+ typeUrlPrefix = "type.googleapis.com";
13967
+ }
13968
+ return typeUrlPrefix + "/sqlanvil.MysqlOptions.Index";
13969
+ };
13970
+
13971
+ return Index;
13972
+ })();
13973
+
13974
+ return MysqlOptions;
13975
+ })();
13976
+
13355
13977
  sqlanvil.SupabaseOptions = (function() {
13356
13978
 
13357
13979
  /**
@@ -19351,6 +19973,7 @@ const sqlanvil = $root.sqlanvil = (() => {
19351
19973
  * @property {sqlanvil.IBigQueryOptions|null} [bigquery] Table bigquery
19352
19974
  * @property {sqlanvil.IPostgresOptions|null} [postgres] Table postgres
19353
19975
  * @property {sqlanvil.ISupabaseOptions|null} [supabase] Table supabase
19976
+ * @property {sqlanvil.IMysqlOptions|null} [mysql] Table mysql
19354
19977
  * @property {string|null} [fileName] Table fileName
19355
19978
  */
19356
19979
 
@@ -19568,6 +20191,14 @@ const sqlanvil = $root.sqlanvil = (() => {
19568
20191
  */
19569
20192
  Table.prototype.supabase = null;
19570
20193
 
20194
+ /**
20195
+ * Table mysql.
20196
+ * @member {sqlanvil.IMysqlOptions|null|undefined} mysql
20197
+ * @memberof sqlanvil.Table
20198
+ * @instance
20199
+ */
20200
+ Table.prototype.mysql = null;
20201
+
19571
20202
  /**
19572
20203
  * Table fileName.
19573
20204
  * @member {string} fileName
@@ -19657,6 +20288,8 @@ const sqlanvil = $root.sqlanvil = (() => {
19657
20288
  $root.sqlanvil.PostgresOptions.encode(message.postgres, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim();
19658
20289
  if (message.supabase != null && Object.hasOwnProperty.call(message, "supabase"))
19659
20290
  $root.sqlanvil.SupabaseOptions.encode(message.supabase, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim();
20291
+ if (message.mysql != null && Object.hasOwnProperty.call(message, "mysql"))
20292
+ $root.sqlanvil.MysqlOptions.encode(message.mysql, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim();
19660
20293
  return writer;
19661
20294
  };
19662
20295
 
@@ -19803,6 +20436,10 @@ const sqlanvil = $root.sqlanvil = (() => {
19803
20436
  message.supabase = $root.sqlanvil.SupabaseOptions.decode(reader, reader.uint32());
19804
20437
  break;
19805
20438
  }
20439
+ case 41: {
20440
+ message.mysql = $root.sqlanvil.MysqlOptions.decode(reader, reader.uint32());
20441
+ break;
20442
+ }
19806
20443
  case 18: {
19807
20444
  message.fileName = reader.string();
19808
20445
  break;
@@ -19976,6 +20613,11 @@ const sqlanvil = $root.sqlanvil = (() => {
19976
20613
  if (error)
19977
20614
  return "supabase." + error;
19978
20615
  }
20616
+ if (message.mysql != null && message.hasOwnProperty("mysql")) {
20617
+ let error = $root.sqlanvil.MysqlOptions.verify(message.mysql);
20618
+ if (error)
20619
+ return "mysql." + error;
20620
+ }
19979
20621
  if (message.fileName != null && message.hasOwnProperty("fileName"))
19980
20622
  if (!$util.isString(message.fileName))
19981
20623
  return "fileName: string expected";
@@ -20160,6 +20802,11 @@ const sqlanvil = $root.sqlanvil = (() => {
20160
20802
  throw TypeError(".sqlanvil.Table.supabase: object expected");
20161
20803
  message.supabase = $root.sqlanvil.SupabaseOptions.fromObject(object.supabase);
20162
20804
  }
20805
+ if (object.mysql != null) {
20806
+ if (typeof object.mysql !== "object")
20807
+ throw TypeError(".sqlanvil.Table.mysql: object expected");
20808
+ message.mysql = $root.sqlanvil.MysqlOptions.fromObject(object.mysql);
20809
+ }
20163
20810
  if (object.fileName != null)
20164
20811
  message.fileName = String(object.fileName);
20165
20812
  return message;
@@ -20206,6 +20853,7 @@ const sqlanvil = $root.sqlanvil = (() => {
20206
20853
  object.jitCode = "";
20207
20854
  object.postgres = null;
20208
20855
  object.supabase = null;
20856
+ object.mysql = null;
20209
20857
  }
20210
20858
  if (message.type != null && message.hasOwnProperty("type"))
20211
20859
  object.type = message.type;
@@ -20278,6 +20926,8 @@ const sqlanvil = $root.sqlanvil = (() => {
20278
20926
  object.postgres = $root.sqlanvil.PostgresOptions.toObject(message.postgres, options);
20279
20927
  if (message.supabase != null && message.hasOwnProperty("supabase"))
20280
20928
  object.supabase = $root.sqlanvil.SupabaseOptions.toObject(message.supabase, options);
20929
+ if (message.mysql != null && message.hasOwnProperty("mysql"))
20930
+ object.mysql = $root.sqlanvil.MysqlOptions.toObject(message.mysql, options);
20281
20931
  return object;
20282
20932
  };
20283
20933