@sqlanvil/cli 1.17.1 → 1.19.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 +648 -391
  2. package/package.json +1 -1
  3. package/worker_bundle.js +120 -0
package/package.json CHANGED
@@ -64,7 +64,7 @@
64
64
  "bin": {
65
65
  "sqlanvil": "bundle.js"
66
66
  },
67
- "version": "1.17.1",
67
+ "version": "1.19.0",
68
68
  "name": "@sqlanvil/cli",
69
69
  "description": "sqlanvil command line interface.",
70
70
  "main": "bundle.js"
package/worker_bundle.js CHANGED
@@ -5826,6 +5826,7 @@ const sqlanvil = $root.sqlanvil = (() => {
5826
5826
  * @property {sqlanvil.ActionConfig.IMetadata|null} [metadata] ViewConfig metadata
5827
5827
  * @property {string|null} [reservation] ViewConfig reservation
5828
5828
  * @property {sqlanvil.IPostgresOptions|null} [postgres] ViewConfig postgres
5829
+ * @property {sqlanvil.IMysqlOptions|null} [mysql] ViewConfig mysql
5829
5830
  */
5830
5831
 
5831
5832
  /**
@@ -6027,6 +6028,14 @@ const sqlanvil = $root.sqlanvil = (() => {
6027
6028
  */
6028
6029
  ViewConfig.prototype.postgres = null;
6029
6030
 
6031
+ /**
6032
+ * ViewConfig mysql.
6033
+ * @member {sqlanvil.IMysqlOptions|null|undefined} mysql
6034
+ * @memberof sqlanvil.ActionConfig.ViewConfig
6035
+ * @instance
6036
+ */
6037
+ ViewConfig.prototype.mysql = null;
6038
+
6030
6039
  /**
6031
6040
  * Creates a new ViewConfig instance using the specified properties.
6032
6041
  * @function create
@@ -6107,6 +6116,8 @@ const sqlanvil = $root.sqlanvil = (() => {
6107
6116
  writer.uint32(/* id 21, wireType 2 =*/170).string(message.reservation);
6108
6117
  if (message.postgres != null && Object.hasOwnProperty.call(message, "postgres"))
6109
6118
  $root.sqlanvil.PostgresOptions.encode(message.postgres, writer.uint32(/* id 22, wireType 2 =*/178).fork(), q + 1).ldelim();
6119
+ if (message.mysql != null && Object.hasOwnProperty.call(message, "mysql"))
6120
+ $root.sqlanvil.MysqlOptions.encode(message.mysql, writer.uint32(/* id 23, wireType 2 =*/186).fork(), q + 1).ldelim();
6110
6121
  return writer;
6111
6122
  };
6112
6123
 
