@sqlanvil/cli 1.5.0 → 1.7.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 +1262 -20
  2. package/package.json +1 -1
  3. package/worker_bundle.js +1617 -569
package/worker_bundle.js CHANGED
@@ -88,6 +88,7 @@ const sqlanvil = $root.sqlanvil = (() => {
88
88
  * @property {boolean|null} [includeTestsInCompiledGraph] WorkflowSettings includeTestsInCompiledGraph
89
89
  * @property {string|null} [warehouse] WorkflowSettings warehouse
90
90
  * @property {Object.<string,sqlanvil.IConnectionConfig>|null} [connections] WorkflowSettings connections
91
+ * @property {Object.<string,sqlanvil.IEnvironment>|null} [environments] WorkflowSettings environments
91
92
  */
92
93
 
93
94
  /**
@@ -101,6 +102,7 @@ const sqlanvil = $root.sqlanvil = (() => {
101
102
  function WorkflowSettings(properties) {
102
103
  this.vars = {};
103
104
  this.connections = {};
105
+ this.environments = {};
104
106
  if (properties)
105
107
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
106
108
  if (properties[keys[i]] != null)
@@ -251,6 +253,14 @@ const sqlanvil = $root.sqlanvil = (() => {
251
253
  */
252
254
  WorkflowSettings.prototype.connections = $util.emptyObject;
253
255
 
256
+ /**
257
+ * WorkflowSettings environments.
258
+ * @member {Object.<string,sqlanvil.IEnvironment>} environments
259
+ * @memberof sqlanvil.WorkflowSettings
260
+ * @instance
261
+ */
262
+ WorkflowSettings.prototype.environments = $util.emptyObject;
263
+
254
264
  /**
255
265
  * Creates a new WorkflowSettings instance using the specified properties.
256
266
  * @function create
@@ -315,6 +325,11 @@ const sqlanvil = $root.sqlanvil = (() => {
315
325
  writer.uint32(/* id 18, wireType 2 =*/146).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
316
326
  $root.sqlanvil.ConnectionConfig.encode(message.connections[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
317
327
  }
328
+ if (message.environments != null && Object.hasOwnProperty.call(message, "environments"))
329
+ for (let keys = Object.keys(message.environments), i = 0; i < keys.length; ++i) {
330
+ writer.uint32(/* id 19, wireType 2 =*/154).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
331
+ $root.sqlanvil.Environment.encode(message.environments[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
332
+ }
318
333
  return writer;
319
334
  };
320
335
 
@@ -461,6 +476,29 @@ const sqlanvil = $root.sqlanvil = (() => {
461
476
  message.connections[key] = value;
462
477
  break;
463
478
  }
479
+ case 19: {
480
+ if (message.environments === $util.emptyObject)
481
+ message.environments = {};
482
+ let end2 = reader.uint32() + reader.pos;
483
+ key = "";
484
+ value = null;
485
+ while (reader.pos < end2) {
486
+ let tag2 = reader.uint32();
487
+ switch (tag2 >>> 3) {
488
+ case 1:
489
+ key = reader.string();
490
+ break;
491
+ case 2:
492
+ value = $root.sqlanvil.Environment.decode(reader, reader.uint32());
493
+ break;
494
+ default:
495
+ reader.skipType(tag2 & 7);
496
+ break;
497
+ }
498
+ }
499
+ message.environments[key] = value;
500
+ break;
501
+ }
464
502
  default:
465
503
  reader.skipType(tag & 7);
466
504
  break;
@@ -568,6 +606,16 @@ const sqlanvil = $root.sqlanvil = (() => {
568
606
  return "connections." + error;
569
607
  }
570
608
  }
609
+ if (message.environments != null && message.hasOwnProperty("environments")) {
610
+ if (!$util.isObject(message.environments))
611
+ return "environments: object expected";
612
+ let key = Object.keys(message.environments);
613
+ for (let i = 0; i < key.length; ++i) {
614
+ let error = $root.sqlanvil.Environment.verify(message.environments[key[i]]);
615
+ if (error)
616
+ return "environments." + error;
617
+ }
618
+ }
571
619
  return null;
572
620
  };
573
621
 
@@ -641,6 +689,16 @@ const sqlanvil = $root.sqlanvil = (() => {
641
689
  message.connections[keys[i]] = $root.sqlanvil.ConnectionConfig.fromObject(object.connections[keys[i]]);
642
690
  }
643
691
  }
692
+ if (object.environments) {
693
+ if (typeof object.environments !== "object")
694
+ throw TypeError(".sqlanvil.WorkflowSettings.environments: object expected");
695
+ message.environments = {};
696
+ for (let keys = Object.keys(object.environments), i = 0; i < keys.length; ++i) {
697
+ if (typeof object.environments[keys[i]] !== "object")
698
+ throw TypeError(".sqlanvil.WorkflowSettings.environments: object expected");
699
+ message.environments[keys[i]] = $root.sqlanvil.Environment.fromObject(object.environments[keys[i]]);
700
+ }
701
+ }
644
702
  return message;
645
703
  };
646
704
 
@@ -660,6 +718,7 @@ const sqlanvil = $root.sqlanvil = (() => {
660
718
  if (options.objects || options.defaults) {
661
719
  object.vars = {};
662
720
  object.connections = {};
721
+ object.environments = {};
663
722
  }
664
723
  if (options.defaults) {
665
724
  object.sqlanvilCoreVersion = "";
@@ -722,6 +781,11 @@ const sqlanvil = $root.sqlanvil = (() => {
722
781
  for (let j = 0; j < keys2.length; ++j)
723
782
  object.connections[keys2[j]] = $root.sqlanvil.ConnectionConfig.toObject(message.connections[keys2[j]], options);
724
783
  }
784
+ if (message.environments && (keys2 = Object.keys(message.environments)).length) {
785
+ object.environments = {};
786
+ for (let j = 0; j < keys2.length; ++j)
787
+ object.environments[keys2[j]] = $root.sqlanvil.Environment.toObject(message.environments[keys2[j]], options);
788
+ }
725
789
  return object;
726
790
  };
727
791
 
@@ -754,31 +818,29 @@ const sqlanvil = $root.sqlanvil = (() => {
754
818
  return WorkflowSettings;
755
819
  })();
756
820
 
757
- sqlanvil.ConnectionConfig = (function() {
821
+ sqlanvil.Environment = (function() {
758
822
 
759
823
  /**
760
- * Properties of a ConnectionConfig.
824
+ * Properties of an Environment.
761
825
  * @memberof sqlanvil
762
- * @interface IConnectionConfig
763
- * @property {string|null} [platform] ConnectionConfig platform
764
- * @property {string|null} [project] ConnectionConfig project
765
- * @property {string|null} [dataset] ConnectionConfig dataset
766
- * @property {string|null} [saKeyId] ConnectionConfig saKeyId
767
- * @property {string|null} [host] ConnectionConfig host
768
- * @property {number|null} [port] ConnectionConfig port
769
- * @property {string|null} [database] ConnectionConfig database
770
- * @property {string|null} [defaultSchema] ConnectionConfig defaultSchema
826
+ * @interface IEnvironment
827
+ * @property {string|null} [schemaSuffix] Environment schemaSuffix
828
+ * @property {Object.<string,string>|null} [vars] Environment vars
829
+ * @property {string|null} [defaultDatabase] Environment defaultDatabase
830
+ * @property {string|null} [defaultLocation] Environment defaultLocation
831
+ * @property {string|null} [credentials] Environment credentials
771
832
  */
772
833
 
773
834
  /**
774
- * Constructs a new ConnectionConfig.
835
+ * Constructs a new Environment.
775
836
  * @memberof sqlanvil
776
- * @classdesc Represents a ConnectionConfig.
777
- * @implements IConnectionConfig
837
+ * @classdesc Represents an Environment.
838
+ * @implements IEnvironment
778
839
  * @constructor
779
- * @param {sqlanvil.IConnectionConfig=} [properties] Properties to set
840
+ * @param {sqlanvil.IEnvironment=} [properties] Properties to set
780
841
  */
781
- function ConnectionConfig(properties) {
842
+ function Environment(properties) {
843
+ this.vars = {};
782
844
  if (properties)
783
845
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
784
846
  if (properties[keys[i]] != null)
@@ -786,175 +848,153 @@ const sqlanvil = $root.sqlanvil = (() => {
786
848
  }
787
849
 
788
850
  /**
789
- * ConnectionConfig platform.
790
- * @member {string} platform
791
- * @memberof sqlanvil.ConnectionConfig
792
- * @instance
793
- */
794
- ConnectionConfig.prototype.platform = "";
795
-
796
- /**
797
- * ConnectionConfig project.
798
- * @member {string} project
799
- * @memberof sqlanvil.ConnectionConfig
800
- * @instance
801
- */
802
- ConnectionConfig.prototype.project = "";
803
-
804
- /**
805
- * ConnectionConfig dataset.
806
- * @member {string} dataset
807
- * @memberof sqlanvil.ConnectionConfig
808
- * @instance
809
- */
810
- ConnectionConfig.prototype.dataset = "";
811
-
812
- /**
813
- * ConnectionConfig saKeyId.
814
- * @member {string} saKeyId
815
- * @memberof sqlanvil.ConnectionConfig
851
+ * Environment schemaSuffix.
852
+ * @member {string} schemaSuffix
853
+ * @memberof sqlanvil.Environment
816
854
  * @instance
817
855
  */
818
- ConnectionConfig.prototype.saKeyId = "";
856
+ Environment.prototype.schemaSuffix = "";
819
857
 
820
858
  /**
821
- * ConnectionConfig host.
822
- * @member {string} host
823
- * @memberof sqlanvil.ConnectionConfig
859
+ * Environment vars.
860
+ * @member {Object.<string,string>} vars
861
+ * @memberof sqlanvil.Environment
824
862
  * @instance
825
863
  */
826
- ConnectionConfig.prototype.host = "";
864
+ Environment.prototype.vars = $util.emptyObject;
827
865
 
828
866
  /**
829
- * ConnectionConfig port.
830
- * @member {number} port
831
- * @memberof sqlanvil.ConnectionConfig
867
+ * Environment defaultDatabase.
868
+ * @member {string} defaultDatabase
869
+ * @memberof sqlanvil.Environment
832
870
  * @instance
833
871
  */
834
- ConnectionConfig.prototype.port = 0;
872
+ Environment.prototype.defaultDatabase = "";
835
873
 
836
874
  /**
837
- * ConnectionConfig database.
838
- * @member {string} database
839
- * @memberof sqlanvil.ConnectionConfig
875
+ * Environment defaultLocation.
876
+ * @member {string} defaultLocation
877
+ * @memberof sqlanvil.Environment
840
878
  * @instance
841
879
  */
842
- ConnectionConfig.prototype.database = "";
880
+ Environment.prototype.defaultLocation = "";
843
881
 
844
882
  /**
845
- * ConnectionConfig defaultSchema.
846
- * @member {string} defaultSchema
847
- * @memberof sqlanvil.ConnectionConfig
883
+ * Environment credentials.
884
+ * @member {string} credentials
885
+ * @memberof sqlanvil.Environment
848
886
  * @instance
849
887
  */
850
- ConnectionConfig.prototype.defaultSchema = "";
888
+ Environment.prototype.credentials = "";
851
889
 
852
890
  /**
853
- * Creates a new ConnectionConfig instance using the specified properties.
891
+ * Creates a new Environment instance using the specified properties.
854
892
  * @function create
855
- * @memberof sqlanvil.ConnectionConfig
893
+ * @memberof sqlanvil.Environment
856
894
  * @static
857
- * @param {sqlanvil.IConnectionConfig=} [properties] Properties to set
858
- * @returns {sqlanvil.ConnectionConfig} ConnectionConfig instance
895
+ * @param {sqlanvil.IEnvironment=} [properties] Properties to set
896
+ * @returns {sqlanvil.Environment} Environment instance
859
897
  */
860
- ConnectionConfig.create = function create(properties) {
861
- return new ConnectionConfig(properties);
898
+ Environment.create = function create(properties) {
899
+ return new Environment(properties);
862
900
  };
863
901
 
864
902
  /**
865
- * Encodes the specified ConnectionConfig message. Does not implicitly {@link sqlanvil.ConnectionConfig.verify|verify} messages.
903
+ * Encodes the specified Environment message. Does not implicitly {@link sqlanvil.Environment.verify|verify} messages.
866
904
  * @function encode
867
- * @memberof sqlanvil.ConnectionConfig
905
+ * @memberof sqlanvil.Environment
868
906
  * @static
869
- * @param {sqlanvil.IConnectionConfig} message ConnectionConfig message or plain object to encode
907
+ * @param {sqlanvil.IEnvironment} message Environment message or plain object to encode
870
908
  * @param {$protobuf.Writer} [writer] Writer to encode to
871
909
  * @returns {$protobuf.Writer} Writer
872
910
  */
873
- ConnectionConfig.encode = function encode(message, writer) {
911
+ Environment.encode = function encode(message, writer) {
874
912
  if (!writer)
875
913
  writer = $Writer.create();
876
- if (message.platform != null && Object.hasOwnProperty.call(message, "platform"))
877
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.platform);
878
- if (message.project != null && Object.hasOwnProperty.call(message, "project"))
879
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.project);
880
- if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset"))
881
- writer.uint32(/* id 3, wireType 2 =*/26).string(message.dataset);
882
- if (message.saKeyId != null && Object.hasOwnProperty.call(message, "saKeyId"))
883
- writer.uint32(/* id 4, wireType 2 =*/34).string(message.saKeyId);
884
- if (message.host != null && Object.hasOwnProperty.call(message, "host"))
885
- writer.uint32(/* id 5, wireType 2 =*/42).string(message.host);
886
- if (message.port != null && Object.hasOwnProperty.call(message, "port"))
887
- writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.port);
888
- if (message.database != null && Object.hasOwnProperty.call(message, "database"))
889
- writer.uint32(/* id 7, wireType 2 =*/58).string(message.database);
890
- if (message.defaultSchema != null && Object.hasOwnProperty.call(message, "defaultSchema"))
891
- writer.uint32(/* id 8, wireType 2 =*/66).string(message.defaultSchema);
914
+ if (message.schemaSuffix != null && Object.hasOwnProperty.call(message, "schemaSuffix"))
915
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.schemaSuffix);
916
+ if (message.vars != null && Object.hasOwnProperty.call(message, "vars"))
917
+ for (let keys = Object.keys(message.vars), i = 0; i < keys.length; ++i)
918
+ writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.vars[keys[i]]).ldelim();
919
+ if (message.defaultDatabase != null && Object.hasOwnProperty.call(message, "defaultDatabase"))
920
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.defaultDatabase);
921
+ if (message.defaultLocation != null && Object.hasOwnProperty.call(message, "defaultLocation"))
922
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.defaultLocation);
923
+ if (message.credentials != null && Object.hasOwnProperty.call(message, "credentials"))
924
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.credentials);
892
925
  return writer;
893
926
  };
894
927
 
895
928
  /**
896
- * Encodes the specified ConnectionConfig message, length delimited. Does not implicitly {@link sqlanvil.ConnectionConfig.verify|verify} messages.
929
+ * Encodes the specified Environment message, length delimited. Does not implicitly {@link sqlanvil.Environment.verify|verify} messages.
897
930
  * @function encodeDelimited
898
- * @memberof sqlanvil.ConnectionConfig
931
+ * @memberof sqlanvil.Environment
899
932
  * @static
900
- * @param {sqlanvil.IConnectionConfig} message ConnectionConfig message or plain object to encode
933
+ * @param {sqlanvil.IEnvironment} message Environment message or plain object to encode
901
934
  * @param {$protobuf.Writer} [writer] Writer to encode to
902
935
  * @returns {$protobuf.Writer} Writer
903
936
  */
904
- ConnectionConfig.encodeDelimited = function encodeDelimited(message, writer) {
937
+ Environment.encodeDelimited = function encodeDelimited(message, writer) {
905
938
  return this.encode(message, writer).ldelim();
906
939
  };
907
940
 
908
941
  /**
909
- * Decodes a ConnectionConfig message from the specified reader or buffer.
942
+ * Decodes an Environment message from the specified reader or buffer.
910
943
  * @function decode
911
- * @memberof sqlanvil.ConnectionConfig
944
+ * @memberof sqlanvil.Environment
912
945
  * @static
913
946
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
914
947
  * @param {number} [length] Message length if known beforehand
915
- * @returns {sqlanvil.ConnectionConfig} ConnectionConfig
948
+ * @returns {sqlanvil.Environment} Environment
916
949
  * @throws {Error} If the payload is not a reader or valid buffer
917
950
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
918
951
  */
919
- ConnectionConfig.decode = function decode(reader, length, error) {
952
+ Environment.decode = function decode(reader, length, error) {
920
953
  if (!(reader instanceof $Reader))
921
954
  reader = $Reader.create(reader);
922
- let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.ConnectionConfig();
955
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.Environment(), key, value;
923
956
  while (reader.pos < end) {
924
957
  let tag = reader.uint32();
925
958
  if (tag === error)
926
959
  break;
927
960
  switch (tag >>> 3) {
928
961
  case 1: {
929
- message.platform = reader.string();
962
+ message.schemaSuffix = reader.string();
930
963
  break;
931
964
  }
932
965
  case 2: {
933
- message.project = reader.string();
966
+ if (message.vars === $util.emptyObject)
967
+ message.vars = {};
968
+ let end2 = reader.uint32() + reader.pos;
969
+ key = "";
970
+ value = "";
971
+ while (reader.pos < end2) {
972
+ let tag2 = reader.uint32();
973
+ switch (tag2 >>> 3) {
974
+ case 1:
975
+ key = reader.string();
976
+ break;
977
+ case 2:
978
+ value = reader.string();
979
+ break;
980
+ default:
981
+ reader.skipType(tag2 & 7);
982
+ break;
983
+ }
984
+ }
985
+ message.vars[key] = value;
934
986
  break;
935
987
  }
936
988
  case 3: {
937
- message.dataset = reader.string();
989
+ message.defaultDatabase = reader.string();
938
990
  break;
939
991
  }
940
992
  case 4: {
941
- message.saKeyId = reader.string();
993
+ message.defaultLocation = reader.string();
942
994
  break;
943
995
  }
944
996
  case 5: {
945
- message.host = reader.string();
946
- break;
947
- }
948
- case 6: {
949
- message.port = reader.uint32();
950
- break;
951
- }
952
- case 7: {
953
- message.database = reader.string();
954
- break;
955
- }
956
- case 8: {
957
- message.defaultSchema = reader.string();
997
+ message.credentials = reader.string();
958
998
  break;
959
999
  }
960
1000
  default:
@@ -966,182 +1006,177 @@ const sqlanvil = $root.sqlanvil = (() => {
966
1006
  };
967
1007
 
968
1008
  /**
969
- * Decodes a ConnectionConfig message from the specified reader or buffer, length delimited.
1009
+ * Decodes an Environment message from the specified reader or buffer, length delimited.
970
1010
  * @function decodeDelimited
971
- * @memberof sqlanvil.ConnectionConfig
1011
+ * @memberof sqlanvil.Environment
972
1012
  * @static
973
1013
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
974
- * @returns {sqlanvil.ConnectionConfig} ConnectionConfig
1014
+ * @returns {sqlanvil.Environment} Environment
975
1015
  * @throws {Error} If the payload is not a reader or valid buffer
976
1016
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
977
1017
  */
978
- ConnectionConfig.decodeDelimited = function decodeDelimited(reader) {
1018
+ Environment.decodeDelimited = function decodeDelimited(reader) {
979
1019
  if (!(reader instanceof $Reader))
980
1020
  reader = new $Reader(reader);
981
1021
  return this.decode(reader, reader.uint32());
982
1022
  };
983
1023
 
984
1024
  /**
985
- * Verifies a ConnectionConfig message.
1025
+ * Verifies an Environment message.
986
1026
  * @function verify
987
- * @memberof sqlanvil.ConnectionConfig
1027
+ * @memberof sqlanvil.Environment
988
1028
  * @static
989
1029
  * @param {Object.<string,*>} message Plain object to verify
990
1030
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
991
1031
  */
992
- ConnectionConfig.verify = function verify(message) {
1032
+ Environment.verify = function verify(message) {
993
1033
  if (typeof message !== "object" || message === null)
994
1034
  return "object expected";
995
- if (message.platform != null && message.hasOwnProperty("platform"))
996
- if (!$util.isString(message.platform))
997
- return "platform: string expected";
998
- if (message.project != null && message.hasOwnProperty("project"))
999
- if (!$util.isString(message.project))
1000
- return "project: string expected";
1001
- if (message.dataset != null && message.hasOwnProperty("dataset"))
1002
- if (!$util.isString(message.dataset))
1003
- return "dataset: string expected";
1004
- if (message.saKeyId != null && message.hasOwnProperty("saKeyId"))
1005
- if (!$util.isString(message.saKeyId))
1006
- return "saKeyId: string expected";
1007
- if (message.host != null && message.hasOwnProperty("host"))
1008
- if (!$util.isString(message.host))
1009
- return "host: string expected";
1010
- if (message.port != null && message.hasOwnProperty("port"))
1011
- if (!$util.isInteger(message.port))
1012
- return "port: integer expected";
1013
- if (message.database != null && message.hasOwnProperty("database"))
1014
- if (!$util.isString(message.database))
1015
- return "database: string expected";
1016
- if (message.defaultSchema != null && message.hasOwnProperty("defaultSchema"))
1017
- if (!$util.isString(message.defaultSchema))
1018
- return "defaultSchema: string expected";
1035
+ if (message.schemaSuffix != null && message.hasOwnProperty("schemaSuffix"))
1036
+ if (!$util.isString(message.schemaSuffix))
1037
+ return "schemaSuffix: string expected";
1038
+ if (message.vars != null && message.hasOwnProperty("vars")) {
1039
+ if (!$util.isObject(message.vars))
1040
+ return "vars: object expected";
1041
+ let key = Object.keys(message.vars);
1042
+ for (let i = 0; i < key.length; ++i)
1043
+ if (!$util.isString(message.vars[key[i]]))
1044
+ return "vars: string{k:string} expected";
1045
+ }
1046
+ if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase"))
1047
+ if (!$util.isString(message.defaultDatabase))
1048
+ return "defaultDatabase: string expected";
1049
+ if (message.defaultLocation != null && message.hasOwnProperty("defaultLocation"))
1050
+ if (!$util.isString(message.defaultLocation))
1051
+ return "defaultLocation: string expected";
1052
+ if (message.credentials != null && message.hasOwnProperty("credentials"))
1053
+ if (!$util.isString(message.credentials))
1054
+ return "credentials: string expected";
1019
1055
  return null;
1020
1056
  };
1021
1057
 
1022
1058
  /**
1023
- * Creates a ConnectionConfig message from a plain object. Also converts values to their respective internal types.
1059
+ * Creates an Environment message from a plain object. Also converts values to their respective internal types.
1024
1060
  * @function fromObject
1025
- * @memberof sqlanvil.ConnectionConfig
1061
+ * @memberof sqlanvil.Environment
1026
1062
  * @static
1027
1063
  * @param {Object.<string,*>} object Plain object
1028
- * @returns {sqlanvil.ConnectionConfig} ConnectionConfig
1064
+ * @returns {sqlanvil.Environment} Environment
1029
1065
  */
1030
- ConnectionConfig.fromObject = function fromObject(object) {
1031
- if (object instanceof $root.sqlanvil.ConnectionConfig)
1066
+ Environment.fromObject = function fromObject(object) {
1067
+ if (object instanceof $root.sqlanvil.Environment)
1032
1068
  return object;
1033
- let message = new $root.sqlanvil.ConnectionConfig();
1034
- if (object.platform != null)
1035
- message.platform = String(object.platform);
1036
- if (object.project != null)
1037
- message.project = String(object.project);
1038
- if (object.dataset != null)
1039
- message.dataset = String(object.dataset);
1040
- if (object.saKeyId != null)
1041
- message.saKeyId = String(object.saKeyId);
1042
- if (object.host != null)
1043
- message.host = String(object.host);
1044
- if (object.port != null)
1045
- message.port = object.port >>> 0;
1046
- if (object.database != null)
1047
- message.database = String(object.database);
1048
- if (object.defaultSchema != null)
1049
- message.defaultSchema = String(object.defaultSchema);
1050
- return message;
1069
+ let message = new $root.sqlanvil.Environment();
1070
+ if (object.schemaSuffix != null)
1071
+ message.schemaSuffix = String(object.schemaSuffix);
1072
+ if (object.vars) {
1073
+ if (typeof object.vars !== "object")
1074
+ throw TypeError(".sqlanvil.Environment.vars: object expected");
1075
+ message.vars = {};
1076
+ for (let keys = Object.keys(object.vars), i = 0; i < keys.length; ++i)
1077
+ message.vars[keys[i]] = String(object.vars[keys[i]]);
1078
+ }
1079
+ if (object.defaultDatabase != null)
1080
+ message.defaultDatabase = String(object.defaultDatabase);
1081
+ if (object.defaultLocation != null)
1082
+ message.defaultLocation = String(object.defaultLocation);
1083
+ if (object.credentials != null)
1084
+ message.credentials = String(object.credentials);
1085
+ return message;
1051
1086
  };
1052
1087
 
1053
1088
  /**
1054
- * Creates a plain object from a ConnectionConfig message. Also converts values to other types if specified.
1089
+ * Creates a plain object from an Environment message. Also converts values to other types if specified.
1055
1090
  * @function toObject
1056
- * @memberof sqlanvil.ConnectionConfig
1091
+ * @memberof sqlanvil.Environment
1057
1092
  * @static
1058
- * @param {sqlanvil.ConnectionConfig} message ConnectionConfig
1093
+ * @param {sqlanvil.Environment} message Environment
1059
1094
  * @param {$protobuf.IConversionOptions} [options] Conversion options
1060
1095
  * @returns {Object.<string,*>} Plain object
1061
1096
  */
1062
- ConnectionConfig.toObject = function toObject(message, options) {
1097
+ Environment.toObject = function toObject(message, options) {
1063
1098
  if (!options)
1064
1099
  options = {};
1065
1100
  let object = {};
1101
+ if (options.objects || options.defaults)
1102
+ object.vars = {};
1066
1103
  if (options.defaults) {
1067
- object.platform = "";
1068
- object.project = "";
1069
- object.dataset = "";
1070
- object.saKeyId = "";
1071
- object.host = "";
1072
- object.port = 0;
1073
- object.database = "";
1074
- object.defaultSchema = "";
1104
+ object.schemaSuffix = "";
1105
+ object.defaultDatabase = "";
1106
+ object.defaultLocation = "";
1107
+ object.credentials = "";
1075
1108
  }
1076
- if (message.platform != null && message.hasOwnProperty("platform"))
1077
- object.platform = message.platform;
1078
- if (message.project != null && message.hasOwnProperty("project"))
1079
- object.project = message.project;
1080
- if (message.dataset != null && message.hasOwnProperty("dataset"))
1081
- object.dataset = message.dataset;
1082
- if (message.saKeyId != null && message.hasOwnProperty("saKeyId"))
1083
- object.saKeyId = message.saKeyId;
1084
- if (message.host != null && message.hasOwnProperty("host"))
1085
- object.host = message.host;
1086
- if (message.port != null && message.hasOwnProperty("port"))
1087
- object.port = message.port;
1088
- if (message.database != null && message.hasOwnProperty("database"))
1089
- object.database = message.database;
1090
- if (message.defaultSchema != null && message.hasOwnProperty("defaultSchema"))
1091
- object.defaultSchema = message.defaultSchema;
1109
+ if (message.schemaSuffix != null && message.hasOwnProperty("schemaSuffix"))
1110
+ object.schemaSuffix = message.schemaSuffix;
1111
+ let keys2;
1112
+ if (message.vars && (keys2 = Object.keys(message.vars)).length) {
1113
+ object.vars = {};
1114
+ for (let j = 0; j < keys2.length; ++j)
1115
+ object.vars[keys2[j]] = message.vars[keys2[j]];
1116
+ }
1117
+ if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase"))
1118
+ object.defaultDatabase = message.defaultDatabase;
1119
+ if (message.defaultLocation != null && message.hasOwnProperty("defaultLocation"))
1120
+ object.defaultLocation = message.defaultLocation;
1121
+ if (message.credentials != null && message.hasOwnProperty("credentials"))
1122
+ object.credentials = message.credentials;
1092
1123
  return object;
1093
1124
  };
1094
1125
 
1095
1126
  /**
1096
- * Converts this ConnectionConfig to JSON.
1127
+ * Converts this Environment to JSON.
1097
1128
  * @function toJSON
1098
- * @memberof sqlanvil.ConnectionConfig
1129
+ * @memberof sqlanvil.Environment
1099
1130
  * @instance
1100
1131
  * @returns {Object.<string,*>} JSON object
1101
1132
  */
1102
- ConnectionConfig.prototype.toJSON = function toJSON() {
1133
+ Environment.prototype.toJSON = function toJSON() {
1103
1134
  return this.constructor.toObject(this, $protobuf__namespace.util.toJSONOptions);
1104
1135
  };
1105
1136
 
1106
1137
  /**
1107
- * Gets the default type url for ConnectionConfig
1138
+ * Gets the default type url for Environment
1108
1139
  * @function getTypeUrl
1109
- * @memberof sqlanvil.ConnectionConfig
1140
+ * @memberof sqlanvil.Environment
1110
1141
  * @static
1111
1142
  * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1112
1143
  * @returns {string} The default type url
1113
1144
  */
1114
- ConnectionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1145
+ Environment.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1115
1146
  if (typeUrlPrefix === undefined) {
1116
1147
  typeUrlPrefix = "type.googleapis.com";
1117
1148
  }
1118
- return typeUrlPrefix + "/sqlanvil.ConnectionConfig";
1149
+ return typeUrlPrefix + "/sqlanvil.Environment";
1119
1150
  };
1120
1151
 
1121
- return ConnectionConfig;
1152
+ return Environment;
1122
1153
  })();
1123
1154
 
1124
- sqlanvil.DefaultIcebergConfig = (function() {
1155
+ sqlanvil.ConnectionConfig = (function() {
1125
1156
 
1126
1157
  /**
1127
- * Properties of a DefaultIcebergConfig.
1158
+ * Properties of a ConnectionConfig.
1128
1159
  * @memberof sqlanvil
1129
- * @interface IDefaultIcebergConfig
1130
- * @property {string|null} [bucketName] DefaultIcebergConfig bucketName
1131
- * @property {string|null} [tableFolderRoot] DefaultIcebergConfig tableFolderRoot
1132
- * @property {string|null} [tableFolderSubpath] DefaultIcebergConfig tableFolderSubpath
1133
- * @property {string|null} [connection] DefaultIcebergConfig connection
1160
+ * @interface IConnectionConfig
1161
+ * @property {string|null} [platform] ConnectionConfig platform
1162
+ * @property {string|null} [project] ConnectionConfig project
1163
+ * @property {string|null} [dataset] ConnectionConfig dataset
1164
+ * @property {string|null} [saKeyId] ConnectionConfig saKeyId
1165
+ * @property {string|null} [host] ConnectionConfig host
1166
+ * @property {number|null} [port] ConnectionConfig port
1167
+ * @property {string|null} [database] ConnectionConfig database
1168
+ * @property {string|null} [defaultSchema] ConnectionConfig defaultSchema
1134
1169
  */
1135
1170
 
1136
1171
  /**
1137
- * Constructs a new DefaultIcebergConfig.
1172
+ * Constructs a new ConnectionConfig.
1138
1173
  * @memberof sqlanvil
1139
- * @classdesc Represents a DefaultIcebergConfig.
1140
- * @implements IDefaultIcebergConfig
1174
+ * @classdesc Represents a ConnectionConfig.
1175
+ * @implements IConnectionConfig
1141
1176
  * @constructor
1142
- * @param {sqlanvil.IDefaultIcebergConfig=} [properties] Properties to set
1177
+ * @param {sqlanvil.IConnectionConfig=} [properties] Properties to set
1143
1178
  */
1144
- function DefaultIcebergConfig(properties) {
1179
+ function ConnectionConfig(properties) {
1145
1180
  if (properties)
1146
1181
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1147
1182
  if (properties[keys[i]] != null)
@@ -1149,119 +1184,175 @@ const sqlanvil = $root.sqlanvil = (() => {
1149
1184
  }
1150
1185
 
1151
1186
  /**
1152
- * DefaultIcebergConfig bucketName.
1153
- * @member {string} bucketName
1154
- * @memberof sqlanvil.DefaultIcebergConfig
1187
+ * ConnectionConfig platform.
1188
+ * @member {string} platform
1189
+ * @memberof sqlanvil.ConnectionConfig
1155
1190
  * @instance
1156
1191
  */
1157
- DefaultIcebergConfig.prototype.bucketName = "";
1192
+ ConnectionConfig.prototype.platform = "";
1158
1193
 
1159
1194
  /**
1160
- * DefaultIcebergConfig tableFolderRoot.
1161
- * @member {string} tableFolderRoot
1162
- * @memberof sqlanvil.DefaultIcebergConfig
1195
+ * ConnectionConfig project.
1196
+ * @member {string} project
1197
+ * @memberof sqlanvil.ConnectionConfig
1163
1198
  * @instance
1164
1199
  */
1165
- DefaultIcebergConfig.prototype.tableFolderRoot = "";
1200
+ ConnectionConfig.prototype.project = "";
1166
1201
 
1167
1202
  /**
1168
- * DefaultIcebergConfig tableFolderSubpath.
1169
- * @member {string} tableFolderSubpath
1170
- * @memberof sqlanvil.DefaultIcebergConfig
1203
+ * ConnectionConfig dataset.
1204
+ * @member {string} dataset
1205
+ * @memberof sqlanvil.ConnectionConfig
1171
1206
  * @instance
1172
1207
  */
1173
- DefaultIcebergConfig.prototype.tableFolderSubpath = "";
1208
+ ConnectionConfig.prototype.dataset = "";
1174
1209
 
1175
1210
  /**
1176
- * DefaultIcebergConfig connection.
1177
- * @member {string} connection
1178
- * @memberof sqlanvil.DefaultIcebergConfig
1211
+ * ConnectionConfig saKeyId.
1212
+ * @member {string} saKeyId
1213
+ * @memberof sqlanvil.ConnectionConfig
1179
1214
  * @instance
1180
1215
  */
1181
- DefaultIcebergConfig.prototype.connection = "";
1216
+ ConnectionConfig.prototype.saKeyId = "";
1182
1217
 
1183
1218
  /**
1184
- * Creates a new DefaultIcebergConfig instance using the specified properties.
1219
+ * ConnectionConfig host.
1220
+ * @member {string} host
1221
+ * @memberof sqlanvil.ConnectionConfig
1222
+ * @instance
1223
+ */
1224
+ ConnectionConfig.prototype.host = "";
1225
+
1226
+ /**
1227
+ * ConnectionConfig port.
1228
+ * @member {number} port
1229
+ * @memberof sqlanvil.ConnectionConfig
1230
+ * @instance
1231
+ */
1232
+ ConnectionConfig.prototype.port = 0;
1233
+
1234
+ /**
1235
+ * ConnectionConfig database.
1236
+ * @member {string} database
1237
+ * @memberof sqlanvil.ConnectionConfig
1238
+ * @instance
1239
+ */
1240
+ ConnectionConfig.prototype.database = "";
1241
+
1242
+ /**
1243
+ * ConnectionConfig defaultSchema.
1244
+ * @member {string} defaultSchema
1245
+ * @memberof sqlanvil.ConnectionConfig
1246
+ * @instance
1247
+ */
1248
+ ConnectionConfig.prototype.defaultSchema = "";
1249
+
1250
+ /**
1251
+ * Creates a new ConnectionConfig instance using the specified properties.
1185
1252
  * @function create
1186
- * @memberof sqlanvil.DefaultIcebergConfig
1253
+ * @memberof sqlanvil.ConnectionConfig
1187
1254
  * @static
1188
- * @param {sqlanvil.IDefaultIcebergConfig=} [properties] Properties to set
1189
- * @returns {sqlanvil.DefaultIcebergConfig} DefaultIcebergConfig instance
1255
+ * @param {sqlanvil.IConnectionConfig=} [properties] Properties to set
1256
+ * @returns {sqlanvil.ConnectionConfig} ConnectionConfig instance
1190
1257
  */
1191
- DefaultIcebergConfig.create = function create(properties) {
1192
- return new DefaultIcebergConfig(properties);
1258
+ ConnectionConfig.create = function create(properties) {
1259
+ return new ConnectionConfig(properties);
1193
1260
  };
1194
1261
 
1195
1262
  /**
1196
- * Encodes the specified DefaultIcebergConfig message. Does not implicitly {@link sqlanvil.DefaultIcebergConfig.verify|verify} messages.
1263
+ * Encodes the specified ConnectionConfig message. Does not implicitly {@link sqlanvil.ConnectionConfig.verify|verify} messages.
1197
1264
  * @function encode
1198
- * @memberof sqlanvil.DefaultIcebergConfig
1265
+ * @memberof sqlanvil.ConnectionConfig
1199
1266
  * @static
1200
- * @param {sqlanvil.IDefaultIcebergConfig} message DefaultIcebergConfig message or plain object to encode
1267
+ * @param {sqlanvil.IConnectionConfig} message ConnectionConfig message or plain object to encode
1201
1268
  * @param {$protobuf.Writer} [writer] Writer to encode to
1202
1269
  * @returns {$protobuf.Writer} Writer
1203
1270
  */
1204
- DefaultIcebergConfig.encode = function encode(message, writer) {
1271
+ ConnectionConfig.encode = function encode(message, writer) {
1205
1272
  if (!writer)
1206
1273
  writer = $Writer.create();
1207
- if (message.bucketName != null && Object.hasOwnProperty.call(message, "bucketName"))
1208
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucketName);
1209
- if (message.tableFolderRoot != null && Object.hasOwnProperty.call(message, "tableFolderRoot"))
1210
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.tableFolderRoot);
1211
- if (message.tableFolderSubpath != null && Object.hasOwnProperty.call(message, "tableFolderSubpath"))
1212
- writer.uint32(/* id 3, wireType 2 =*/26).string(message.tableFolderSubpath);
1213
- if (message.connection != null && Object.hasOwnProperty.call(message, "connection"))
1214
- writer.uint32(/* id 4, wireType 2 =*/34).string(message.connection);
1274
+ if (message.platform != null && Object.hasOwnProperty.call(message, "platform"))
1275
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.platform);
1276
+ if (message.project != null && Object.hasOwnProperty.call(message, "project"))
1277
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.project);
1278
+ if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset"))
1279
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.dataset);
1280
+ if (message.saKeyId != null && Object.hasOwnProperty.call(message, "saKeyId"))
1281
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.saKeyId);
1282
+ if (message.host != null && Object.hasOwnProperty.call(message, "host"))
1283
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.host);
1284
+ if (message.port != null && Object.hasOwnProperty.call(message, "port"))
1285
+ writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.port);
1286
+ if (message.database != null && Object.hasOwnProperty.call(message, "database"))
1287
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.database);
1288
+ if (message.defaultSchema != null && Object.hasOwnProperty.call(message, "defaultSchema"))
1289
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.defaultSchema);
1215
1290
  return writer;
1216
1291
  };
1217
1292
 
1218
1293
  /**
1219
- * Encodes the specified DefaultIcebergConfig message, length delimited. Does not implicitly {@link sqlanvil.DefaultIcebergConfig.verify|verify} messages.
1294
+ * Encodes the specified ConnectionConfig message, length delimited. Does not implicitly {@link sqlanvil.ConnectionConfig.verify|verify} messages.
1220
1295
  * @function encodeDelimited
1221
- * @memberof sqlanvil.DefaultIcebergConfig
1296
+ * @memberof sqlanvil.ConnectionConfig
1222
1297
  * @static
1223
- * @param {sqlanvil.IDefaultIcebergConfig} message DefaultIcebergConfig message or plain object to encode
1298
+ * @param {sqlanvil.IConnectionConfig} message ConnectionConfig message or plain object to encode
1224
1299
  * @param {$protobuf.Writer} [writer] Writer to encode to
1225
1300
  * @returns {$protobuf.Writer} Writer
1226
1301
  */
1227
- DefaultIcebergConfig.encodeDelimited = function encodeDelimited(message, writer) {
1302
+ ConnectionConfig.encodeDelimited = function encodeDelimited(message, writer) {
1228
1303
  return this.encode(message, writer).ldelim();
1229
1304
  };
1230
1305
 
1231
1306
  /**
1232
- * Decodes a DefaultIcebergConfig message from the specified reader or buffer.
1307
+ * Decodes a ConnectionConfig message from the specified reader or buffer.
1233
1308
  * @function decode
1234
- * @memberof sqlanvil.DefaultIcebergConfig
1309
+ * @memberof sqlanvil.ConnectionConfig
1235
1310
  * @static
1236
1311
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1237
1312
  * @param {number} [length] Message length if known beforehand
1238
- * @returns {sqlanvil.DefaultIcebergConfig} DefaultIcebergConfig
1313
+ * @returns {sqlanvil.ConnectionConfig} ConnectionConfig
1239
1314
  * @throws {Error} If the payload is not a reader or valid buffer
1240
1315
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
1241
1316
  */
1242
- DefaultIcebergConfig.decode = function decode(reader, length, error) {
1317
+ ConnectionConfig.decode = function decode(reader, length, error) {
1243
1318
  if (!(reader instanceof $Reader))
1244
1319
  reader = $Reader.create(reader);
1245
- let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.DefaultIcebergConfig();
1320
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.ConnectionConfig();
1246
1321
  while (reader.pos < end) {
1247
1322
  let tag = reader.uint32();
1248
1323
  if (tag === error)
1249
1324
  break;
1250
1325
  switch (tag >>> 3) {
1251
1326
  case 1: {
1252
- message.bucketName = reader.string();
1327
+ message.platform = reader.string();
1253
1328
  break;
1254
1329
  }
1255
1330
  case 2: {
1256
- message.tableFolderRoot = reader.string();
1331
+ message.project = reader.string();
1257
1332
  break;
1258
1333
  }
1259
1334
  case 3: {
1260
- message.tableFolderSubpath = reader.string();
1335
+ message.dataset = reader.string();
1261
1336
  break;
1262
1337
  }
1263
1338
  case 4: {
1264
- message.connection = reader.string();
1339
+ message.saKeyId = reader.string();
1340
+ break;
1341
+ }
1342
+ case 5: {
1343
+ message.host = reader.string();
1344
+ break;
1345
+ }
1346
+ case 6: {
1347
+ message.port = reader.uint32();
1348
+ break;
1349
+ }
1350
+ case 7: {
1351
+ message.database = reader.string();
1352
+ break;
1353
+ }
1354
+ case 8: {
1355
+ message.defaultSchema = reader.string();
1265
1356
  break;
1266
1357
  }
1267
1358
  default:
@@ -1273,148 +1364,182 @@ const sqlanvil = $root.sqlanvil = (() => {
1273
1364
  };
1274
1365
 
1275
1366
  /**
1276
- * Decodes a DefaultIcebergConfig message from the specified reader or buffer, length delimited.
1367
+ * Decodes a ConnectionConfig message from the specified reader or buffer, length delimited.
1277
1368
  * @function decodeDelimited
1278
- * @memberof sqlanvil.DefaultIcebergConfig
1369
+ * @memberof sqlanvil.ConnectionConfig
1279
1370
  * @static
1280
1371
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1281
- * @returns {sqlanvil.DefaultIcebergConfig} DefaultIcebergConfig
1372
+ * @returns {sqlanvil.ConnectionConfig} ConnectionConfig
1282
1373
  * @throws {Error} If the payload is not a reader or valid buffer
1283
1374
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
1284
1375
  */
1285
- DefaultIcebergConfig.decodeDelimited = function decodeDelimited(reader) {
1376
+ ConnectionConfig.decodeDelimited = function decodeDelimited(reader) {
1286
1377
  if (!(reader instanceof $Reader))
1287
1378
  reader = new $Reader(reader);
1288
1379
  return this.decode(reader, reader.uint32());
1289
1380
  };
1290
1381
 
1291
1382
  /**
1292
- * Verifies a DefaultIcebergConfig message.
1383
+ * Verifies a ConnectionConfig message.
1293
1384
  * @function verify
1294
- * @memberof sqlanvil.DefaultIcebergConfig
1385
+ * @memberof sqlanvil.ConnectionConfig
1295
1386
  * @static
1296
1387
  * @param {Object.<string,*>} message Plain object to verify
1297
1388
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
1298
1389
  */
1299
- DefaultIcebergConfig.verify = function verify(message) {
1390
+ ConnectionConfig.verify = function verify(message) {
1300
1391
  if (typeof message !== "object" || message === null)
1301
1392
  return "object expected";
1302
- if (message.bucketName != null && message.hasOwnProperty("bucketName"))
1303
- if (!$util.isString(message.bucketName))
1304
- return "bucketName: string expected";
1305
- if (message.tableFolderRoot != null && message.hasOwnProperty("tableFolderRoot"))
1306
- if (!$util.isString(message.tableFolderRoot))
1307
- return "tableFolderRoot: string expected";
1308
- if (message.tableFolderSubpath != null && message.hasOwnProperty("tableFolderSubpath"))
1309
- if (!$util.isString(message.tableFolderSubpath))
1310
- return "tableFolderSubpath: string expected";
1311
- if (message.connection != null && message.hasOwnProperty("connection"))
1312
- if (!$util.isString(message.connection))
1313
- return "connection: string expected";
1393
+ if (message.platform != null && message.hasOwnProperty("platform"))
1394
+ if (!$util.isString(message.platform))
1395
+ return "platform: string expected";
1396
+ if (message.project != null && message.hasOwnProperty("project"))
1397
+ if (!$util.isString(message.project))
1398
+ return "project: string expected";
1399
+ if (message.dataset != null && message.hasOwnProperty("dataset"))
1400
+ if (!$util.isString(message.dataset))
1401
+ return "dataset: string expected";
1402
+ if (message.saKeyId != null && message.hasOwnProperty("saKeyId"))
1403
+ if (!$util.isString(message.saKeyId))
1404
+ return "saKeyId: string expected";
1405
+ if (message.host != null && message.hasOwnProperty("host"))
1406
+ if (!$util.isString(message.host))
1407
+ return "host: string expected";
1408
+ if (message.port != null && message.hasOwnProperty("port"))
1409
+ if (!$util.isInteger(message.port))
1410
+ return "port: integer expected";
1411
+ if (message.database != null && message.hasOwnProperty("database"))
1412
+ if (!$util.isString(message.database))
1413
+ return "database: string expected";
1414
+ if (message.defaultSchema != null && message.hasOwnProperty("defaultSchema"))
1415
+ if (!$util.isString(message.defaultSchema))
1416
+ return "defaultSchema: string expected";
1314
1417
  return null;
1315
1418
  };
1316
1419
 
1317
1420
  /**
1318
- * Creates a DefaultIcebergConfig message from a plain object. Also converts values to their respective internal types.
1421
+ * Creates a ConnectionConfig message from a plain object. Also converts values to their respective internal types.
1319
1422
  * @function fromObject
1320
- * @memberof sqlanvil.DefaultIcebergConfig
1423
+ * @memberof sqlanvil.ConnectionConfig
1321
1424
  * @static
1322
1425
  * @param {Object.<string,*>} object Plain object
1323
- * @returns {sqlanvil.DefaultIcebergConfig} DefaultIcebergConfig
1426
+ * @returns {sqlanvil.ConnectionConfig} ConnectionConfig
1324
1427
  */
1325
- DefaultIcebergConfig.fromObject = function fromObject(object) {
1326
- if (object instanceof $root.sqlanvil.DefaultIcebergConfig)
1428
+ ConnectionConfig.fromObject = function fromObject(object) {
1429
+ if (object instanceof $root.sqlanvil.ConnectionConfig)
1327
1430
  return object;
1328
- let message = new $root.sqlanvil.DefaultIcebergConfig();
1329
- if (object.bucketName != null)
1330
- message.bucketName = String(object.bucketName);
1331
- if (object.tableFolderRoot != null)
1332
- message.tableFolderRoot = String(object.tableFolderRoot);
1333
- if (object.tableFolderSubpath != null)
1334
- message.tableFolderSubpath = String(object.tableFolderSubpath);
1335
- if (object.connection != null)
1336
- message.connection = String(object.connection);
1431
+ let message = new $root.sqlanvil.ConnectionConfig();
1432
+ if (object.platform != null)
1433
+ message.platform = String(object.platform);
1434
+ if (object.project != null)
1435
+ message.project = String(object.project);
1436
+ if (object.dataset != null)
1437
+ message.dataset = String(object.dataset);
1438
+ if (object.saKeyId != null)
1439
+ message.saKeyId = String(object.saKeyId);
1440
+ if (object.host != null)
1441
+ message.host = String(object.host);
1442
+ if (object.port != null)
1443
+ message.port = object.port >>> 0;
1444
+ if (object.database != null)
1445
+ message.database = String(object.database);
1446
+ if (object.defaultSchema != null)
1447
+ message.defaultSchema = String(object.defaultSchema);
1337
1448
  return message;
1338
1449
  };
1339
1450
 
1340
1451
  /**
1341
- * Creates a plain object from a DefaultIcebergConfig message. Also converts values to other types if specified.
1452
+ * Creates a plain object from a ConnectionConfig message. Also converts values to other types if specified.
1342
1453
  * @function toObject
1343
- * @memberof sqlanvil.DefaultIcebergConfig
1454
+ * @memberof sqlanvil.ConnectionConfig
1344
1455
  * @static
1345
- * @param {sqlanvil.DefaultIcebergConfig} message DefaultIcebergConfig
1456
+ * @param {sqlanvil.ConnectionConfig} message ConnectionConfig
1346
1457
  * @param {$protobuf.IConversionOptions} [options] Conversion options
1347
1458
  * @returns {Object.<string,*>} Plain object
1348
1459
  */
1349
- DefaultIcebergConfig.toObject = function toObject(message, options) {
1460
+ ConnectionConfig.toObject = function toObject(message, options) {
1350
1461
  if (!options)
1351
1462
  options = {};
1352
1463
  let object = {};
1353
1464
  if (options.defaults) {
1354
- object.bucketName = "";
1355
- object.tableFolderRoot = "";
1356
- object.tableFolderSubpath = "";
1357
- object.connection = "";
1465
+ object.platform = "";
1466
+ object.project = "";
1467
+ object.dataset = "";
1468
+ object.saKeyId = "";
1469
+ object.host = "";
1470
+ object.port = 0;
1471
+ object.database = "";
1472
+ object.defaultSchema = "";
1358
1473
  }
1359
- if (message.bucketName != null && message.hasOwnProperty("bucketName"))
1360
- object.bucketName = message.bucketName;
1361
- if (message.tableFolderRoot != null && message.hasOwnProperty("tableFolderRoot"))
1362
- object.tableFolderRoot = message.tableFolderRoot;
1363
- if (message.tableFolderSubpath != null && message.hasOwnProperty("tableFolderSubpath"))
1364
- object.tableFolderSubpath = message.tableFolderSubpath;
1365
- if (message.connection != null && message.hasOwnProperty("connection"))
1366
- object.connection = message.connection;
1474
+ if (message.platform != null && message.hasOwnProperty("platform"))
1475
+ object.platform = message.platform;
1476
+ if (message.project != null && message.hasOwnProperty("project"))
1477
+ object.project = message.project;
1478
+ if (message.dataset != null && message.hasOwnProperty("dataset"))
1479
+ object.dataset = message.dataset;
1480
+ if (message.saKeyId != null && message.hasOwnProperty("saKeyId"))
1481
+ object.saKeyId = message.saKeyId;
1482
+ if (message.host != null && message.hasOwnProperty("host"))
1483
+ object.host = message.host;
1484
+ if (message.port != null && message.hasOwnProperty("port"))
1485
+ object.port = message.port;
1486
+ if (message.database != null && message.hasOwnProperty("database"))
1487
+ object.database = message.database;
1488
+ if (message.defaultSchema != null && message.hasOwnProperty("defaultSchema"))
1489
+ object.defaultSchema = message.defaultSchema;
1367
1490
  return object;
1368
1491
  };
1369
1492
 
1370
1493
  /**
1371
- * Converts this DefaultIcebergConfig to JSON.
1494
+ * Converts this ConnectionConfig to JSON.
1372
1495
  * @function toJSON
1373
- * @memberof sqlanvil.DefaultIcebergConfig
1496
+ * @memberof sqlanvil.ConnectionConfig
1374
1497
  * @instance
1375
1498
  * @returns {Object.<string,*>} JSON object
1376
1499
  */
1377
- DefaultIcebergConfig.prototype.toJSON = function toJSON() {
1500
+ ConnectionConfig.prototype.toJSON = function toJSON() {
1378
1501
  return this.constructor.toObject(this, $protobuf__namespace.util.toJSONOptions);
1379
1502
  };
1380
1503
 
1381
1504
  /**
1382
- * Gets the default type url for DefaultIcebergConfig
1505
+ * Gets the default type url for ConnectionConfig
1383
1506
  * @function getTypeUrl
1384
- * @memberof sqlanvil.DefaultIcebergConfig
1507
+ * @memberof sqlanvil.ConnectionConfig
1385
1508
  * @static
1386
1509
  * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1387
1510
  * @returns {string} The default type url
1388
1511
  */
1389
- DefaultIcebergConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1512
+ ConnectionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1390
1513
  if (typeUrlPrefix === undefined) {
1391
1514
  typeUrlPrefix = "type.googleapis.com";
1392
1515
  }
1393
- return typeUrlPrefix + "/sqlanvil.DefaultIcebergConfig";
1516
+ return typeUrlPrefix + "/sqlanvil.ConnectionConfig";
1394
1517
  };
1395
1518
 
1396
- return DefaultIcebergConfig;
1519
+ return ConnectionConfig;
1397
1520
  })();
1398
1521
 
1399
- sqlanvil.ActionConfigs = (function() {
1522
+ sqlanvil.DefaultIcebergConfig = (function() {
1400
1523
 
1401
1524
  /**
1402
- * Properties of an ActionConfigs.
1525
+ * Properties of a DefaultIcebergConfig.
1403
1526
  * @memberof sqlanvil
1404
- * @interface IActionConfigs
1405
- * @property {Array.<sqlanvil.IActionConfig>|null} [actions] ActionConfigs actions
1527
+ * @interface IDefaultIcebergConfig
1528
+ * @property {string|null} [bucketName] DefaultIcebergConfig bucketName
1529
+ * @property {string|null} [tableFolderRoot] DefaultIcebergConfig tableFolderRoot
1530
+ * @property {string|null} [tableFolderSubpath] DefaultIcebergConfig tableFolderSubpath
1531
+ * @property {string|null} [connection] DefaultIcebergConfig connection
1406
1532
  */
1407
1533
 
1408
1534
  /**
1409
- * Constructs a new ActionConfigs.
1535
+ * Constructs a new DefaultIcebergConfig.
1410
1536
  * @memberof sqlanvil
1411
- * @classdesc Represents an ActionConfigs.
1412
- * @implements IActionConfigs
1537
+ * @classdesc Represents a DefaultIcebergConfig.
1538
+ * @implements IDefaultIcebergConfig
1413
1539
  * @constructor
1414
- * @param {sqlanvil.IActionConfigs=} [properties] Properties to set
1540
+ * @param {sqlanvil.IDefaultIcebergConfig=} [properties] Properties to set
1415
1541
  */
1416
- function ActionConfigs(properties) {
1417
- this.actions = [];
1542
+ function DefaultIcebergConfig(properties) {
1418
1543
  if (properties)
1419
1544
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1420
1545
  if (properties[keys[i]] != null)
@@ -1422,92 +1547,365 @@ const sqlanvil = $root.sqlanvil = (() => {
1422
1547
  }
1423
1548
 
1424
1549
  /**
1425
- * ActionConfigs actions.
1426
- * @member {Array.<sqlanvil.IActionConfig>} actions
1427
- * @memberof sqlanvil.ActionConfigs
1550
+ * DefaultIcebergConfig bucketName.
1551
+ * @member {string} bucketName
1552
+ * @memberof sqlanvil.DefaultIcebergConfig
1428
1553
  * @instance
1429
1554
  */
1430
- ActionConfigs.prototype.actions = $util.emptyArray;
1555
+ DefaultIcebergConfig.prototype.bucketName = "";
1431
1556
 
1432
1557
  /**
1433
- * Creates a new ActionConfigs instance using the specified properties.
1558
+ * DefaultIcebergConfig tableFolderRoot.
1559
+ * @member {string} tableFolderRoot
1560
+ * @memberof sqlanvil.DefaultIcebergConfig
1561
+ * @instance
1562
+ */
1563
+ DefaultIcebergConfig.prototype.tableFolderRoot = "";
1564
+
1565
+ /**
1566
+ * DefaultIcebergConfig tableFolderSubpath.
1567
+ * @member {string} tableFolderSubpath
1568
+ * @memberof sqlanvil.DefaultIcebergConfig
1569
+ * @instance
1570
+ */
1571
+ DefaultIcebergConfig.prototype.tableFolderSubpath = "";
1572
+
1573
+ /**
1574
+ * DefaultIcebergConfig connection.
1575
+ * @member {string} connection
1576
+ * @memberof sqlanvil.DefaultIcebergConfig
1577
+ * @instance
1578
+ */
1579
+ DefaultIcebergConfig.prototype.connection = "";
1580
+
1581
+ /**
1582
+ * Creates a new DefaultIcebergConfig instance using the specified properties.
1434
1583
  * @function create
1435
- * @memberof sqlanvil.ActionConfigs
1584
+ * @memberof sqlanvil.DefaultIcebergConfig
1436
1585
  * @static
1437
- * @param {sqlanvil.IActionConfigs=} [properties] Properties to set
1438
- * @returns {sqlanvil.ActionConfigs} ActionConfigs instance
1586
+ * @param {sqlanvil.IDefaultIcebergConfig=} [properties] Properties to set
1587
+ * @returns {sqlanvil.DefaultIcebergConfig} DefaultIcebergConfig instance
1439
1588
  */
1440
- ActionConfigs.create = function create(properties) {
1441
- return new ActionConfigs(properties);
1589
+ DefaultIcebergConfig.create = function create(properties) {
1590
+ return new DefaultIcebergConfig(properties);
1442
1591
  };
1443
1592
 
1444
1593
  /**
1445
- * Encodes the specified ActionConfigs message. Does not implicitly {@link sqlanvil.ActionConfigs.verify|verify} messages.
1594
+ * Encodes the specified DefaultIcebergConfig message. Does not implicitly {@link sqlanvil.DefaultIcebergConfig.verify|verify} messages.
1446
1595
  * @function encode
1447
- * @memberof sqlanvil.ActionConfigs
1596
+ * @memberof sqlanvil.DefaultIcebergConfig
1448
1597
  * @static
1449
- * @param {sqlanvil.IActionConfigs} message ActionConfigs message or plain object to encode
1598
+ * @param {sqlanvil.IDefaultIcebergConfig} message DefaultIcebergConfig message or plain object to encode
1450
1599
  * @param {$protobuf.Writer} [writer] Writer to encode to
1451
1600
  * @returns {$protobuf.Writer} Writer
1452
1601
  */
1453
- ActionConfigs.encode = function encode(message, writer) {
1602
+ DefaultIcebergConfig.encode = function encode(message, writer) {
1454
1603
  if (!writer)
1455
1604
  writer = $Writer.create();
1456
- if (message.actions != null && message.actions.length)
1457
- for (let i = 0; i < message.actions.length; ++i)
1458
- $root.sqlanvil.ActionConfig.encode(message.actions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
1605
+ if (message.bucketName != null && Object.hasOwnProperty.call(message, "bucketName"))
1606
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucketName);
1607
+ if (message.tableFolderRoot != null && Object.hasOwnProperty.call(message, "tableFolderRoot"))
1608
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.tableFolderRoot);
1609
+ if (message.tableFolderSubpath != null && Object.hasOwnProperty.call(message, "tableFolderSubpath"))
1610
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.tableFolderSubpath);
1611
+ if (message.connection != null && Object.hasOwnProperty.call(message, "connection"))
1612
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.connection);
1459
1613
  return writer;
1460
1614
  };
1461
1615
 
1462
1616
  /**
1463
- * Encodes the specified ActionConfigs message, length delimited. Does not implicitly {@link sqlanvil.ActionConfigs.verify|verify} messages.
1617
+ * Encodes the specified DefaultIcebergConfig message, length delimited. Does not implicitly {@link sqlanvil.DefaultIcebergConfig.verify|verify} messages.
1464
1618
  * @function encodeDelimited
1465
- * @memberof sqlanvil.ActionConfigs
1619
+ * @memberof sqlanvil.DefaultIcebergConfig
1466
1620
  * @static
1467
- * @param {sqlanvil.IActionConfigs} message ActionConfigs message or plain object to encode
1621
+ * @param {sqlanvil.IDefaultIcebergConfig} message DefaultIcebergConfig message or plain object to encode
1468
1622
  * @param {$protobuf.Writer} [writer] Writer to encode to
1469
1623
  * @returns {$protobuf.Writer} Writer
1470
1624
  */
1471
- ActionConfigs.encodeDelimited = function encodeDelimited(message, writer) {
1625
+ DefaultIcebergConfig.encodeDelimited = function encodeDelimited(message, writer) {
1472
1626
  return this.encode(message, writer).ldelim();
1473
1627
  };
1474
1628
 
1475
1629
  /**
1476
- * Decodes an ActionConfigs message from the specified reader or buffer.
1630
+ * Decodes a DefaultIcebergConfig message from the specified reader or buffer.
1477
1631
  * @function decode
1478
- * @memberof sqlanvil.ActionConfigs
1632
+ * @memberof sqlanvil.DefaultIcebergConfig
1479
1633
  * @static
1480
1634
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1481
1635
  * @param {number} [length] Message length if known beforehand
1482
- * @returns {sqlanvil.ActionConfigs} ActionConfigs
1636
+ * @returns {sqlanvil.DefaultIcebergConfig} DefaultIcebergConfig
1483
1637
  * @throws {Error} If the payload is not a reader or valid buffer
1484
1638
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
1485
1639
  */
1486
- ActionConfigs.decode = function decode(reader, length, error) {
1640
+ DefaultIcebergConfig.decode = function decode(reader, length, error) {
1487
1641
  if (!(reader instanceof $Reader))
1488
1642
  reader = $Reader.create(reader);
1489
- let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.ActionConfigs();
1643
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.DefaultIcebergConfig();
1490
1644
  while (reader.pos < end) {
1491
1645
  let tag = reader.uint32();
1492
1646
  if (tag === error)
1493
1647
  break;
1494
1648
  switch (tag >>> 3) {
1495
1649
  case 1: {
1496
- if (!(message.actions && message.actions.length))
1497
- message.actions = [];
1498
- message.actions.push($root.sqlanvil.ActionConfig.decode(reader, reader.uint32()));
1650
+ message.bucketName = reader.string();
1499
1651
  break;
1500
1652
  }
1501
- default:
1502
- reader.skipType(tag & 7);
1503
- break;
1504
- }
1505
- }
1506
- return message;
1507
- };
1508
-
1509
- /**
1510
- * Decodes an ActionConfigs message from the specified reader or buffer, length delimited.
1653
+ case 2: {
1654
+ message.tableFolderRoot = reader.string();
1655
+ break;
1656
+ }
1657
+ case 3: {
1658
+ message.tableFolderSubpath = reader.string();
1659
+ break;
1660
+ }
1661
+ case 4: {
1662
+ message.connection = reader.string();
1663
+ break;
1664
+ }
1665
+ default:
1666
+ reader.skipType(tag & 7);
1667
+ break;
1668
+ }
1669
+ }
1670
+ return message;
1671
+ };
1672
+
1673
+ /**
1674
+ * Decodes a DefaultIcebergConfig message from the specified reader or buffer, length delimited.
1675
+ * @function decodeDelimited
1676
+ * @memberof sqlanvil.DefaultIcebergConfig
1677
+ * @static
1678
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1679
+ * @returns {sqlanvil.DefaultIcebergConfig} DefaultIcebergConfig
1680
+ * @throws {Error} If the payload is not a reader or valid buffer
1681
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1682
+ */
1683
+ DefaultIcebergConfig.decodeDelimited = function decodeDelimited(reader) {
1684
+ if (!(reader instanceof $Reader))
1685
+ reader = new $Reader(reader);
1686
+ return this.decode(reader, reader.uint32());
1687
+ };
1688
+
1689
+ /**
1690
+ * Verifies a DefaultIcebergConfig message.
1691
+ * @function verify
1692
+ * @memberof sqlanvil.DefaultIcebergConfig
1693
+ * @static
1694
+ * @param {Object.<string,*>} message Plain object to verify
1695
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1696
+ */
1697
+ DefaultIcebergConfig.verify = function verify(message) {
1698
+ if (typeof message !== "object" || message === null)
1699
+ return "object expected";
1700
+ if (message.bucketName != null && message.hasOwnProperty("bucketName"))
1701
+ if (!$util.isString(message.bucketName))
1702
+ return "bucketName: string expected";
1703
+ if (message.tableFolderRoot != null && message.hasOwnProperty("tableFolderRoot"))
1704
+ if (!$util.isString(message.tableFolderRoot))
1705
+ return "tableFolderRoot: string expected";
1706
+ if (message.tableFolderSubpath != null && message.hasOwnProperty("tableFolderSubpath"))
1707
+ if (!$util.isString(message.tableFolderSubpath))
1708
+ return "tableFolderSubpath: string expected";
1709
+ if (message.connection != null && message.hasOwnProperty("connection"))
1710
+ if (!$util.isString(message.connection))
1711
+ return "connection: string expected";
1712
+ return null;
1713
+ };
1714
+
1715
+ /**
1716
+ * Creates a DefaultIcebergConfig message from a plain object. Also converts values to their respective internal types.
1717
+ * @function fromObject
1718
+ * @memberof sqlanvil.DefaultIcebergConfig
1719
+ * @static
1720
+ * @param {Object.<string,*>} object Plain object
1721
+ * @returns {sqlanvil.DefaultIcebergConfig} DefaultIcebergConfig
1722
+ */
1723
+ DefaultIcebergConfig.fromObject = function fromObject(object) {
1724
+ if (object instanceof $root.sqlanvil.DefaultIcebergConfig)
1725
+ return object;
1726
+ let message = new $root.sqlanvil.DefaultIcebergConfig();
1727
+ if (object.bucketName != null)
1728
+ message.bucketName = String(object.bucketName);
1729
+ if (object.tableFolderRoot != null)
1730
+ message.tableFolderRoot = String(object.tableFolderRoot);
1731
+ if (object.tableFolderSubpath != null)
1732
+ message.tableFolderSubpath = String(object.tableFolderSubpath);
1733
+ if (object.connection != null)
1734
+ message.connection = String(object.connection);
1735
+ return message;
1736
+ };
1737
+
1738
+ /**
1739
+ * Creates a plain object from a DefaultIcebergConfig message. Also converts values to other types if specified.
1740
+ * @function toObject
1741
+ * @memberof sqlanvil.DefaultIcebergConfig
1742
+ * @static
1743
+ * @param {sqlanvil.DefaultIcebergConfig} message DefaultIcebergConfig
1744
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1745
+ * @returns {Object.<string,*>} Plain object
1746
+ */
1747
+ DefaultIcebergConfig.toObject = function toObject(message, options) {
1748
+ if (!options)
1749
+ options = {};
1750
+ let object = {};
1751
+ if (options.defaults) {
1752
+ object.bucketName = "";
1753
+ object.tableFolderRoot = "";
1754
+ object.tableFolderSubpath = "";
1755
+ object.connection = "";
1756
+ }
1757
+ if (message.bucketName != null && message.hasOwnProperty("bucketName"))
1758
+ object.bucketName = message.bucketName;
1759
+ if (message.tableFolderRoot != null && message.hasOwnProperty("tableFolderRoot"))
1760
+ object.tableFolderRoot = message.tableFolderRoot;
1761
+ if (message.tableFolderSubpath != null && message.hasOwnProperty("tableFolderSubpath"))
1762
+ object.tableFolderSubpath = message.tableFolderSubpath;
1763
+ if (message.connection != null && message.hasOwnProperty("connection"))
1764
+ object.connection = message.connection;
1765
+ return object;
1766
+ };
1767
+
1768
+ /**
1769
+ * Converts this DefaultIcebergConfig to JSON.
1770
+ * @function toJSON
1771
+ * @memberof sqlanvil.DefaultIcebergConfig
1772
+ * @instance
1773
+ * @returns {Object.<string,*>} JSON object
1774
+ */
1775
+ DefaultIcebergConfig.prototype.toJSON = function toJSON() {
1776
+ return this.constructor.toObject(this, $protobuf__namespace.util.toJSONOptions);
1777
+ };
1778
+
1779
+ /**
1780
+ * Gets the default type url for DefaultIcebergConfig
1781
+ * @function getTypeUrl
1782
+ * @memberof sqlanvil.DefaultIcebergConfig
1783
+ * @static
1784
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1785
+ * @returns {string} The default type url
1786
+ */
1787
+ DefaultIcebergConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1788
+ if (typeUrlPrefix === undefined) {
1789
+ typeUrlPrefix = "type.googleapis.com";
1790
+ }
1791
+ return typeUrlPrefix + "/sqlanvil.DefaultIcebergConfig";
1792
+ };
1793
+
1794
+ return DefaultIcebergConfig;
1795
+ })();
1796
+
1797
+ sqlanvil.ActionConfigs = (function() {
1798
+
1799
+ /**
1800
+ * Properties of an ActionConfigs.
1801
+ * @memberof sqlanvil
1802
+ * @interface IActionConfigs
1803
+ * @property {Array.<sqlanvil.IActionConfig>|null} [actions] ActionConfigs actions
1804
+ */
1805
+
1806
+ /**
1807
+ * Constructs a new ActionConfigs.
1808
+ * @memberof sqlanvil
1809
+ * @classdesc Represents an ActionConfigs.
1810
+ * @implements IActionConfigs
1811
+ * @constructor
1812
+ * @param {sqlanvil.IActionConfigs=} [properties] Properties to set
1813
+ */
1814
+ function ActionConfigs(properties) {
1815
+ this.actions = [];
1816
+ if (properties)
1817
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1818
+ if (properties[keys[i]] != null)
1819
+ this[keys[i]] = properties[keys[i]];
1820
+ }
1821
+
1822
+ /**
1823
+ * ActionConfigs actions.
1824
+ * @member {Array.<sqlanvil.IActionConfig>} actions
1825
+ * @memberof sqlanvil.ActionConfigs
1826
+ * @instance
1827
+ */
1828
+ ActionConfigs.prototype.actions = $util.emptyArray;
1829
+
1830
+ /**
1831
+ * Creates a new ActionConfigs instance using the specified properties.
1832
+ * @function create
1833
+ * @memberof sqlanvil.ActionConfigs
1834
+ * @static
1835
+ * @param {sqlanvil.IActionConfigs=} [properties] Properties to set
1836
+ * @returns {sqlanvil.ActionConfigs} ActionConfigs instance
1837
+ */
1838
+ ActionConfigs.create = function create(properties) {
1839
+ return new ActionConfigs(properties);
1840
+ };
1841
+
1842
+ /**
1843
+ * Encodes the specified ActionConfigs message. Does not implicitly {@link sqlanvil.ActionConfigs.verify|verify} messages.
1844
+ * @function encode
1845
+ * @memberof sqlanvil.ActionConfigs
1846
+ * @static
1847
+ * @param {sqlanvil.IActionConfigs} message ActionConfigs message or plain object to encode
1848
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1849
+ * @returns {$protobuf.Writer} Writer
1850
+ */
1851
+ ActionConfigs.encode = function encode(message, writer) {
1852
+ if (!writer)
1853
+ writer = $Writer.create();
1854
+ if (message.actions != null && message.actions.length)
1855
+ for (let i = 0; i < message.actions.length; ++i)
1856
+ $root.sqlanvil.ActionConfig.encode(message.actions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
1857
+ return writer;
1858
+ };
1859
+
1860
+ /**
1861
+ * Encodes the specified ActionConfigs message, length delimited. Does not implicitly {@link sqlanvil.ActionConfigs.verify|verify} messages.
1862
+ * @function encodeDelimited
1863
+ * @memberof sqlanvil.ActionConfigs
1864
+ * @static
1865
+ * @param {sqlanvil.IActionConfigs} message ActionConfigs message or plain object to encode
1866
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1867
+ * @returns {$protobuf.Writer} Writer
1868
+ */
1869
+ ActionConfigs.encodeDelimited = function encodeDelimited(message, writer) {
1870
+ return this.encode(message, writer).ldelim();
1871
+ };
1872
+
1873
+ /**
1874
+ * Decodes an ActionConfigs message from the specified reader or buffer.
1875
+ * @function decode
1876
+ * @memberof sqlanvil.ActionConfigs
1877
+ * @static
1878
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1879
+ * @param {number} [length] Message length if known beforehand
1880
+ * @returns {sqlanvil.ActionConfigs} ActionConfigs
1881
+ * @throws {Error} If the payload is not a reader or valid buffer
1882
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1883
+ */
1884
+ ActionConfigs.decode = function decode(reader, length, error) {
1885
+ if (!(reader instanceof $Reader))
1886
+ reader = $Reader.create(reader);
1887
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.ActionConfigs();
1888
+ while (reader.pos < end) {
1889
+ let tag = reader.uint32();
1890
+ if (tag === error)
1891
+ break;
1892
+ switch (tag >>> 3) {
1893
+ case 1: {
1894
+ if (!(message.actions && message.actions.length))
1895
+ message.actions = [];
1896
+ message.actions.push($root.sqlanvil.ActionConfig.decode(reader, reader.uint32()));
1897
+ break;
1898
+ }
1899
+ default:
1900
+ reader.skipType(tag & 7);
1901
+ break;
1902
+ }
1903
+ }
1904
+ return message;
1905
+ };
1906
+
1907
+ /**
1908
+ * Decodes an ActionConfigs message from the specified reader or buffer, length delimited.
1511
1909
  * @function decodeDelimited
1512
1910
  * @memberof sqlanvil.ActionConfigs
1513
1911
  * @static
@@ -3759,6 +4157,7 @@ const sqlanvil = $root.sqlanvil = (() => {
3759
4157
  * @property {string|null} [reservation] TableConfig reservation
3760
4158
  * @property {sqlanvil.IPostgresOptions|null} [postgres] TableConfig postgres
3761
4159
  * @property {sqlanvil.ISupabaseOptions|null} [supabase] TableConfig supabase
4160
+ * @property {sqlanvil.IMysqlOptions|null} [mysql] TableConfig mysql
3762
4161
  */
3763
4162
 
3764
4163
  /**
@@ -3984,6 +4383,14 @@ const sqlanvil = $root.sqlanvil = (() => {
3984
4383
  */
3985
4384
  TableConfig.prototype.supabase = null;
3986
4385
 
4386
+ /**
4387
+ * TableConfig mysql.
4388
+ * @member {sqlanvil.IMysqlOptions|null|undefined} mysql
4389
+ * @memberof sqlanvil.ActionConfig.TableConfig
4390
+ * @instance
4391
+ */
4392
+ TableConfig.prototype.mysql = null;
4393
+
3987
4394
  /**
3988
4395
  * Creates a new TableConfig instance using the specified properties.
3989
4396
  * @function create
@@ -4066,6 +4473,8 @@ const sqlanvil = $root.sqlanvil = (() => {
4066
4473
  $root.sqlanvil.PostgresOptions.encode(message.postgres, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim();
4067
4474
  if (message.supabase != null && Object.hasOwnProperty.call(message, "supabase"))
4068
4475
  $root.sqlanvil.SupabaseOptions.encode(message.supabase, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim();
4476
+ if (message.mysql != null && Object.hasOwnProperty.call(message, "mysql"))
4477
+ $root.sqlanvil.MysqlOptions.encode(message.mysql, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim();
4069
4478
  return writer;
4070
4479
  };
4071
4480
 
@@ -4252,6 +4661,10 @@ const sqlanvil = $root.sqlanvil = (() => {
4252
4661
  message.supabase = $root.sqlanvil.SupabaseOptions.decode(reader, reader.uint32());
4253
4662
  break;
4254
4663
  }
4664
+ case 27: {
4665
+ message.mysql = $root.sqlanvil.MysqlOptions.decode(reader, reader.uint32());
4666
+ break;
4667
+ }
4255
4668
  default:
4256
4669
  reader.skipType(tag & 7);
4257
4670
  break;
@@ -4410,6 +4823,11 @@ const sqlanvil = $root.sqlanvil = (() => {
4410
4823
  if (error)
4411
4824
  return "supabase." + error;
4412
4825
  }
4826
+ if (message.mysql != null && message.hasOwnProperty("mysql")) {
4827
+ let error = $root.sqlanvil.MysqlOptions.verify(message.mysql);
4828
+ if (error)
4829
+ return "mysql." + error;
4830
+ }
4413
4831
  return null;
4414
4832
  };
4415
4833
 
@@ -4536,6 +4954,11 @@ const sqlanvil = $root.sqlanvil = (() => {
4536
4954
  throw TypeError(".sqlanvil.ActionConfig.TableConfig.supabase: object expected");
4537
4955
  message.supabase = $root.sqlanvil.SupabaseOptions.fromObject(object.supabase);
4538
4956
  }
4957
+ if (object.mysql != null) {
4958
+ if (typeof object.mysql !== "object")
4959
+ throw TypeError(".sqlanvil.ActionConfig.TableConfig.mysql: object expected");
4960
+ message.mysql = $root.sqlanvil.MysqlOptions.fromObject(object.mysql);
4961
+ }
4539
4962
  return message;
4540
4963
  };
4541
4964
 
@@ -4582,6 +5005,7 @@ const sqlanvil = $root.sqlanvil = (() => {
4582
5005
  object.reservation = "";
4583
5006
  object.postgres = null;
4584
5007
  object.supabase = null;
5008
+ object.mysql = null;
4585
5009
  }
4586
5010
  if (message.name != null && message.hasOwnProperty("name"))
4587
5011
  object.name = message.name;
@@ -4658,6 +5082,8 @@ const sqlanvil = $root.sqlanvil = (() => {
4658
5082
  object.postgres = $root.sqlanvil.PostgresOptions.toObject(message.postgres, options);
4659
5083
  if (message.supabase != null && message.hasOwnProperty("supabase"))
4660
5084
  object.supabase = $root.sqlanvil.SupabaseOptions.toObject(message.supabase, options);
5085
+ if (message.mysql != null && message.hasOwnProperty("mysql"))
5086
+ object.mysql = $root.sqlanvil.MysqlOptions.toObject(message.mysql, options);
4661
5087
  return object;
4662
5088
  };
4663
5089
 
@@ -5860,6 +6286,7 @@ const sqlanvil = $root.sqlanvil = (() => {
5860
6286
  * @property {string|null} [reservation] IncrementalTableConfig reservation
5861
6287
  * @property {sqlanvil.IPostgresOptions|null} [postgres] IncrementalTableConfig postgres
5862
6288
  * @property {sqlanvil.ISupabaseOptions|null} [supabase] IncrementalTableConfig supabase
6289
+ * @property {sqlanvil.IMysqlOptions|null} [mysql] IncrementalTableConfig mysql
5863
6290
  */
5864
6291
 
5865
6292
  /**
@@ -6118,6 +6545,14 @@ const sqlanvil = $root.sqlanvil = (() => {
6118
6545
  */
6119
6546
  IncrementalTableConfig.prototype.supabase = null;
6120
6547
 
6548
+ /**
6549
+ * IncrementalTableConfig mysql.
6550
+ * @member {sqlanvil.IMysqlOptions|null|undefined} mysql
6551
+ * @memberof sqlanvil.ActionConfig.IncrementalTableConfig
6552
+ * @instance
6553
+ */
6554
+ IncrementalTableConfig.prototype.mysql = null;
6555
+
6121
6556
  /**
6122
6557
  * Creates a new IncrementalTableConfig instance using the specified properties.
6123
6558
  * @function create
@@ -6209,6 +6644,8 @@ const sqlanvil = $root.sqlanvil = (() => {
6209
6644
  $root.sqlanvil.PostgresOptions.encode(message.postgres, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim();
6210
6645
  if (message.supabase != null && Object.hasOwnProperty.call(message, "supabase"))
6211
6646
  $root.sqlanvil.SupabaseOptions.encode(message.supabase, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim();
6647
+ if (message.mysql != null && Object.hasOwnProperty.call(message, "mysql"))
6648
+ $root.sqlanvil.MysqlOptions.encode(message.mysql, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim();
6212
6649
  return writer;
6213
6650
  };
6214
6651
 
@@ -6413,6 +6850,10 @@ const sqlanvil = $root.sqlanvil = (() => {
6413
6850
  message.supabase = $root.sqlanvil.SupabaseOptions.decode(reader, reader.uint32());
6414
6851
  break;
6415
6852
  }
6853
+ case 30: {
6854
+ message.mysql = $root.sqlanvil.MysqlOptions.decode(reader, reader.uint32());
6855
+ break;
6856
+ }
6416
6857
  default:
6417
6858
  reader.skipType(tag & 7);
6418
6859
  break;
@@ -6594,6 +7035,11 @@ const sqlanvil = $root.sqlanvil = (() => {
6594
7035
  if (error)
6595
7036
  return "supabase." + error;
6596
7037
  }
7038
+ if (message.mysql != null && message.hasOwnProperty("mysql")) {
7039
+ let error = $root.sqlanvil.MysqlOptions.verify(message.mysql);
7040
+ if (error)
7041
+ return "mysql." + error;
7042
+ }
6597
7043
  return null;
6598
7044
  };
6599
7045
 
@@ -6755,6 +7201,11 @@ const sqlanvil = $root.sqlanvil = (() => {
6755
7201
  throw TypeError(".sqlanvil.ActionConfig.IncrementalTableConfig.supabase: object expected");
6756
7202
  message.supabase = $root.sqlanvil.SupabaseOptions.fromObject(object.supabase);
6757
7203
  }
7204
+ if (object.mysql != null) {
7205
+ if (typeof object.mysql !== "object")
7206
+ throw TypeError(".sqlanvil.ActionConfig.IncrementalTableConfig.mysql: object expected");
7207
+ message.mysql = $root.sqlanvil.MysqlOptions.fromObject(object.mysql);
7208
+ }
6758
7209
  return message;
6759
7210
  };
6760
7211
 
@@ -6805,6 +7256,7 @@ const sqlanvil = $root.sqlanvil = (() => {
6805
7256
  object.reservation = "";
6806
7257
  object.postgres = null;
6807
7258
  object.supabase = null;
7259
+ object.mysql = null;
6808
7260
  }
6809
7261
  if (message.name != null && message.hasOwnProperty("name"))
6810
7262
  object.name = message.name;
@@ -6892,6 +7344,8 @@ const sqlanvil = $root.sqlanvil = (() => {
6892
7344
  object.postgres = $root.sqlanvil.PostgresOptions.toObject(message.postgres, options);
6893
7345
  if (message.supabase != null && message.hasOwnProperty("supabase"))
6894
7346
  object.supabase = $root.sqlanvil.SupabaseOptions.toObject(message.supabase, options);
7347
+ if (message.mysql != null && message.hasOwnProperty("mysql"))
7348
+ object.mysql = $root.sqlanvil.MysqlOptions.toObject(message.mysql, options);
6895
7349
  return object;
6896
7350
  };
6897
7351
 
@@ -12911,38 +13365,762 @@ const sqlanvil = $root.sqlanvil = (() => {
12911
13365
  return typeUrlPrefix + "/sqlanvil.PostgresOptions.Partition.Bound";
12912
13366
  };
12913
13367
 
12914
- return Bound;
12915
- })();
13368
+ return Bound;
13369
+ })();
13370
+
13371
+ return Partition;
13372
+ })();
13373
+
13374
+ PostgresOptions.Index = (function() {
13375
+
13376
+ /**
13377
+ * Properties of an Index.
13378
+ * @memberof sqlanvil.PostgresOptions
13379
+ * @interface IIndex
13380
+ * @property {string|null} [name] Index name
13381
+ * @property {Array.<string>|null} [columns] Index columns
13382
+ * @property {sqlanvil.PostgresOptions.Index.Method|null} [method] Index method
13383
+ * @property {string|null} [where] Index where
13384
+ * @property {boolean|null} [unique] Index unique
13385
+ * @property {Array.<string>|null} [include] Index include
13386
+ * @property {string|null} [opclass] Index opclass
13387
+ */
13388
+
13389
+ /**
13390
+ * Constructs a new Index.
13391
+ * @memberof sqlanvil.PostgresOptions
13392
+ * @classdesc Represents an Index.
13393
+ * @implements IIndex
13394
+ * @constructor
13395
+ * @param {sqlanvil.PostgresOptions.IIndex=} [properties] Properties to set
13396
+ */
13397
+ function Index(properties) {
13398
+ this.columns = [];
13399
+ this.include = [];
13400
+ if (properties)
13401
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
13402
+ if (properties[keys[i]] != null)
13403
+ this[keys[i]] = properties[keys[i]];
13404
+ }
13405
+
13406
+ /**
13407
+ * Index name.
13408
+ * @member {string} name
13409
+ * @memberof sqlanvil.PostgresOptions.Index
13410
+ * @instance
13411
+ */
13412
+ Index.prototype.name = "";
13413
+
13414
+ /**
13415
+ * Index columns.
13416
+ * @member {Array.<string>} columns
13417
+ * @memberof sqlanvil.PostgresOptions.Index
13418
+ * @instance
13419
+ */
13420
+ Index.prototype.columns = $util.emptyArray;
13421
+
13422
+ /**
13423
+ * Index method.
13424
+ * @member {sqlanvil.PostgresOptions.Index.Method} method
13425
+ * @memberof sqlanvil.PostgresOptions.Index
13426
+ * @instance
13427
+ */
13428
+ Index.prototype.method = 0;
13429
+
13430
+ /**
13431
+ * Index where.
13432
+ * @member {string} where
13433
+ * @memberof sqlanvil.PostgresOptions.Index
13434
+ * @instance
13435
+ */
13436
+ Index.prototype.where = "";
13437
+
13438
+ /**
13439
+ * Index unique.
13440
+ * @member {boolean} unique
13441
+ * @memberof sqlanvil.PostgresOptions.Index
13442
+ * @instance
13443
+ */
13444
+ Index.prototype.unique = false;
13445
+
13446
+ /**
13447
+ * Index include.
13448
+ * @member {Array.<string>} include
13449
+ * @memberof sqlanvil.PostgresOptions.Index
13450
+ * @instance
13451
+ */
13452
+ Index.prototype.include = $util.emptyArray;
13453
+
13454
+ /**
13455
+ * Index opclass.
13456
+ * @member {string} opclass
13457
+ * @memberof sqlanvil.PostgresOptions.Index
13458
+ * @instance
13459
+ */
13460
+ Index.prototype.opclass = "";
13461
+
13462
+ /**
13463
+ * Creates a new Index instance using the specified properties.
13464
+ * @function create
13465
+ * @memberof sqlanvil.PostgresOptions.Index
13466
+ * @static
13467
+ * @param {sqlanvil.PostgresOptions.IIndex=} [properties] Properties to set
13468
+ * @returns {sqlanvil.PostgresOptions.Index} Index instance
13469
+ */
13470
+ Index.create = function create(properties) {
13471
+ return new Index(properties);
13472
+ };
13473
+
13474
+ /**
13475
+ * Encodes the specified Index message. Does not implicitly {@link sqlanvil.PostgresOptions.Index.verify|verify} messages.
13476
+ * @function encode
13477
+ * @memberof sqlanvil.PostgresOptions.Index
13478
+ * @static
13479
+ * @param {sqlanvil.PostgresOptions.IIndex} message Index message or plain object to encode
13480
+ * @param {$protobuf.Writer} [writer] Writer to encode to
13481
+ * @returns {$protobuf.Writer} Writer
13482
+ */
13483
+ Index.encode = function encode(message, writer) {
13484
+ if (!writer)
13485
+ writer = $Writer.create();
13486
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
13487
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
13488
+ if (message.columns != null && message.columns.length)
13489
+ for (let i = 0; i < message.columns.length; ++i)
13490
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.columns[i]);
13491
+ if (message.method != null && Object.hasOwnProperty.call(message, "method"))
13492
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.method);
13493
+ if (message.where != null && Object.hasOwnProperty.call(message, "where"))
13494
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.where);
13495
+ if (message.unique != null && Object.hasOwnProperty.call(message, "unique"))
13496
+ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.unique);
13497
+ if (message.include != null && message.include.length)
13498
+ for (let i = 0; i < message.include.length; ++i)
13499
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.include[i]);
13500
+ if (message.opclass != null && Object.hasOwnProperty.call(message, "opclass"))
13501
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.opclass);
13502
+ return writer;
13503
+ };
13504
+
13505
+ /**
13506
+ * Encodes the specified Index message, length delimited. Does not implicitly {@link sqlanvil.PostgresOptions.Index.verify|verify} messages.
13507
+ * @function encodeDelimited
13508
+ * @memberof sqlanvil.PostgresOptions.Index
13509
+ * @static
13510
+ * @param {sqlanvil.PostgresOptions.IIndex} message Index message or plain object to encode
13511
+ * @param {$protobuf.Writer} [writer] Writer to encode to
13512
+ * @returns {$protobuf.Writer} Writer
13513
+ */
13514
+ Index.encodeDelimited = function encodeDelimited(message, writer) {
13515
+ return this.encode(message, writer).ldelim();
13516
+ };
13517
+
13518
+ /**
13519
+ * Decodes an Index message from the specified reader or buffer.
13520
+ * @function decode
13521
+ * @memberof sqlanvil.PostgresOptions.Index
13522
+ * @static
13523
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
13524
+ * @param {number} [length] Message length if known beforehand
13525
+ * @returns {sqlanvil.PostgresOptions.Index} Index
13526
+ * @throws {Error} If the payload is not a reader or valid buffer
13527
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
13528
+ */
13529
+ Index.decode = function decode(reader, length, error) {
13530
+ if (!(reader instanceof $Reader))
13531
+ reader = $Reader.create(reader);
13532
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.PostgresOptions.Index();
13533
+ while (reader.pos < end) {
13534
+ let tag = reader.uint32();
13535
+ if (tag === error)
13536
+ break;
13537
+ switch (tag >>> 3) {
13538
+ case 1: {
13539
+ message.name = reader.string();
13540
+ break;
13541
+ }
13542
+ case 2: {
13543
+ if (!(message.columns && message.columns.length))
13544
+ message.columns = [];
13545
+ message.columns.push(reader.string());
13546
+ break;
13547
+ }
13548
+ case 3: {
13549
+ message.method = reader.int32();
13550
+ break;
13551
+ }
13552
+ case 4: {
13553
+ message.where = reader.string();
13554
+ break;
13555
+ }
13556
+ case 5: {
13557
+ message.unique = reader.bool();
13558
+ break;
13559
+ }
13560
+ case 6: {
13561
+ if (!(message.include && message.include.length))
13562
+ message.include = [];
13563
+ message.include.push(reader.string());
13564
+ break;
13565
+ }
13566
+ case 7: {
13567
+ message.opclass = reader.string();
13568
+ break;
13569
+ }
13570
+ default:
13571
+ reader.skipType(tag & 7);
13572
+ break;
13573
+ }
13574
+ }
13575
+ return message;
13576
+ };
13577
+
13578
+ /**
13579
+ * Decodes an Index message from the specified reader or buffer, length delimited.
13580
+ * @function decodeDelimited
13581
+ * @memberof sqlanvil.PostgresOptions.Index
13582
+ * @static
13583
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
13584
+ * @returns {sqlanvil.PostgresOptions.Index} Index
13585
+ * @throws {Error} If the payload is not a reader or valid buffer
13586
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
13587
+ */
13588
+ Index.decodeDelimited = function decodeDelimited(reader) {
13589
+ if (!(reader instanceof $Reader))
13590
+ reader = new $Reader(reader);
13591
+ return this.decode(reader, reader.uint32());
13592
+ };
13593
+
13594
+ /**
13595
+ * Verifies an Index message.
13596
+ * @function verify
13597
+ * @memberof sqlanvil.PostgresOptions.Index
13598
+ * @static
13599
+ * @param {Object.<string,*>} message Plain object to verify
13600
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
13601
+ */
13602
+ Index.verify = function verify(message) {
13603
+ if (typeof message !== "object" || message === null)
13604
+ return "object expected";
13605
+ if (message.name != null && message.hasOwnProperty("name"))
13606
+ if (!$util.isString(message.name))
13607
+ return "name: string expected";
13608
+ if (message.columns != null && message.hasOwnProperty("columns")) {
13609
+ if (!Array.isArray(message.columns))
13610
+ return "columns: array expected";
13611
+ for (let i = 0; i < message.columns.length; ++i)
13612
+ if (!$util.isString(message.columns[i]))
13613
+ return "columns: string[] expected";
13614
+ }
13615
+ if (message.method != null && message.hasOwnProperty("method"))
13616
+ switch (message.method) {
13617
+ default:
13618
+ return "method: enum value expected";
13619
+ case 0:
13620
+ case 1:
13621
+ case 2:
13622
+ case 3:
13623
+ case 4:
13624
+ break;
13625
+ }
13626
+ if (message.where != null && message.hasOwnProperty("where"))
13627
+ if (!$util.isString(message.where))
13628
+ return "where: string expected";
13629
+ if (message.unique != null && message.hasOwnProperty("unique"))
13630
+ if (typeof message.unique !== "boolean")
13631
+ return "unique: boolean expected";
13632
+ if (message.include != null && message.hasOwnProperty("include")) {
13633
+ if (!Array.isArray(message.include))
13634
+ return "include: array expected";
13635
+ for (let i = 0; i < message.include.length; ++i)
13636
+ if (!$util.isString(message.include[i]))
13637
+ return "include: string[] expected";
13638
+ }
13639
+ if (message.opclass != null && message.hasOwnProperty("opclass"))
13640
+ if (!$util.isString(message.opclass))
13641
+ return "opclass: string expected";
13642
+ return null;
13643
+ };
13644
+
13645
+ /**
13646
+ * Creates an Index message from a plain object. Also converts values to their respective internal types.
13647
+ * @function fromObject
13648
+ * @memberof sqlanvil.PostgresOptions.Index
13649
+ * @static
13650
+ * @param {Object.<string,*>} object Plain object
13651
+ * @returns {sqlanvil.PostgresOptions.Index} Index
13652
+ */
13653
+ Index.fromObject = function fromObject(object) {
13654
+ if (object instanceof $root.sqlanvil.PostgresOptions.Index)
13655
+ return object;
13656
+ let message = new $root.sqlanvil.PostgresOptions.Index();
13657
+ if (object.name != null)
13658
+ message.name = String(object.name);
13659
+ if (object.columns) {
13660
+ if (!Array.isArray(object.columns))
13661
+ throw TypeError(".sqlanvil.PostgresOptions.Index.columns: array expected");
13662
+ message.columns = [];
13663
+ for (let i = 0; i < object.columns.length; ++i)
13664
+ message.columns[i] = String(object.columns[i]);
13665
+ }
13666
+ switch (object.method) {
13667
+ default:
13668
+ if (typeof object.method === "number") {
13669
+ message.method = object.method;
13670
+ break;
13671
+ }
13672
+ break;
13673
+ case "BTREE":
13674
+ case 0:
13675
+ message.method = 0;
13676
+ break;
13677
+ case "HASH":
13678
+ case 1:
13679
+ message.method = 1;
13680
+ break;
13681
+ case "GIN":
13682
+ case 2:
13683
+ message.method = 2;
13684
+ break;
13685
+ case "GIST":
13686
+ case 3:
13687
+ message.method = 3;
13688
+ break;
13689
+ case "BRIN":
13690
+ case 4:
13691
+ message.method = 4;
13692
+ break;
13693
+ }
13694
+ if (object.where != null)
13695
+ message.where = String(object.where);
13696
+ if (object.unique != null)
13697
+ message.unique = Boolean(object.unique);
13698
+ if (object.include) {
13699
+ if (!Array.isArray(object.include))
13700
+ throw TypeError(".sqlanvil.PostgresOptions.Index.include: array expected");
13701
+ message.include = [];
13702
+ for (let i = 0; i < object.include.length; ++i)
13703
+ message.include[i] = String(object.include[i]);
13704
+ }
13705
+ if (object.opclass != null)
13706
+ message.opclass = String(object.opclass);
13707
+ return message;
13708
+ };
13709
+
13710
+ /**
13711
+ * Creates a plain object from an Index message. Also converts values to other types if specified.
13712
+ * @function toObject
13713
+ * @memberof sqlanvil.PostgresOptions.Index
13714
+ * @static
13715
+ * @param {sqlanvil.PostgresOptions.Index} message Index
13716
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
13717
+ * @returns {Object.<string,*>} Plain object
13718
+ */
13719
+ Index.toObject = function toObject(message, options) {
13720
+ if (!options)
13721
+ options = {};
13722
+ let object = {};
13723
+ if (options.arrays || options.defaults) {
13724
+ object.columns = [];
13725
+ object.include = [];
13726
+ }
13727
+ if (options.defaults) {
13728
+ object.name = "";
13729
+ object.method = options.enums === String ? "BTREE" : 0;
13730
+ object.where = "";
13731
+ object.unique = false;
13732
+ object.opclass = "";
13733
+ }
13734
+ if (message.name != null && message.hasOwnProperty("name"))
13735
+ object.name = message.name;
13736
+ if (message.columns && message.columns.length) {
13737
+ object.columns = [];
13738
+ for (let j = 0; j < message.columns.length; ++j)
13739
+ object.columns[j] = message.columns[j];
13740
+ }
13741
+ if (message.method != null && message.hasOwnProperty("method"))
13742
+ object.method = options.enums === String ? $root.sqlanvil.PostgresOptions.Index.Method[message.method] === undefined ? message.method : $root.sqlanvil.PostgresOptions.Index.Method[message.method] : message.method;
13743
+ if (message.where != null && message.hasOwnProperty("where"))
13744
+ object.where = message.where;
13745
+ if (message.unique != null && message.hasOwnProperty("unique"))
13746
+ object.unique = message.unique;
13747
+ if (message.include && message.include.length) {
13748
+ object.include = [];
13749
+ for (let j = 0; j < message.include.length; ++j)
13750
+ object.include[j] = message.include[j];
13751
+ }
13752
+ if (message.opclass != null && message.hasOwnProperty("opclass"))
13753
+ object.opclass = message.opclass;
13754
+ return object;
13755
+ };
13756
+
13757
+ /**
13758
+ * Converts this Index to JSON.
13759
+ * @function toJSON
13760
+ * @memberof sqlanvil.PostgresOptions.Index
13761
+ * @instance
13762
+ * @returns {Object.<string,*>} JSON object
13763
+ */
13764
+ Index.prototype.toJSON = function toJSON() {
13765
+ return this.constructor.toObject(this, $protobuf__namespace.util.toJSONOptions);
13766
+ };
13767
+
13768
+ /**
13769
+ * Gets the default type url for Index
13770
+ * @function getTypeUrl
13771
+ * @memberof sqlanvil.PostgresOptions.Index
13772
+ * @static
13773
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
13774
+ * @returns {string} The default type url
13775
+ */
13776
+ Index.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
13777
+ if (typeUrlPrefix === undefined) {
13778
+ typeUrlPrefix = "type.googleapis.com";
13779
+ }
13780
+ return typeUrlPrefix + "/sqlanvil.PostgresOptions.Index";
13781
+ };
13782
+
13783
+ /**
13784
+ * Method enum.
13785
+ * @name sqlanvil.PostgresOptions.Index.Method
13786
+ * @enum {number}
13787
+ * @property {number} BTREE=0 BTREE value
13788
+ * @property {number} HASH=1 HASH value
13789
+ * @property {number} GIN=2 GIN value
13790
+ * @property {number} GIST=3 GIST value
13791
+ * @property {number} BRIN=4 BRIN value
13792
+ */
13793
+ Index.Method = (function() {
13794
+ const valuesById = {}, values = Object.create(valuesById);
13795
+ values[valuesById[0] = "BTREE"] = 0;
13796
+ values[valuesById[1] = "HASH"] = 1;
13797
+ values[valuesById[2] = "GIN"] = 2;
13798
+ values[valuesById[3] = "GIST"] = 3;
13799
+ values[valuesById[4] = "BRIN"] = 4;
13800
+ return values;
13801
+ })();
13802
+
13803
+ return Index;
13804
+ })();
13805
+
13806
+ return PostgresOptions;
13807
+ })();
13808
+
13809
+ sqlanvil.MysqlOptions = (function() {
13810
+
13811
+ /**
13812
+ * Properties of a MysqlOptions.
13813
+ * @memberof sqlanvil
13814
+ * @interface IMysqlOptions
13815
+ * @property {string|null} [engine] MysqlOptions engine
13816
+ * @property {string|null} [charset] MysqlOptions charset
13817
+ * @property {string|null} [collation] MysqlOptions collation
13818
+ * @property {Array.<sqlanvil.MysqlOptions.IIndex>|null} [indexes] MysqlOptions indexes
13819
+ */
13820
+
13821
+ /**
13822
+ * Constructs a new MysqlOptions.
13823
+ * @memberof sqlanvil
13824
+ * @classdesc Represents a MysqlOptions.
13825
+ * @implements IMysqlOptions
13826
+ * @constructor
13827
+ * @param {sqlanvil.IMysqlOptions=} [properties] Properties to set
13828
+ */
13829
+ function MysqlOptions(properties) {
13830
+ this.indexes = [];
13831
+ if (properties)
13832
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
13833
+ if (properties[keys[i]] != null)
13834
+ this[keys[i]] = properties[keys[i]];
13835
+ }
13836
+
13837
+ /**
13838
+ * MysqlOptions engine.
13839
+ * @member {string} engine
13840
+ * @memberof sqlanvil.MysqlOptions
13841
+ * @instance
13842
+ */
13843
+ MysqlOptions.prototype.engine = "";
13844
+
13845
+ /**
13846
+ * MysqlOptions charset.
13847
+ * @member {string} charset
13848
+ * @memberof sqlanvil.MysqlOptions
13849
+ * @instance
13850
+ */
13851
+ MysqlOptions.prototype.charset = "";
13852
+
13853
+ /**
13854
+ * MysqlOptions collation.
13855
+ * @member {string} collation
13856
+ * @memberof sqlanvil.MysqlOptions
13857
+ * @instance
13858
+ */
13859
+ MysqlOptions.prototype.collation = "";
13860
+
13861
+ /**
13862
+ * MysqlOptions indexes.
13863
+ * @member {Array.<sqlanvil.MysqlOptions.IIndex>} indexes
13864
+ * @memberof sqlanvil.MysqlOptions
13865
+ * @instance
13866
+ */
13867
+ MysqlOptions.prototype.indexes = $util.emptyArray;
13868
+
13869
+ /**
13870
+ * Creates a new MysqlOptions instance using the specified properties.
13871
+ * @function create
13872
+ * @memberof sqlanvil.MysqlOptions
13873
+ * @static
13874
+ * @param {sqlanvil.IMysqlOptions=} [properties] Properties to set
13875
+ * @returns {sqlanvil.MysqlOptions} MysqlOptions instance
13876
+ */
13877
+ MysqlOptions.create = function create(properties) {
13878
+ return new MysqlOptions(properties);
13879
+ };
13880
+
13881
+ /**
13882
+ * Encodes the specified MysqlOptions message. Does not implicitly {@link sqlanvil.MysqlOptions.verify|verify} messages.
13883
+ * @function encode
13884
+ * @memberof sqlanvil.MysqlOptions
13885
+ * @static
13886
+ * @param {sqlanvil.IMysqlOptions} message MysqlOptions message or plain object to encode
13887
+ * @param {$protobuf.Writer} [writer] Writer to encode to
13888
+ * @returns {$protobuf.Writer} Writer
13889
+ */
13890
+ MysqlOptions.encode = function encode(message, writer) {
13891
+ if (!writer)
13892
+ writer = $Writer.create();
13893
+ if (message.engine != null && Object.hasOwnProperty.call(message, "engine"))
13894
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.engine);
13895
+ if (message.charset != null && Object.hasOwnProperty.call(message, "charset"))
13896
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.charset);
13897
+ if (message.collation != null && Object.hasOwnProperty.call(message, "collation"))
13898
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.collation);
13899
+ if (message.indexes != null && message.indexes.length)
13900
+ for (let i = 0; i < message.indexes.length; ++i)
13901
+ $root.sqlanvil.MysqlOptions.Index.encode(message.indexes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
13902
+ return writer;
13903
+ };
13904
+
13905
+ /**
13906
+ * Encodes the specified MysqlOptions message, length delimited. Does not implicitly {@link sqlanvil.MysqlOptions.verify|verify} messages.
13907
+ * @function encodeDelimited
13908
+ * @memberof sqlanvil.MysqlOptions
13909
+ * @static
13910
+ * @param {sqlanvil.IMysqlOptions} message MysqlOptions message or plain object to encode
13911
+ * @param {$protobuf.Writer} [writer] Writer to encode to
13912
+ * @returns {$protobuf.Writer} Writer
13913
+ */
13914
+ MysqlOptions.encodeDelimited = function encodeDelimited(message, writer) {
13915
+ return this.encode(message, writer).ldelim();
13916
+ };
13917
+
13918
+ /**
13919
+ * Decodes a MysqlOptions message from the specified reader or buffer.
13920
+ * @function decode
13921
+ * @memberof sqlanvil.MysqlOptions
13922
+ * @static
13923
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
13924
+ * @param {number} [length] Message length if known beforehand
13925
+ * @returns {sqlanvil.MysqlOptions} MysqlOptions
13926
+ * @throws {Error} If the payload is not a reader or valid buffer
13927
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
13928
+ */
13929
+ MysqlOptions.decode = function decode(reader, length, error) {
13930
+ if (!(reader instanceof $Reader))
13931
+ reader = $Reader.create(reader);
13932
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.MysqlOptions();
13933
+ while (reader.pos < end) {
13934
+ let tag = reader.uint32();
13935
+ if (tag === error)
13936
+ break;
13937
+ switch (tag >>> 3) {
13938
+ case 1: {
13939
+ message.engine = reader.string();
13940
+ break;
13941
+ }
13942
+ case 2: {
13943
+ message.charset = reader.string();
13944
+ break;
13945
+ }
13946
+ case 3: {
13947
+ message.collation = reader.string();
13948
+ break;
13949
+ }
13950
+ case 4: {
13951
+ if (!(message.indexes && message.indexes.length))
13952
+ message.indexes = [];
13953
+ message.indexes.push($root.sqlanvil.MysqlOptions.Index.decode(reader, reader.uint32()));
13954
+ break;
13955
+ }
13956
+ default:
13957
+ reader.skipType(tag & 7);
13958
+ break;
13959
+ }
13960
+ }
13961
+ return message;
13962
+ };
13963
+
13964
+ /**
13965
+ * Decodes a MysqlOptions message from the specified reader or buffer, length delimited.
13966
+ * @function decodeDelimited
13967
+ * @memberof sqlanvil.MysqlOptions
13968
+ * @static
13969
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
13970
+ * @returns {sqlanvil.MysqlOptions} MysqlOptions
13971
+ * @throws {Error} If the payload is not a reader or valid buffer
13972
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
13973
+ */
13974
+ MysqlOptions.decodeDelimited = function decodeDelimited(reader) {
13975
+ if (!(reader instanceof $Reader))
13976
+ reader = new $Reader(reader);
13977
+ return this.decode(reader, reader.uint32());
13978
+ };
13979
+
13980
+ /**
13981
+ * Verifies a MysqlOptions message.
13982
+ * @function verify
13983
+ * @memberof sqlanvil.MysqlOptions
13984
+ * @static
13985
+ * @param {Object.<string,*>} message Plain object to verify
13986
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
13987
+ */
13988
+ MysqlOptions.verify = function verify(message) {
13989
+ if (typeof message !== "object" || message === null)
13990
+ return "object expected";
13991
+ if (message.engine != null && message.hasOwnProperty("engine"))
13992
+ if (!$util.isString(message.engine))
13993
+ return "engine: string expected";
13994
+ if (message.charset != null && message.hasOwnProperty("charset"))
13995
+ if (!$util.isString(message.charset))
13996
+ return "charset: string expected";
13997
+ if (message.collation != null && message.hasOwnProperty("collation"))
13998
+ if (!$util.isString(message.collation))
13999
+ return "collation: string expected";
14000
+ if (message.indexes != null && message.hasOwnProperty("indexes")) {
14001
+ if (!Array.isArray(message.indexes))
14002
+ return "indexes: array expected";
14003
+ for (let i = 0; i < message.indexes.length; ++i) {
14004
+ let error = $root.sqlanvil.MysqlOptions.Index.verify(message.indexes[i]);
14005
+ if (error)
14006
+ return "indexes." + error;
14007
+ }
14008
+ }
14009
+ return null;
14010
+ };
14011
+
14012
+ /**
14013
+ * Creates a MysqlOptions message from a plain object. Also converts values to their respective internal types.
14014
+ * @function fromObject
14015
+ * @memberof sqlanvil.MysqlOptions
14016
+ * @static
14017
+ * @param {Object.<string,*>} object Plain object
14018
+ * @returns {sqlanvil.MysqlOptions} MysqlOptions
14019
+ */
14020
+ MysqlOptions.fromObject = function fromObject(object) {
14021
+ if (object instanceof $root.sqlanvil.MysqlOptions)
14022
+ return object;
14023
+ let message = new $root.sqlanvil.MysqlOptions();
14024
+ if (object.engine != null)
14025
+ message.engine = String(object.engine);
14026
+ if (object.charset != null)
14027
+ message.charset = String(object.charset);
14028
+ if (object.collation != null)
14029
+ message.collation = String(object.collation);
14030
+ if (object.indexes) {
14031
+ if (!Array.isArray(object.indexes))
14032
+ throw TypeError(".sqlanvil.MysqlOptions.indexes: array expected");
14033
+ message.indexes = [];
14034
+ for (let i = 0; i < object.indexes.length; ++i) {
14035
+ if (typeof object.indexes[i] !== "object")
14036
+ throw TypeError(".sqlanvil.MysqlOptions.indexes: object expected");
14037
+ message.indexes[i] = $root.sqlanvil.MysqlOptions.Index.fromObject(object.indexes[i]);
14038
+ }
14039
+ }
14040
+ return message;
14041
+ };
14042
+
14043
+ /**
14044
+ * Creates a plain object from a MysqlOptions message. Also converts values to other types if specified.
14045
+ * @function toObject
14046
+ * @memberof sqlanvil.MysqlOptions
14047
+ * @static
14048
+ * @param {sqlanvil.MysqlOptions} message MysqlOptions
14049
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
14050
+ * @returns {Object.<string,*>} Plain object
14051
+ */
14052
+ MysqlOptions.toObject = function toObject(message, options) {
14053
+ if (!options)
14054
+ options = {};
14055
+ let object = {};
14056
+ if (options.arrays || options.defaults)
14057
+ object.indexes = [];
14058
+ if (options.defaults) {
14059
+ object.engine = "";
14060
+ object.charset = "";
14061
+ object.collation = "";
14062
+ }
14063
+ if (message.engine != null && message.hasOwnProperty("engine"))
14064
+ object.engine = message.engine;
14065
+ if (message.charset != null && message.hasOwnProperty("charset"))
14066
+ object.charset = message.charset;
14067
+ if (message.collation != null && message.hasOwnProperty("collation"))
14068
+ object.collation = message.collation;
14069
+ if (message.indexes && message.indexes.length) {
14070
+ object.indexes = [];
14071
+ for (let j = 0; j < message.indexes.length; ++j)
14072
+ object.indexes[j] = $root.sqlanvil.MysqlOptions.Index.toObject(message.indexes[j], options);
14073
+ }
14074
+ return object;
14075
+ };
12916
14076
 
12917
- return Partition;
12918
- })();
14077
+ /**
14078
+ * Converts this MysqlOptions to JSON.
14079
+ * @function toJSON
14080
+ * @memberof sqlanvil.MysqlOptions
14081
+ * @instance
14082
+ * @returns {Object.<string,*>} JSON object
14083
+ */
14084
+ MysqlOptions.prototype.toJSON = function toJSON() {
14085
+ return this.constructor.toObject(this, $protobuf__namespace.util.toJSONOptions);
14086
+ };
12919
14087
 
12920
- PostgresOptions.Index = (function() {
14088
+ /**
14089
+ * Gets the default type url for MysqlOptions
14090
+ * @function getTypeUrl
14091
+ * @memberof sqlanvil.MysqlOptions
14092
+ * @static
14093
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
14094
+ * @returns {string} The default type url
14095
+ */
14096
+ MysqlOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
14097
+ if (typeUrlPrefix === undefined) {
14098
+ typeUrlPrefix = "type.googleapis.com";
14099
+ }
14100
+ return typeUrlPrefix + "/sqlanvil.MysqlOptions";
14101
+ };
14102
+
14103
+ MysqlOptions.Index = (function() {
12921
14104
 
12922
14105
  /**
12923
14106
  * Properties of an Index.
12924
- * @memberof sqlanvil.PostgresOptions
14107
+ * @memberof sqlanvil.MysqlOptions
12925
14108
  * @interface IIndex
12926
14109
  * @property {string|null} [name] Index name
12927
14110
  * @property {Array.<string>|null} [columns] Index columns
12928
- * @property {sqlanvil.PostgresOptions.Index.Method|null} [method] Index method
12929
- * @property {string|null} [where] Index where
12930
14111
  * @property {boolean|null} [unique] Index unique
12931
- * @property {Array.<string>|null} [include] Index include
12932
- * @property {string|null} [opclass] Index opclass
12933
14112
  */
12934
14113
 
12935
14114
  /**
12936
14115
  * Constructs a new Index.
12937
- * @memberof sqlanvil.PostgresOptions
14116
+ * @memberof sqlanvil.MysqlOptions
12938
14117
  * @classdesc Represents an Index.
12939
14118
  * @implements IIndex
12940
14119
  * @constructor
12941
- * @param {sqlanvil.PostgresOptions.IIndex=} [properties] Properties to set
14120
+ * @param {sqlanvil.MysqlOptions.IIndex=} [properties] Properties to set
12942
14121
  */
12943
14122
  function Index(properties) {
12944
14123
  this.columns = [];
12945
- this.include = [];
12946
14124
  if (properties)
12947
14125
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
12948
14126
  if (properties[keys[i]] != null)
@@ -12952,7 +14130,7 @@ const sqlanvil = $root.sqlanvil = (() => {
12952
14130
  /**
12953
14131
  * Index name.
12954
14132
  * @member {string} name
12955
- * @memberof sqlanvil.PostgresOptions.Index
14133
+ * @memberof sqlanvil.MysqlOptions.Index
12956
14134
  * @instance
12957
14135
  */
12958
14136
  Index.prototype.name = "";
@@ -12960,69 +14138,37 @@ const sqlanvil = $root.sqlanvil = (() => {
12960
14138
  /**
12961
14139
  * Index columns.
12962
14140
  * @member {Array.<string>} columns
12963
- * @memberof sqlanvil.PostgresOptions.Index
14141
+ * @memberof sqlanvil.MysqlOptions.Index
12964
14142
  * @instance
12965
14143
  */
12966
14144
  Index.prototype.columns = $util.emptyArray;
12967
14145
 
12968
- /**
12969
- * Index method.
12970
- * @member {sqlanvil.PostgresOptions.Index.Method} method
12971
- * @memberof sqlanvil.PostgresOptions.Index
12972
- * @instance
12973
- */
12974
- Index.prototype.method = 0;
12975
-
12976
- /**
12977
- * Index where.
12978
- * @member {string} where
12979
- * @memberof sqlanvil.PostgresOptions.Index
12980
- * @instance
12981
- */
12982
- Index.prototype.where = "";
12983
-
12984
14146
  /**
12985
14147
  * Index unique.
12986
14148
  * @member {boolean} unique
12987
- * @memberof sqlanvil.PostgresOptions.Index
14149
+ * @memberof sqlanvil.MysqlOptions.Index
12988
14150
  * @instance
12989
14151
  */
12990
14152
  Index.prototype.unique = false;
12991
14153
 
12992
- /**
12993
- * Index include.
12994
- * @member {Array.<string>} include
12995
- * @memberof sqlanvil.PostgresOptions.Index
12996
- * @instance
12997
- */
12998
- Index.prototype.include = $util.emptyArray;
12999
-
13000
- /**
13001
- * Index opclass.
13002
- * @member {string} opclass
13003
- * @memberof sqlanvil.PostgresOptions.Index
13004
- * @instance
13005
- */
13006
- Index.prototype.opclass = "";
13007
-
13008
14154
  /**
13009
14155
  * Creates a new Index instance using the specified properties.
13010
14156
  * @function create
13011
- * @memberof sqlanvil.PostgresOptions.Index
14157
+ * @memberof sqlanvil.MysqlOptions.Index
13012
14158
  * @static
13013
- * @param {sqlanvil.PostgresOptions.IIndex=} [properties] Properties to set
13014
- * @returns {sqlanvil.PostgresOptions.Index} Index instance
14159
+ * @param {sqlanvil.MysqlOptions.IIndex=} [properties] Properties to set
14160
+ * @returns {sqlanvil.MysqlOptions.Index} Index instance
13015
14161
  */
13016
14162
  Index.create = function create(properties) {
13017
14163
  return new Index(properties);
13018
14164
  };
13019
14165
 
13020
14166
  /**
13021
- * Encodes the specified Index message. Does not implicitly {@link sqlanvil.PostgresOptions.Index.verify|verify} messages.
14167
+ * Encodes the specified Index message. Does not implicitly {@link sqlanvil.MysqlOptions.Index.verify|verify} messages.
13022
14168
  * @function encode
13023
- * @memberof sqlanvil.PostgresOptions.Index
14169
+ * @memberof sqlanvil.MysqlOptions.Index
13024
14170
  * @static
13025
- * @param {sqlanvil.PostgresOptions.IIndex} message Index message or plain object to encode
14171
+ * @param {sqlanvil.MysqlOptions.IIndex} message Index message or plain object to encode
13026
14172
  * @param {$protobuf.Writer} [writer] Writer to encode to
13027
14173
  * @returns {$protobuf.Writer} Writer
13028
14174
  */
@@ -13034,26 +14180,17 @@ const sqlanvil = $root.sqlanvil = (() => {
13034
14180
  if (message.columns != null && message.columns.length)
13035
14181
  for (let i = 0; i < message.columns.length; ++i)
13036
14182
  writer.uint32(/* id 2, wireType 2 =*/18).string(message.columns[i]);
13037
- if (message.method != null && Object.hasOwnProperty.call(message, "method"))
13038
- writer.uint32(/* id 3, wireType 0 =*/24).int32(message.method);
13039
- if (message.where != null && Object.hasOwnProperty.call(message, "where"))
13040
- writer.uint32(/* id 4, wireType 2 =*/34).string(message.where);
13041
14183
  if (message.unique != null && Object.hasOwnProperty.call(message, "unique"))
13042
- writer.uint32(/* id 5, wireType 0 =*/40).bool(message.unique);
13043
- if (message.include != null && message.include.length)
13044
- for (let i = 0; i < message.include.length; ++i)
13045
- writer.uint32(/* id 6, wireType 2 =*/50).string(message.include[i]);
13046
- if (message.opclass != null && Object.hasOwnProperty.call(message, "opclass"))
13047
- writer.uint32(/* id 7, wireType 2 =*/58).string(message.opclass);
14184
+ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unique);
13048
14185
  return writer;
13049
14186
  };
13050
14187
 
13051
14188
  /**
13052
- * Encodes the specified Index message, length delimited. Does not implicitly {@link sqlanvil.PostgresOptions.Index.verify|verify} messages.
14189
+ * Encodes the specified Index message, length delimited. Does not implicitly {@link sqlanvil.MysqlOptions.Index.verify|verify} messages.
13053
14190
  * @function encodeDelimited
13054
- * @memberof sqlanvil.PostgresOptions.Index
14191
+ * @memberof sqlanvil.MysqlOptions.Index
13055
14192
  * @static
13056
- * @param {sqlanvil.PostgresOptions.IIndex} message Index message or plain object to encode
14193
+ * @param {sqlanvil.MysqlOptions.IIndex} message Index message or plain object to encode
13057
14194
  * @param {$protobuf.Writer} [writer] Writer to encode to
13058
14195
  * @returns {$protobuf.Writer} Writer
13059
14196
  */
@@ -13064,18 +14201,18 @@ const sqlanvil = $root.sqlanvil = (() => {
13064
14201
  /**
13065
14202
  * Decodes an Index message from the specified reader or buffer.
13066
14203
  * @function decode
13067
- * @memberof sqlanvil.PostgresOptions.Index
14204
+ * @memberof sqlanvil.MysqlOptions.Index
13068
14205
  * @static
13069
14206
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
13070
14207
  * @param {number} [length] Message length if known beforehand
13071
- * @returns {sqlanvil.PostgresOptions.Index} Index
14208
+ * @returns {sqlanvil.MysqlOptions.Index} Index
13072
14209
  * @throws {Error} If the payload is not a reader or valid buffer
13073
14210
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
13074
14211
  */
13075
14212
  Index.decode = function decode(reader, length, error) {
13076
14213
  if (!(reader instanceof $Reader))
13077
14214
  reader = $Reader.create(reader);
13078
- let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.PostgresOptions.Index();
14215
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.MysqlOptions.Index();
13079
14216
  while (reader.pos < end) {
13080
14217
  let tag = reader.uint32();
13081
14218
  if (tag === error)
@@ -13092,27 +14229,9 @@ const sqlanvil = $root.sqlanvil = (() => {
13092
14229
  break;
13093
14230
  }
13094
14231
  case 3: {
13095
- message.method = reader.int32();
13096
- break;
13097
- }
13098
- case 4: {
13099
- message.where = reader.string();
13100
- break;
13101
- }
13102
- case 5: {
13103
14232
  message.unique = reader.bool();
13104
14233
  break;
13105
14234
  }
13106
- case 6: {
13107
- if (!(message.include && message.include.length))
13108
- message.include = [];
13109
- message.include.push(reader.string());
13110
- break;
13111
- }
13112
- case 7: {
13113
- message.opclass = reader.string();
13114
- break;
13115
- }
13116
14235
  default:
13117
14236
  reader.skipType(tag & 7);
13118
14237
  break;
@@ -13124,10 +14243,10 @@ const sqlanvil = $root.sqlanvil = (() => {
13124
14243
  /**
13125
14244
  * Decodes an Index message from the specified reader or buffer, length delimited.
13126
14245
  * @function decodeDelimited
13127
- * @memberof sqlanvil.PostgresOptions.Index
14246
+ * @memberof sqlanvil.MysqlOptions.Index
13128
14247
  * @static
13129
14248
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
13130
- * @returns {sqlanvil.PostgresOptions.Index} Index
14249
+ * @returns {sqlanvil.MysqlOptions.Index} Index
13131
14250
  * @throws {Error} If the payload is not a reader or valid buffer
13132
14251
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
13133
14252
  */
@@ -13140,7 +14259,7 @@ const sqlanvil = $root.sqlanvil = (() => {
13140
14259
  /**
13141
14260
  * Verifies an Index message.
13142
14261
  * @function verify
13143
- * @memberof sqlanvil.PostgresOptions.Index
14262
+ * @memberof sqlanvil.MysqlOptions.Index
13144
14263
  * @static
13145
14264
  * @param {Object.<string,*>} message Plain object to verify
13146
14265
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
@@ -13158,107 +14277,44 @@ const sqlanvil = $root.sqlanvil = (() => {
13158
14277
  if (!$util.isString(message.columns[i]))
13159
14278
  return "columns: string[] expected";
13160
14279
  }
13161
- if (message.method != null && message.hasOwnProperty("method"))
13162
- switch (message.method) {
13163
- default:
13164
- return "method: enum value expected";
13165
- case 0:
13166
- case 1:
13167
- case 2:
13168
- case 3:
13169
- case 4:
13170
- break;
13171
- }
13172
- if (message.where != null && message.hasOwnProperty("where"))
13173
- if (!$util.isString(message.where))
13174
- return "where: string expected";
13175
14280
  if (message.unique != null && message.hasOwnProperty("unique"))
13176
14281
  if (typeof message.unique !== "boolean")
13177
14282
  return "unique: boolean expected";
13178
- if (message.include != null && message.hasOwnProperty("include")) {
13179
- if (!Array.isArray(message.include))
13180
- return "include: array expected";
13181
- for (let i = 0; i < message.include.length; ++i)
13182
- if (!$util.isString(message.include[i]))
13183
- return "include: string[] expected";
13184
- }
13185
- if (message.opclass != null && message.hasOwnProperty("opclass"))
13186
- if (!$util.isString(message.opclass))
13187
- return "opclass: string expected";
13188
14283
  return null;
13189
14284
  };
13190
14285
 
13191
14286
  /**
13192
14287
  * Creates an Index message from a plain object. Also converts values to their respective internal types.
13193
14288
  * @function fromObject
13194
- * @memberof sqlanvil.PostgresOptions.Index
14289
+ * @memberof sqlanvil.MysqlOptions.Index
13195
14290
  * @static
13196
14291
  * @param {Object.<string,*>} object Plain object
13197
- * @returns {sqlanvil.PostgresOptions.Index} Index
14292
+ * @returns {sqlanvil.MysqlOptions.Index} Index
13198
14293
  */
13199
14294
  Index.fromObject = function fromObject(object) {
13200
- if (object instanceof $root.sqlanvil.PostgresOptions.Index)
14295
+ if (object instanceof $root.sqlanvil.MysqlOptions.Index)
13201
14296
  return object;
13202
- let message = new $root.sqlanvil.PostgresOptions.Index();
14297
+ let message = new $root.sqlanvil.MysqlOptions.Index();
13203
14298
  if (object.name != null)
13204
14299
  message.name = String(object.name);
13205
14300
  if (object.columns) {
13206
14301
  if (!Array.isArray(object.columns))
13207
- throw TypeError(".sqlanvil.PostgresOptions.Index.columns: array expected");
14302
+ throw TypeError(".sqlanvil.MysqlOptions.Index.columns: array expected");
13208
14303
  message.columns = [];
13209
14304
  for (let i = 0; i < object.columns.length; ++i)
13210
14305
  message.columns[i] = String(object.columns[i]);
13211
14306
  }
13212
- switch (object.method) {
13213
- default:
13214
- if (typeof object.method === "number") {
13215
- message.method = object.method;
13216
- break;
13217
- }
13218
- break;
13219
- case "BTREE":
13220
- case 0:
13221
- message.method = 0;
13222
- break;
13223
- case "HASH":
13224
- case 1:
13225
- message.method = 1;
13226
- break;
13227
- case "GIN":
13228
- case 2:
13229
- message.method = 2;
13230
- break;
13231
- case "GIST":
13232
- case 3:
13233
- message.method = 3;
13234
- break;
13235
- case "BRIN":
13236
- case 4:
13237
- message.method = 4;
13238
- break;
13239
- }
13240
- if (object.where != null)
13241
- message.where = String(object.where);
13242
14307
  if (object.unique != null)
13243
14308
  message.unique = Boolean(object.unique);
13244
- if (object.include) {
13245
- if (!Array.isArray(object.include))
13246
- throw TypeError(".sqlanvil.PostgresOptions.Index.include: array expected");
13247
- message.include = [];
13248
- for (let i = 0; i < object.include.length; ++i)
13249
- message.include[i] = String(object.include[i]);
13250
- }
13251
- if (object.opclass != null)
13252
- message.opclass = String(object.opclass);
13253
14309
  return message;
13254
14310
  };
13255
14311
 
13256
14312
  /**
13257
14313
  * Creates a plain object from an Index message. Also converts values to other types if specified.
13258
14314
  * @function toObject
13259
- * @memberof sqlanvil.PostgresOptions.Index
14315
+ * @memberof sqlanvil.MysqlOptions.Index
13260
14316
  * @static
13261
- * @param {sqlanvil.PostgresOptions.Index} message Index
14317
+ * @param {sqlanvil.MysqlOptions.Index} message Index
13262
14318
  * @param {$protobuf.IConversionOptions} [options] Conversion options
13263
14319
  * @returns {Object.<string,*>} Plain object
13264
14320
  */
@@ -13266,16 +14322,11 @@ const sqlanvil = $root.sqlanvil = (() => {
13266
14322
  if (!options)
13267
14323
  options = {};
13268
14324
  let object = {};
13269
- if (options.arrays || options.defaults) {
14325
+ if (options.arrays || options.defaults)
13270
14326
  object.columns = [];
13271
- object.include = [];
13272
- }
13273
14327
  if (options.defaults) {
13274
14328
  object.name = "";
13275
- object.method = options.enums === String ? "BTREE" : 0;
13276
- object.where = "";
13277
14329
  object.unique = false;
13278
- object.opclass = "";
13279
14330
  }
13280
14331
  if (message.name != null && message.hasOwnProperty("name"))
13281
14332
  object.name = message.name;
@@ -13284,26 +14335,15 @@ const sqlanvil = $root.sqlanvil = (() => {
13284
14335
  for (let j = 0; j < message.columns.length; ++j)
13285
14336
  object.columns[j] = message.columns[j];
13286
14337
  }
13287
- if (message.method != null && message.hasOwnProperty("method"))
13288
- object.method = options.enums === String ? $root.sqlanvil.PostgresOptions.Index.Method[message.method] === undefined ? message.method : $root.sqlanvil.PostgresOptions.Index.Method[message.method] : message.method;
13289
- if (message.where != null && message.hasOwnProperty("where"))
13290
- object.where = message.where;
13291
14338
  if (message.unique != null && message.hasOwnProperty("unique"))
13292
14339
  object.unique = message.unique;
13293
- if (message.include && message.include.length) {
13294
- object.include = [];
13295
- for (let j = 0; j < message.include.length; ++j)
13296
- object.include[j] = message.include[j];
13297
- }
13298
- if (message.opclass != null && message.hasOwnProperty("opclass"))
13299
- object.opclass = message.opclass;
13300
14340
  return object;
13301
14341
  };
13302
14342
 
13303
14343
  /**
13304
14344
  * Converts this Index to JSON.
13305
14345
  * @function toJSON
13306
- * @memberof sqlanvil.PostgresOptions.Index
14346
+ * @memberof sqlanvil.MysqlOptions.Index
13307
14347
  * @instance
13308
14348
  * @returns {Object.<string,*>} JSON object
13309
14349
  */
@@ -13314,7 +14354,7 @@ const sqlanvil = $root.sqlanvil = (() => {
13314
14354
  /**
13315
14355
  * Gets the default type url for Index
13316
14356
  * @function getTypeUrl
13317
- * @memberof sqlanvil.PostgresOptions.Index
14357
+ * @memberof sqlanvil.MysqlOptions.Index
13318
14358
  * @static
13319
14359
  * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
13320
14360
  * @returns {string} The default type url
@@ -13323,33 +14363,13 @@ const sqlanvil = $root.sqlanvil = (() => {
13323
14363
  if (typeUrlPrefix === undefined) {
13324
14364
  typeUrlPrefix = "type.googleapis.com";
13325
14365
  }
13326
- return typeUrlPrefix + "/sqlanvil.PostgresOptions.Index";
14366
+ return typeUrlPrefix + "/sqlanvil.MysqlOptions.Index";
13327
14367
  };
13328
14368
 
13329
- /**
13330
- * Method enum.
13331
- * @name sqlanvil.PostgresOptions.Index.Method
13332
- * @enum {number}
13333
- * @property {number} BTREE=0 BTREE value
13334
- * @property {number} HASH=1 HASH value
13335
- * @property {number} GIN=2 GIN value
13336
- * @property {number} GIST=3 GIST value
13337
- * @property {number} BRIN=4 BRIN value
13338
- */
13339
- Index.Method = (function() {
13340
- const valuesById = {}, values = Object.create(valuesById);
13341
- values[valuesById[0] = "BTREE"] = 0;
13342
- values[valuesById[1] = "HASH"] = 1;
13343
- values[valuesById[2] = "GIN"] = 2;
13344
- values[valuesById[3] = "GIST"] = 3;
13345
- values[valuesById[4] = "BRIN"] = 4;
13346
- return values;
13347
- })();
13348
-
13349
14369
  return Index;
13350
14370
  })();
13351
14371
 
13352
- return PostgresOptions;
14372
+ return MysqlOptions;
13353
14373
  })();
13354
14374
 
13355
14375
  sqlanvil.SupabaseOptions = (function() {
@@ -19351,6 +20371,7 @@ const sqlanvil = $root.sqlanvil = (() => {
19351
20371
  * @property {sqlanvil.IBigQueryOptions|null} [bigquery] Table bigquery
19352
20372
  * @property {sqlanvil.IPostgresOptions|null} [postgres] Table postgres
19353
20373
  * @property {sqlanvil.ISupabaseOptions|null} [supabase] Table supabase
20374
+ * @property {sqlanvil.IMysqlOptions|null} [mysql] Table mysql
19354
20375
  * @property {string|null} [fileName] Table fileName
19355
20376
  */
19356
20377
 
@@ -19568,6 +20589,14 @@ const sqlanvil = $root.sqlanvil = (() => {
19568
20589
  */
19569
20590
  Table.prototype.supabase = null;
19570
20591
 
20592
+ /**
20593
+ * Table mysql.
20594
+ * @member {sqlanvil.IMysqlOptions|null|undefined} mysql
20595
+ * @memberof sqlanvil.Table
20596
+ * @instance
20597
+ */
20598
+ Table.prototype.mysql = null;
20599
+
19571
20600
  /**
19572
20601
  * Table fileName.
19573
20602
  * @member {string} fileName
@@ -19657,6 +20686,8 @@ const sqlanvil = $root.sqlanvil = (() => {
19657
20686
  $root.sqlanvil.PostgresOptions.encode(message.postgres, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim();
19658
20687
  if (message.supabase != null && Object.hasOwnProperty.call(message, "supabase"))
19659
20688
  $root.sqlanvil.SupabaseOptions.encode(message.supabase, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim();
20689
+ if (message.mysql != null && Object.hasOwnProperty.call(message, "mysql"))
20690
+ $root.sqlanvil.MysqlOptions.encode(message.mysql, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim();
19660
20691
  return writer;
19661
20692
  };
19662
20693
 
@@ -19803,6 +20834,10 @@ const sqlanvil = $root.sqlanvil = (() => {
19803
20834
  message.supabase = $root.sqlanvil.SupabaseOptions.decode(reader, reader.uint32());
19804
20835
  break;
19805
20836
  }
20837
+ case 41: {
20838
+ message.mysql = $root.sqlanvil.MysqlOptions.decode(reader, reader.uint32());
20839
+ break;
20840
+ }
19806
20841
  case 18: {
19807
20842
  message.fileName = reader.string();
19808
20843
  break;
@@ -19976,6 +21011,11 @@ const sqlanvil = $root.sqlanvil = (() => {
19976
21011
  if (error)
19977
21012
  return "supabase." + error;
19978
21013
  }
21014
+ if (message.mysql != null && message.hasOwnProperty("mysql")) {
21015
+ let error = $root.sqlanvil.MysqlOptions.verify(message.mysql);
21016
+ if (error)
21017
+ return "mysql." + error;
21018
+ }
19979
21019
  if (message.fileName != null && message.hasOwnProperty("fileName"))
19980
21020
  if (!$util.isString(message.fileName))
19981
21021
  return "fileName: string expected";
@@ -20160,6 +21200,11 @@ const sqlanvil = $root.sqlanvil = (() => {
20160
21200
  throw TypeError(".sqlanvil.Table.supabase: object expected");
20161
21201
  message.supabase = $root.sqlanvil.SupabaseOptions.fromObject(object.supabase);
20162
21202
  }
21203
+ if (object.mysql != null) {
21204
+ if (typeof object.mysql !== "object")
21205
+ throw TypeError(".sqlanvil.Table.mysql: object expected");
21206
+ message.mysql = $root.sqlanvil.MysqlOptions.fromObject(object.mysql);
21207
+ }
20163
21208
  if (object.fileName != null)
20164
21209
  message.fileName = String(object.fileName);
20165
21210
  return message;
@@ -20206,6 +21251,7 @@ const sqlanvil = $root.sqlanvil = (() => {
20206
21251
  object.jitCode = "";
20207
21252
  object.postgres = null;
20208
21253
  object.supabase = null;
21254
+ object.mysql = null;
20209
21255
  }
20210
21256
  if (message.type != null && message.hasOwnProperty("type"))
20211
21257
  object.type = message.type;
@@ -20278,6 +21324,8 @@ const sqlanvil = $root.sqlanvil = (() => {
20278
21324
  object.postgres = $root.sqlanvil.PostgresOptions.toObject(message.postgres, options);
20279
21325
  if (message.supabase != null && message.hasOwnProperty("supabase"))
20280
21326
  object.supabase = $root.sqlanvil.SupabaseOptions.toObject(message.supabase, options);
21327
+ if (message.mysql != null && message.hasOwnProperty("mysql"))
21328
+ object.mysql = $root.sqlanvil.MysqlOptions.toObject(message.mysql, options);
20281
21329
  return object;
20282
21330
  };
20283
21331