@@ -6289,6 +6300,10 @@ const sqlanvil = $root.sqlanvil = (() => {
6289
6300
  message.postgres = $root.sqlanvil.PostgresOptions.decode(reader, reader.uint32(), undefined, long + 1);
6290
6301
  break;
6291
6302
  }
6303
+ case 23: {
6304
+ message.mysql = $root.sqlanvil.MysqlOptions.decode(reader, reader.uint32(), undefined, long + 1);
6305
+ break;
6306
+ }
6292
6307
  default:
6293
6308
  reader.skipType(tag & 7, long);
6294
6309
  break;
@@ -6438,6 +6453,11 @@ const sqlanvil = $root.sqlanvil = (() => {
6438
6453
  if (error)
6439
6454
  return "postgres." + error;
6440
6455
  }
6456
+ if (message.mysql != null && Object.hasOwnProperty.call(message, "mysql")) {
6457
+ let error = $root.sqlanvil.MysqlOptions.verify(message.mysql, long + 1);
6458
+ if (error)
6459
+ return "mysql." + error;
6460
+ }
6441
6461
  return null;
6442
6462
  };
6443
6463
 
@@ -6564,6 +6584,11 @@ const sqlanvil = $root.sqlanvil = (() => {
6564
6584
  throw TypeError(".sqlanvil.ActionConfig.ViewConfig.postgres: object expected");
6565
6585
  message.postgres = $root.sqlanvil.PostgresOptions.fromObject(object.postgres, long + 1);
6566
6586
  }
6587
+ if (object.mysql != null) {
6588
+ if (!$util.isObject(object.mysql))
6589
+ throw TypeError(".sqlanvil.ActionConfig.ViewConfig.mysql: object expected");
6590
+ message.mysql = $root.sqlanvil.MysqlOptions.fromObject(object.mysql, long + 1);
6591
+ }
6567
6592
  return message;
6568
6593
  };
6569
6594
 
@@ -6611,6 +6636,7 @@ const sqlanvil = $root.sqlanvil = (() => {
6611
6636
  object.metadata = null;
6612
6637
  object.reservation = "";
6613
6638
  object.postgres = null;
6639
+ object.mysql = null;
6614
6640
  }
6615
6641
  if (message.name != null && Object.hasOwnProperty.call(message, "name"))
6616
6642
  object.name = message.name;
@@ -6687,6 +6713,8 @@ const sqlanvil = $root.sqlanvil = (() => {
6687
6713
  object.reservation = message.reservation;
6688
6714
  if (message.postgres != null && Object.hasOwnProperty.call(message, "postgres"))
6689
6715
  object.postgres = $root.sqlanvil.PostgresOptions.toObject(message.postgres, options, q + 1);
6716
+ if (message.mysql != null && Object.hasOwnProperty.call(message, "mysql"))
6717
+ object.mysql = $root.sqlanvil.MysqlOptions.toObject(message.mysql, options, q + 1);
6690
6718
  return object;
6691
6719
  };
6692
6720
 
@@ -16428,6 +16456,7 @@ const sqlanvil = $root.sqlanvil = (() => {
16428
16456
  * @property {string|null} [engine] MysqlOptions engine
16429
16457
  * @property {string|null} [charset] MysqlOptions charset
16430
16458
  * @property {string|null} [collation] MysqlOptions collation
16459
+ * @property {string|null} [rowFormat] MysqlOptions rowFormat
16431
16460
  * @property {Array.<sqlanvil.MysqlOptions.IIndex>|null} [indexes] MysqlOptions indexes
16432
16461
  * @property {sqlanvil.MysqlOptions.IPartition|null} [partition] MysqlOptions partition
16433
16462
  */
@@ -16472,6 +16501,14 @@ const sqlanvil = $root.sqlanvil = (() => {
16472
16501
  */
16473
16502
  MysqlOptions.prototype.collation = "";
16474
16503
 
16504
+ /**
16505
+ * MysqlOptions rowFormat.
16506
+ * @member {string} rowFormat
16507
+ * @memberof sqlanvil.MysqlOptions
16508
+ * @instance
16509
+ */
16510
+ MysqlOptions.prototype.rowFormat = "";
16511
+
16475
16512
  /**
16476
16513
  * MysqlOptions indexes.
16477
16514
  * @member {Array.<sqlanvil.MysqlOptions.IIndex>} indexes
@@ -16527,6 +16564,8 @@ const sqlanvil = $root.sqlanvil = (() => {
16527
16564
  $root.sqlanvil.MysqlOptions.Index.encode(message.indexes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim();
16528
16565
  if (message.partition != null && Object.hasOwnProperty.call(message, "partition"))
16529
16566
  $root.sqlanvil.MysqlOptions.Partition.encode(message.partition, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim();
16567
+ if (message.rowFormat != null && Object.hasOwnProperty.call(message, "rowFormat"))
16568
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.rowFormat);
16530
16569
  return writer;
16531
16570
  };
16532
16571
 
@@ -16579,6 +16618,10 @@ const sqlanvil = $root.sqlanvil = (() => {
16579
16618
  message.collation = reader.string();
16580
16619
  break;
16581
16620
  }
16621
+ case 6: {
16622
+ message.rowFormat = reader.string();
16623
+ break;
16624
+ }
16582
16625
  case 4: {
16583
16626
  if (!(message.indexes && message.indexes.length))
16584
16627
  message.indexes = [];
@@ -16637,6 +16680,9 @@ const sqlanvil = $root.sqlanvil = (() => {
16637
16680
  if (message.collation != null && Object.hasOwnProperty.call(message, "collation"))
16638
16681
  if (!$util.isString(message.collation))
16639
16682
  return "collation: string expected";
16683
+ if (message.rowFormat != null && Object.hasOwnProperty.call(message, "rowFormat"))
16684
+ if (!$util.isString(message.rowFormat))
16685
+ return "rowFormat: string expected";
16640
16686
  if (message.indexes != null && Object.hasOwnProperty.call(message, "indexes")) {
16641
16687
  if (!Array.isArray(message.indexes))
16642
16688
  return "indexes: array expected";
@@ -16678,6 +16724,8 @@ const sqlanvil = $root.sqlanvil = (() => {
16678
16724
  message.charset = String(object.charset);
16679
16725
  if (object.collation != null)
16680
16726
  message.collation = String(object.collation);
16727
+ if (object.rowFormat != null)
16728
+ message.rowFormat = String(object.rowFormat);
16681
16729
  if (object.indexes) {
16682
16730
  if (!Array.isArray(object.indexes))
16683
16731
  throw TypeError(".sqlanvil.MysqlOptions.indexes: array expected");
@@ -16720,6 +16768,7 @@ const sqlanvil = $root.sqlanvil = (() => {
16720
16768
  object.charset = "";
16721
16769
  object.collation = "";
16722
16770
  object.partition = null;
16771
+ object.rowFormat = "";
16723
16772
  }
16724
16773
  if (message.engine != null && Object.hasOwnProperty.call(message, "engine"))
16725
16774
  object.engine = message.engine;
@@ -16734,6 +16783,8 @@ const sqlanvil = $root.sqlanvil = (() => {
16734
16783
  }
16735
16784
  if (message.partition != null && Object.hasOwnProperty.call(message, "partition"))
16736
16785
  object.partition = $root.sqlanvil.MysqlOptions.Partition.toObject(message.partition, options, q + 1);
16786
+ if (message.rowFormat != null && Object.hasOwnProperty.call(message, "rowFormat"))
16787
+ object.rowFormat = message.rowFormat;
16737
16788
  return object;
16738
16789
  };
16739
16790
 
@@ -16772,6 +16823,7 @@ const sqlanvil = $root.sqlanvil = (() => {
16772
16823
  * @property {string|null} [name] Index name
16773
16824
  * @property {Array.<string>|null} [columns] Index columns
16774
16825
  * @property {boolean|null} [unique] Index unique
16826
+ * @property {string|null} [type] Index type
16775
16827
  */
16776
16828
 
16777
16829
  /**
@@ -16814,6 +16866,14 @@ const sqlanvil = $root.sqlanvil = (() => {
16814
16866
  */
16815
16867
  Index.prototype.unique = false;
16816
16868
 
16869
+ /**
16870
+ * Index type.
16871
+ * @member {string} type
16872
+ * @memberof sqlanvil.MysqlOptions.Index
16873
+ * @instance
16874
+ */
16875
+ Index.prototype.type = "";
16876
+
16817
16877
  /**
16818
16878
  * Creates a new Index instance using the specified properties.
16819
16879
  * @function create
@@ -16849,6 +16909,8 @@ const sqlanvil = $root.sqlanvil = (() => {
16849
16909
  writer.uint32(/* id 2, wireType 2 =*/18).string(message.columns[i]);
16850
16910
  if (message.unique != null && Object.hasOwnProperty.call(message, "unique"))
16851
16911
  writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unique);
16912
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
16913
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.type);
16852
16914
  return writer;
16853
16915
  };
16854
16916
 
@@ -16903,6 +16965,10 @@ const sqlanvil = $root.sqlanvil = (() => {
16903
16965
  message.unique = reader.bool();
16904
16966
  break;
16905
16967
  }
16968
+ case 4: {
16969
+ message.type = reader.string();
16970
+ break;
16971
+ }
16906
16972
  default:
16907
16973
  reader.skipType(tag & 7, long);
16908
16974
  break;
@@ -16955,6 +17021,9 @@ const sqlanvil = $root.sqlanvil = (() => {
16955
17021
  if (message.unique != null && Object.hasOwnProperty.call(message, "unique"))
16956
17022
  if (typeof message.unique !== "boolean")
16957
17023
  return "unique: boolean expected";
17024
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
17025
+ if (!$util.isString(message.type))
17026
+ return "type: string expected";
16958
17027
  return null;
16959
17028
  };
16960
17029
 
@@ -16987,6 +17056,8 @@ const sqlanvil = $root.sqlanvil = (() => {
16987
17056
  }
16988
17057
  if (object.unique != null)
16989
17058
  message.unique = Boolean(object.unique);
17059
+ if (object.type != null)
17060
+ message.type = String(object.type);
16990
17061
  return message;
16991
17062
  };
16992
17063
 
@@ -17012,6 +17083,7 @@ const sqlanvil = $root.sqlanvil = (() => {
17012
17083
  if (options.defaults) {
17013
17084
  object.name = "";
17014
17085
  object.unique = false;
17086
+ object.type = "";
17015
17087
  }
17016
17088
  if (message.name != null && Object.hasOwnProperty.call(message, "name"))
17017
17089
  object.name = message.name;
@@ -17022,6 +17094,8 @@ const sqlanvil = $root.sqlanvil = (() => {
17022
17094
  }
17023
17095
  if (message.unique != null && Object.hasOwnProperty.call(message, "unique"))
17024
17096
  object.unique = message.unique;
17097
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
17098
+ object.type = message.type;
17025
17099
  return object;
17026
17100
  };
17027
17101
 
@@ -26982,6 +27056,7 @@ const sqlanvil = $root.sqlanvil = (() => {
26982
27056
  * @property {string|null} [billingProject] Extract billingProject
26983
27057
  * @property {Object.<string,string>|null} [columnTypes] Extract columnTypes
26984
27058
  * @property {string|null} [fileName] Extract fileName
27059
+ * @property {string|null} [database] Extract database
26985
27060
  */
26986
27061
 
26987
27062
  /**
@@ -27122,6 +27197,14 @@ const sqlanvil = $root.sqlanvil = (() => {
27122
27197
  */
27123
27198
  Extract.prototype.fileName = "";
27124
27199
 
27200
+ /**
27201
+ * Extract database.
27202
+ * @member {string} database
27203
+ * @memberof sqlanvil.Extract
27204
+ * @instance
27205
+ */
27206
+ Extract.prototype.database = "";
27207
+
27125
27208
  /**
27126
27209
  * Creates a new Extract instance using the specified properties.
27127
27210
  * @function create
@@ -27183,6 +27266,8 @@ const sqlanvil = $root.sqlanvil = (() => {
27183
27266
  writer.uint32(/* id 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.columnTypes[keys[i]]).ldelim();
27184
27267
  if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName"))
27185
27268
  writer.uint32(/* id 15, wireType 2 =*/122).string(message.fileName);
27269
+ if (message.database != null && Object.hasOwnProperty.call(message, "database"))
27270
+ writer.uint32(/* id 16, wireType 2 =*/130).string(message.database);
27186
27271
  return writer;
27187
27272
  };
27188
27273
 
@@ -27308,6 +27393,10 @@ const sqlanvil = $root.sqlanvil = (() => {
27308
27393
  message.fileName = reader.string();
27309
27394
  break;
27310
27395
  }
27396
+ case 16: {
27397
+ message.database = reader.string();
27398
+ break;
27399
+ }
27311
27400
  default:
27312
27401
  reader.skipType(tag & 7, long);
27313
27402
  break;
@@ -27419,6 +27508,9 @@ const sqlanvil = $root.sqlanvil = (() => {
27419
27508
  if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName"))
27420
27509
  if (!$util.isString(message.fileName))
27421
27510
  return "fileName: string expected";
27511
+ if (message.database != null && Object.hasOwnProperty.call(message, "database"))
27512
+ if (!$util.isString(message.database))
27513
+ return "database: string expected";
27422
27514
  return null;
27423
27515
  };
27424
27516
 
@@ -27518,6 +27610,8 @@ const sqlanvil = $root.sqlanvil = (() => {
27518
27610
  }
27519
27611
  if (object.fileName != null)
27520
27612
  message.fileName = String(object.fileName);
27613
+ if (object.database != null)
27614
+ message.database = String(object.database);
27521
27615
  return message;
27522
27616
  };
27523
27617
 
@@ -27557,6 +27651,7 @@ const sqlanvil = $root.sqlanvil = (() => {
27557
27651
  object.sourceName = "";
27558
27652
  object.billingProject = "";
27559
27653
  object.fileName = "";
27654
+ object.database = "";
27560
27655
  }
27561
27656
  if (message.target != null && Object.hasOwnProperty.call(message, "target"))
27562
27657
  object.target = $root.sqlanvil.Target.toObject(message.target, options, q + 1);
@@ -27601,6 +27696,8 @@ const sqlanvil = $root.sqlanvil = (() => {
27601
27696
  }
27602
27697
  if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName"))
27603
27698
  object.fileName = message.fileName;
27699
+ if (message.database != null && Object.hasOwnProperty.call(message, "database"))
27700
+ object.database = message.database;
27604
27701
  return object;
27605
27702
  };
27606
27703
 
@@ -37782,6 +37879,7 @@ const sqlanvil = $root.sqlanvil = (() => {
37782
37879
  * @property {string|null} [sourceName] ExtractSpec sourceName
37783
37880
  * @property {string|null} [billingProject] ExtractSpec billingProject
37784
37881
  * @property {Object.<string,string>|null} [columnTypes] ExtractSpec columnTypes
37882
+ * @property {string|null} [database] ExtractSpec database
37785
37883
  */
37786
37884
 
37787
37885
  /**
@@ -37856,6 +37954,14 @@ const sqlanvil = $root.sqlanvil = (() => {
37856
37954
  */
37857
37955
  ExtractSpec.prototype.columnTypes = $util.emptyObject;
37858
37956
 
37957
+ /**
37958
+ * ExtractSpec database.
37959
+ * @member {string} database
37960
+ * @memberof sqlanvil.ExtractSpec
37961
+ * @instance
37962
+ */
37963
+ ExtractSpec.prototype.database = "";
37964
+
37859
37965
  /**
37860
37966
  * Creates a new ExtractSpec instance using the specified properties.
37861
37967
  * @function create
@@ -37899,6 +38005,8 @@ const sqlanvil = $root.sqlanvil = (() => {
37899
38005
  if (message.columnTypes != null && Object.hasOwnProperty.call(message, "columnTypes"))
37900
38006
  for (let keys = Object.keys(message.columnTypes), i = 0; i < keys.length; ++i)
37901
38007
  writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.columnTypes[keys[i]]).ldelim();
38008
+ if (message.database != null && Object.hasOwnProperty.call(message, "database"))
38009
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.database);
37902
38010
  return writer;
37903
38011
  };
37904
38012
 
@@ -37988,6 +38096,10 @@ const sqlanvil = $root.sqlanvil = (() => {
37988
38096
  message.columnTypes[key] = value;
37989
38097
  break;
37990
38098
  }
38099
+ case 8: {
38100
+ message.database = reader.string();
38101
+ break;
38102
+ }
37991
38103
  default:
37992
38104
  reader.skipType(tag & 7, long);
37993
38105
  break;
@@ -38053,6 +38165,9 @@ const sqlanvil = $root.sqlanvil = (() => {
38053
38165
  if (!$util.isString(message.columnTypes[key[i]]))
38054
38166
  return "columnTypes: string{k:string} expected";
38055
38167
  }
38168
+ if (message.database != null && Object.hasOwnProperty.call(message, "database"))
38169
+ if (!$util.isString(message.database))
38170
+ return "database: string expected";
38056
38171
  return null;
38057
38172
  };
38058
38173
 
@@ -38096,6 +38211,8 @@ const sqlanvil = $root.sqlanvil = (() => {
38096
38211
  message.columnTypes[keys[i]] = String(object.columnTypes[keys[i]]);
38097
38212
  }
38098
38213
  }
38214
+ if (object.database != null)
38215
+ message.database = String(object.database);
38099
38216
  return message;
38100
38217
  };
38101
38218
 
@@ -38125,6 +38242,7 @@ const sqlanvil = $root.sqlanvil = (() => {
38125
38242
  object.dataset = "";
38126
38243
  object.sourceName = "";
38127
38244
  object.billingProject = "";
38245
+ object.database = "";
38128
38246
  }
38129
38247
  if (message.connectionName != null && Object.hasOwnProperty.call(message, "connectionName"))
38130
38248
  object.connectionName = message.connectionName;
@@ -38147,6 +38265,8 @@ const sqlanvil = $root.sqlanvil = (() => {
38147
38265
  object.columnTypes[keys2[j]] = message.columnTypes[keys2[j]];
38148
38266
  }
38149
38267
  }
38268
+ if (message.database != null && Object.hasOwnProperty.call(message, "database"))
38269
+ object.database = message.database;
38150
38270
  return object;
38151
38271
  };
38152
38272