@sqlanvil/cli 1.18.0 → 1.20.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 (4) hide show
  1. package/README.md +7 -5
  2. package/bundle.js +2443 -311
  3. package/package.json +1 -1
  4. package/worker_bundle.js +1823 -33
package/worker_bundle.js CHANGED
@@ -2226,6 +2226,7 @@ const sqlanvil = $root.sqlanvil = (() => {
2226
2226
  * @property {sqlanvil.ActionConfig.IVectorIndexConfig|null} [vectorIndex] ActionConfig vectorIndex
2227
2227
  * @property {sqlanvil.ActionConfig.IExportConfig|null} ["export"] ActionConfig export
2228
2228
  * @property {sqlanvil.ActionConfig.IImportConfig|null} ["import"] ActionConfig import
2229
+ * @property {sqlanvil.ActionConfig.IScriptConfig|null} [script] ActionConfig script
2229
2230
  */
2230
2231
 
2231
2232
  /**
@@ -2355,17 +2356,25 @@ const sqlanvil = $root.sqlanvil = (() => {
2355
2356
  */
2356
2357
  ActionConfig.prototype["import"] = null;
2357
2358
 
2359
+ /**
2360
+ * ActionConfig script.
2361
+ * @member {sqlanvil.ActionConfig.IScriptConfig|null|undefined} script
2362
+ * @memberof sqlanvil.ActionConfig
2363
+ * @instance
2364
+ */
2365
+ ActionConfig.prototype.script = null;
2366
+
2358
2367
  // OneOf field names bound to virtual getters and setters
2359
2368
  let $oneOfFields;
2360
2369
 
2361
2370
  /**
2362
2371
  * ActionConfig action.
2363
- * @member {"table"|"view"|"incrementalTable"|"assertion"|"operation"|"declaration"|"notebook"|"dataPreparation"|"rlsPolicy"|"realtimePublication"|"foreignWrapper"|"vectorIndex"|"export"|"import"|undefined} action
2372
+ * @member {"table"|"view"|"incrementalTable"|"assertion"|"operation"|"declaration"|"notebook"|"dataPreparation"|"rlsPolicy"|"realtimePublication"|"foreignWrapper"|"vectorIndex"|"export"|"import"|"script"|undefined} action
2364
2373
  * @memberof sqlanvil.ActionConfig
2365
2374
  * @instance
2366
2375
  */
2367
2376
  Object.defineProperty(ActionConfig.prototype, "action", {
2368
- get: $util.oneOfGetter($oneOfFields = ["table", "view", "incrementalTable", "assertion", "operation", "declaration", "notebook", "dataPreparation", "rlsPolicy", "realtimePublication", "foreignWrapper", "vectorIndex", "export", "import"]),
2377
+ get: $util.oneOfGetter($oneOfFields = ["table", "view", "incrementalTable", "assertion", "operation", "declaration", "notebook", "dataPreparation", "rlsPolicy", "realtimePublication", "foreignWrapper", "vectorIndex", "export", "import", "script"]),
2369
2378
  set: $util.oneOfSetter($oneOfFields)
2370
2379
  });
2371
2380
 
@@ -2425,6 +2434,8 @@ const sqlanvil = $root.sqlanvil = (() => {
2425
2434
  $root.sqlanvil.ActionConfig.ExportConfig.encode(message["export"], writer.uint32(/* id 13, wireType 2 =*/106).fork(), q + 1).ldelim();
2426
2435
  if (message["import"] != null && Object.hasOwnProperty.call(message, "import"))
2427
2436
  $root.sqlanvil.ActionConfig.ImportConfig.encode(message["import"], writer.uint32(/* id 14, wireType 2 =*/114).fork(), q + 1).ldelim();
2437
+ if (message.script != null && Object.hasOwnProperty.call(message, "script"))
2438
+ $root.sqlanvil.ActionConfig.ScriptConfig.encode(message.script, writer.uint32(/* id 15, wireType 2 =*/122).fork(), q + 1).ldelim();
2428
2439
  return writer;
2429
2440
  };
2430
2441
 
@@ -2521,6 +2532,10 @@ const sqlanvil = $root.sqlanvil = (() => {
2521
2532
  message["import"] = $root.sqlanvil.ActionConfig.ImportConfig.decode(reader, reader.uint32(), undefined, long + 1);
2522
2533
  break;
2523
2534
  }
2535
+ case 15: {
2536
+ message.script = $root.sqlanvil.ActionConfig.ScriptConfig.decode(reader, reader.uint32(), undefined, long + 1);
2537
+ break;
2538
+ }
2524
2539
  default:
2525
2540
  reader.skipType(tag & 7, long);
2526
2541
  break;
@@ -2699,6 +2714,16 @@ const sqlanvil = $root.sqlanvil = (() => {
2699
2714
  return "import." + error;
2700
2715
  }
2701
2716
  }
2717
+ if (message.script != null && Object.hasOwnProperty.call(message, "script")) {
2718
+ if (properties.action === 1)
2719
+ return "action: multiple values";
2720
+ properties.action = 1;
2721
+ {
2722
+ let error = $root.sqlanvil.ActionConfig.ScriptConfig.verify(message.script, long + 1);
2723
+ if (error)
2724
+ return "script." + error;
2725
+ }
2726
+ }
2702
2727
  return null;
2703
2728
  };
2704
2729
 
@@ -2790,6 +2815,11 @@ const sqlanvil = $root.sqlanvil = (() => {
2790
2815
  throw TypeError(".sqlanvil.ActionConfig.import: object expected");
2791
2816
  message["import"] = $root.sqlanvil.ActionConfig.ImportConfig.fromObject(object["import"], long + 1);
2792
2817
  }
2818
+ if (object.script != null) {
2819
+ if (!$util.isObject(object.script))
2820
+ throw TypeError(".sqlanvil.ActionConfig.script: object expected");
2821
+ message.script = $root.sqlanvil.ActionConfig.ScriptConfig.fromObject(object.script, long + 1);
2822
+ }
2793
2823
  return message;
2794
2824
  };
2795
2825
 
@@ -2880,6 +2910,11 @@ const sqlanvil = $root.sqlanvil = (() => {
2880
2910
  if (options.oneofs)
2881
2911
  object.action = "import";
2882
2912
  }
2913
+ if (message.script != null && Object.hasOwnProperty.call(message, "script")) {
2914
+ object.script = $root.sqlanvil.ActionConfig.ScriptConfig.toObject(message.script, options, q + 1);
2915
+ if (options.oneofs)
2916
+ object.action = "script";
2917
+ }
2883
2918
  return object;
2884
2919
  };
2885
2920
 
@@ -5826,6 +5861,7 @@ const sqlanvil = $root.sqlanvil = (() => {
5826
5861
  * @property {sqlanvil.ActionConfig.IMetadata|null} [metadata] ViewConfig metadata
5827
5862
  * @property {string|null} [reservation] ViewConfig reservation
5828
5863
  * @property {sqlanvil.IPostgresOptions|null} [postgres] ViewConfig postgres
5864
+ * @property {sqlanvil.IMysqlOptions|null} [mysql] ViewConfig mysql
5829
5865
  */
5830
5866
 
5831
5867
  /**
@@ -6027,6 +6063,14 @@ const sqlanvil = $root.sqlanvil = (() => {
6027
6063
  */
6028
6064
  ViewConfig.prototype.postgres = null;
6029
6065
 
6066
+ /**
6067
+ * ViewConfig mysql.
6068
+ * @member {sqlanvil.IMysqlOptions|null|undefined} mysql
6069
+ * @memberof sqlanvil.ActionConfig.ViewConfig
6070
+ * @instance
6071
+ */
6072
+ ViewConfig.prototype.mysql = null;
6073
+
6030
6074
  /**
6031
6075
  * Creates a new ViewConfig instance using the specified properties.
6032
6076
  * @function create
@@ -6107,6 +6151,8 @@ const sqlanvil = $root.sqlanvil = (() => {
6107
6151
  writer.uint32(/* id 21, wireType 2 =*/170).string(message.reservation);
6108
6152
  if (message.postgres != null && Object.hasOwnProperty.call(message, "postgres"))
6109
6153
  $root.sqlanvil.PostgresOptions.encode(message.postgres, writer.uint32(/* id 22, wireType 2 =*/178).fork(), q + 1).ldelim();
6154
+ if (message.mysql != null && Object.hasOwnProperty.call(message, "mysql"))
6155
+ $root.sqlanvil.MysqlOptions.encode(message.mysql, writer.uint32(/* id 23, wireType 2 =*/186).fork(), q + 1).ldelim();
6110
6156
  return writer;
6111
6157
  };
6112
6158
 
@@ -6289,6 +6335,10 @@ const sqlanvil = $root.sqlanvil = (() => {
6289
6335
  message.postgres = $root.sqlanvil.PostgresOptions.decode(reader, reader.uint32(), undefined, long + 1);
6290
6336
  break;
6291
6337
  }
6338
+ case 23: {
6339
+ message.mysql = $root.sqlanvil.MysqlOptions.decode(reader, reader.uint32(), undefined, long + 1);
6340
+ break;
6341
+ }
6292
6342
  default:
6293
6343
  reader.skipType(tag & 7, long);
6294
6344
  break;
@@ -6438,6 +6488,11 @@ const sqlanvil = $root.sqlanvil = (() => {
6438
6488
  if (error)
6439
6489
  return "postgres." + error;
6440
6490
  }
6491
+ if (message.mysql != null && Object.hasOwnProperty.call(message, "mysql")) {
6492
+ let error = $root.sqlanvil.MysqlOptions.verify(message.mysql, long + 1);
6493
+ if (error)
6494
+ return "mysql." + error;
6495
+ }
6441
6496
  return null;
6442
6497
  };
6443
6498
 
@@ -6564,6 +6619,11 @@ const sqlanvil = $root.sqlanvil = (() => {
6564
6619
  throw TypeError(".sqlanvil.ActionConfig.ViewConfig.postgres: object expected");
6565
6620
  message.postgres = $root.sqlanvil.PostgresOptions.fromObject(object.postgres, long + 1);
6566
6621
  }
6622
+ if (object.mysql != null) {
6623
+ if (!$util.isObject(object.mysql))
6624
+ throw TypeError(".sqlanvil.ActionConfig.ViewConfig.mysql: object expected");
6625
+ message.mysql = $root.sqlanvil.MysqlOptions.fromObject(object.mysql, long + 1);
6626
+ }
6567
6627
  return message;
6568
6628
  };
6569
6629
 
@@ -6611,6 +6671,7 @@ const sqlanvil = $root.sqlanvil = (() => {
6611
6671
  object.metadata = null;
6612
6672
  object.reservation = "";
6613
6673
  object.postgres = null;
6674
+ object.mysql = null;
6614
6675
  }
6615
6676
  if (message.name != null && Object.hasOwnProperty.call(message, "name"))
6616
6677
  object.name = message.name;
@@ -6687,6 +6748,8 @@ const sqlanvil = $root.sqlanvil = (() => {
6687
6748
  object.reservation = message.reservation;
6688
6749
  if (message.postgres != null && Object.hasOwnProperty.call(message, "postgres"))
6689
6750
  object.postgres = $root.sqlanvil.PostgresOptions.toObject(message.postgres, options, q + 1);
6751
+ if (message.mysql != null && Object.hasOwnProperty.call(message, "mysql"))
6752
+ object.mysql = $root.sqlanvil.MysqlOptions.toObject(message.mysql, options, q + 1);
6690
6753
  return object;
6691
6754
  };
6692
6755
 
@@ -12381,6 +12444,588 @@ const sqlanvil = $root.sqlanvil = (() => {
12381
12444
  return DataPreparationConfig;
12382
12445
  })();
12383
12446
 
12447
+ ActionConfig.ScriptConfig = (function() {
12448
+
12449
+ /**
12450
+ * Properties of a ScriptConfig.
12451
+ * @memberof sqlanvil.ActionConfig
12452
+ * @interface IScriptConfig
12453
+ * @property {string|null} [name] ScriptConfig name
12454
+ * @property {string|null} [dataset] ScriptConfig dataset
12455
+ * @property {string|null} [project] ScriptConfig project
12456
+ * @property {Array.<sqlanvil.ActionConfig.ITarget>|null} [dependencyTargets] ScriptConfig dependencyTargets
12457
+ * @property {string|null} [filename] ScriptConfig filename
12458
+ * @property {Array.<string>|null} [tags] ScriptConfig tags
12459
+ * @property {boolean|null} [disabled] ScriptConfig disabled
12460
+ * @property {string|null} [description] ScriptConfig description
12461
+ * @property {string|null} [language] ScriptConfig language
12462
+ * @property {Array.<string>|null} [args] ScriptConfig args
12463
+ * @property {string|null} [depsFile] ScriptConfig depsFile
12464
+ * @property {string|null} [runtimeVersion] ScriptConfig runtimeVersion
12465
+ * @property {string|null} [envRoot] ScriptConfig envRoot
12466
+ * @property {number|null} [timeoutMillis] ScriptConfig timeoutMillis
12467
+ */
12468
+
12469
+ /**
12470
+ * Constructs a new ScriptConfig.
12471
+ * @memberof sqlanvil.ActionConfig
12472
+ * @classdesc Represents a ScriptConfig.
12473
+ * @implements IScriptConfig
12474
+ * @constructor
12475
+ * @param {sqlanvil.ActionConfig.IScriptConfig=} [properties] Properties to set
12476
+ */
12477
+ function ScriptConfig(properties) {
12478
+ this.dependencyTargets = [];
12479
+ this.tags = [];
12480
+ this.args = [];
12481
+ if (properties)
12482
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
12483
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
12484
+ this[keys[i]] = properties[keys[i]];
12485
+ }
12486
+
12487
+ /**
12488
+ * ScriptConfig name.
12489
+ * @member {string} name
12490
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12491
+ * @instance
12492
+ */
12493
+ ScriptConfig.prototype.name = "";
12494
+
12495
+ /**
12496
+ * ScriptConfig dataset.
12497
+ * @member {string} dataset
12498
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12499
+ * @instance
12500
+ */
12501
+ ScriptConfig.prototype.dataset = "";
12502
+
12503
+ /**
12504
+ * ScriptConfig project.
12505
+ * @member {string} project
12506
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12507
+ * @instance
12508
+ */
12509
+ ScriptConfig.prototype.project = "";
12510
+
12511
+ /**
12512
+ * ScriptConfig dependencyTargets.
12513
+ * @member {Array.<sqlanvil.ActionConfig.ITarget>} dependencyTargets
12514
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12515
+ * @instance
12516
+ */
12517
+ ScriptConfig.prototype.dependencyTargets = $util.emptyArray;
12518
+
12519
+ /**
12520
+ * ScriptConfig filename.
12521
+ * @member {string} filename
12522
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12523
+ * @instance
12524
+ */
12525
+ ScriptConfig.prototype.filename = "";
12526
+
12527
+ /**
12528
+ * ScriptConfig tags.
12529
+ * @member {Array.<string>} tags
12530
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12531
+ * @instance
12532
+ */
12533
+ ScriptConfig.prototype.tags = $util.emptyArray;
12534
+
12535
+ /**
12536
+ * ScriptConfig disabled.
12537
+ * @member {boolean} disabled
12538
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12539
+ * @instance
12540
+ */
12541
+ ScriptConfig.prototype.disabled = false;
12542
+
12543
+ /**
12544
+ * ScriptConfig description.
12545
+ * @member {string} description
12546
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12547
+ * @instance
12548
+ */
12549
+ ScriptConfig.prototype.description = "";
12550
+
12551
+ /**
12552
+ * ScriptConfig language.
12553
+ * @member {string} language
12554
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12555
+ * @instance
12556
+ */
12557
+ ScriptConfig.prototype.language = "";
12558
+
12559
+ /**
12560
+ * ScriptConfig args.
12561
+ * @member {Array.<string>} args
12562
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12563
+ * @instance
12564
+ */
12565
+ ScriptConfig.prototype.args = $util.emptyArray;
12566
+
12567
+ /**
12568
+ * ScriptConfig depsFile.
12569
+ * @member {string} depsFile
12570
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12571
+ * @instance
12572
+ */
12573
+ ScriptConfig.prototype.depsFile = "";
12574
+
12575
+ /**
12576
+ * ScriptConfig runtimeVersion.
12577
+ * @member {string} runtimeVersion
12578
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12579
+ * @instance
12580
+ */
12581
+ ScriptConfig.prototype.runtimeVersion = "";
12582
+
12583
+ /**
12584
+ * ScriptConfig envRoot.
12585
+ * @member {string} envRoot
12586
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12587
+ * @instance
12588
+ */
12589
+ ScriptConfig.prototype.envRoot = "";
12590
+
12591
+ /**
12592
+ * ScriptConfig timeoutMillis.
12593
+ * @member {number} timeoutMillis
12594
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12595
+ * @instance
12596
+ */
12597
+ ScriptConfig.prototype.timeoutMillis = 0;
12598
+
12599
+ /**
12600
+ * Creates a new ScriptConfig instance using the specified properties.
12601
+ * @function create
12602
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12603
+ * @static
12604
+ * @param {sqlanvil.ActionConfig.IScriptConfig=} [properties] Properties to set
12605
+ * @returns {sqlanvil.ActionConfig.ScriptConfig} ScriptConfig instance
12606
+ */
12607
+ ScriptConfig.create = function create(properties) {
12608
+ return new ScriptConfig(properties);
12609
+ };
12610
+
12611
+ /**
12612
+ * Encodes the specified ScriptConfig message. Does not implicitly {@link sqlanvil.ActionConfig.ScriptConfig.verify|verify} messages.
12613
+ * @function encode
12614
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12615
+ * @static
12616
+ * @param {sqlanvil.ActionConfig.IScriptConfig} message ScriptConfig message or plain object to encode
12617
+ * @param {$protobuf.Writer} [writer] Writer to encode to
12618
+ * @returns {$protobuf.Writer} Writer
12619
+ */
12620
+ ScriptConfig.encode = function encode(message, writer, q) {
12621
+ if (!writer)
12622
+ writer = $Writer.create();
12623
+ if (q === undefined)
12624
+ q = 0;
12625
+ if (q > $util.recursionLimit)
12626
+ throw Error("max depth exceeded");
12627
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
12628
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
12629
+ if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset"))
12630
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataset);
12631
+ if (message.project != null && Object.hasOwnProperty.call(message, "project"))
12632
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.project);
12633
+ if (message.dependencyTargets != null && message.dependencyTargets.length)
12634
+ for (let i = 0; i < message.dependencyTargets.length; ++i)
12635
+ $root.sqlanvil.ActionConfig.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim();
12636
+ if (message.filename != null && Object.hasOwnProperty.call(message, "filename"))
12637
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.filename);
12638
+ if (message.tags != null && message.tags.length)
12639
+ for (let i = 0; i < message.tags.length; ++i)
12640
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.tags[i]);
12641
+ if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled"))
12642
+ writer.uint32(/* id 7, wireType 0 =*/56).bool(message.disabled);
12643
+ if (message.description != null && Object.hasOwnProperty.call(message, "description"))
12644
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.description);
12645
+ if (message.language != null && Object.hasOwnProperty.call(message, "language"))
12646
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.language);
12647
+ if (message.args != null && message.args.length)
12648
+ for (let i = 0; i < message.args.length; ++i)
12649
+ writer.uint32(/* id 10, wireType 2 =*/82).string(message.args[i]);
12650
+ if (message.depsFile != null && Object.hasOwnProperty.call(message, "depsFile"))
12651
+ writer.uint32(/* id 11, wireType 2 =*/90).string(message.depsFile);
12652
+ if (message.runtimeVersion != null && Object.hasOwnProperty.call(message, "runtimeVersion"))
12653
+ writer.uint32(/* id 12, wireType 2 =*/98).string(message.runtimeVersion);
12654
+ if (message.envRoot != null && Object.hasOwnProperty.call(message, "envRoot"))
12655
+ writer.uint32(/* id 13, wireType 2 =*/106).string(message.envRoot);
12656
+ if (message.timeoutMillis != null && Object.hasOwnProperty.call(message, "timeoutMillis"))
12657
+ writer.uint32(/* id 14, wireType 0 =*/112).int32(message.timeoutMillis);
12658
+ return writer;
12659
+ };
12660
+
12661
+ /**
12662
+ * Encodes the specified ScriptConfig message, length delimited. Does not implicitly {@link sqlanvil.ActionConfig.ScriptConfig.verify|verify} messages.
12663
+ * @function encodeDelimited
12664
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12665
+ * @static
12666
+ * @param {sqlanvil.ActionConfig.IScriptConfig} message ScriptConfig message or plain object to encode
12667
+ * @param {$protobuf.Writer} [writer] Writer to encode to
12668
+ * @returns {$protobuf.Writer} Writer
12669
+ */
12670
+ ScriptConfig.encodeDelimited = function encodeDelimited(message, writer) {
12671
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
12672
+ };
12673
+
12674
+ /**
12675
+ * Decodes a ScriptConfig message from the specified reader or buffer.
12676
+ * @function decode
12677
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12678
+ * @static
12679
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
12680
+ * @param {number} [length] Message length if known beforehand
12681
+ * @returns {sqlanvil.ActionConfig.ScriptConfig} ScriptConfig
12682
+ * @throws {Error} If the payload is not a reader or valid buffer
12683
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
12684
+ */
12685
+ ScriptConfig.decode = function decode(reader, length, error, long) {
12686
+ if (!(reader instanceof $Reader))
12687
+ reader = $Reader.create(reader);
12688
+ if (long === undefined)
12689
+ long = 0;
12690
+ if (long > $Reader.recursionLimit)
12691
+ throw Error("maximum nesting depth exceeded");
12692
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.ActionConfig.ScriptConfig();
12693
+ while (reader.pos < end) {
12694
+ let tag = reader.uint32();
12695
+ if (tag === error)
12696
+ break;
12697
+ switch (tag >>> 3) {
12698
+ case 1: {
12699
+ message.name = reader.string();
12700
+ break;
12701
+ }
12702
+ case 2: {
12703
+ message.dataset = reader.string();
12704
+ break;
12705
+ }
12706
+ case 3: {
12707
+ message.project = reader.string();
12708
+ break;
12709
+ }
12710
+ case 4: {
12711
+ if (!(message.dependencyTargets && message.dependencyTargets.length))
12712
+ message.dependencyTargets = [];
12713
+ message.dependencyTargets.push($root.sqlanvil.ActionConfig.Target.decode(reader, reader.uint32(), undefined, long + 1));
12714
+ break;
12715
+ }
12716
+ case 5: {
12717
+ message.filename = reader.string();
12718
+ break;
12719
+ }
12720
+ case 6: {
12721
+ if (!(message.tags && message.tags.length))
12722
+ message.tags = [];
12723
+ message.tags.push(reader.string());
12724
+ break;
12725
+ }
12726
+ case 7: {
12727
+ message.disabled = reader.bool();
12728
+ break;
12729
+ }
12730
+ case 8: {
12731
+ message.description = reader.string();
12732
+ break;
12733
+ }
12734
+ case 9: {
12735
+ message.language = reader.string();
12736
+ break;
12737
+ }
12738
+ case 10: {
12739
+ if (!(message.args && message.args.length))
12740
+ message.args = [];
12741
+ message.args.push(reader.string());
12742
+ break;
12743
+ }
12744
+ case 11: {
12745
+ message.depsFile = reader.string();
12746
+ break;
12747
+ }
12748
+ case 12: {
12749
+ message.runtimeVersion = reader.string();
12750
+ break;
12751
+ }
12752
+ case 13: {
12753
+ message.envRoot = reader.string();
12754
+ break;
12755
+ }
12756
+ case 14: {
12757
+ message.timeoutMillis = reader.int32();
12758
+ break;
12759
+ }
12760
+ default:
12761
+ reader.skipType(tag & 7, long);
12762
+ break;
12763
+ }
12764
+ }
12765
+ return message;
12766
+ };
12767
+
12768
+ /**
12769
+ * Decodes a ScriptConfig message from the specified reader or buffer, length delimited.
12770
+ * @function decodeDelimited
12771
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12772
+ * @static
12773
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
12774
+ * @returns {sqlanvil.ActionConfig.ScriptConfig} ScriptConfig
12775
+ * @throws {Error} If the payload is not a reader or valid buffer
12776
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
12777
+ */
12778
+ ScriptConfig.decodeDelimited = function decodeDelimited(reader) {
12779
+ if (!(reader instanceof $Reader))
12780
+ reader = new $Reader(reader);
12781
+ return this.decode(reader, reader.uint32());
12782
+ };
12783
+
12784
+ /**
12785
+ * Verifies a ScriptConfig message.
12786
+ * @function verify
12787
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12788
+ * @static
12789
+ * @param {Object.<string,*>} message Plain object to verify
12790
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
12791
+ */
12792
+ ScriptConfig.verify = function verify(message, long) {
12793
+ if (typeof message !== "object" || message === null)
12794
+ return "object expected";
12795
+ if (long === undefined)
12796
+ long = 0;
12797
+ if (long > $util.recursionLimit)
12798
+ return "maximum nesting depth exceeded";
12799
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
12800
+ if (!$util.isString(message.name))
12801
+ return "name: string expected";
12802
+ if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset"))
12803
+ if (!$util.isString(message.dataset))
12804
+ return "dataset: string expected";
12805
+ if (message.project != null && Object.hasOwnProperty.call(message, "project"))
12806
+ if (!$util.isString(message.project))
12807
+ return "project: string expected";
12808
+ if (message.dependencyTargets != null && Object.hasOwnProperty.call(message, "dependencyTargets")) {
12809
+ if (!Array.isArray(message.dependencyTargets))
12810
+ return "dependencyTargets: array expected";
12811
+ for (let i = 0; i < message.dependencyTargets.length; ++i) {
12812
+ let error = $root.sqlanvil.ActionConfig.Target.verify(message.dependencyTargets[i], long + 1);
12813
+ if (error)
12814
+ return "dependencyTargets." + error;
12815
+ }
12816
+ }
12817
+ if (message.filename != null && Object.hasOwnProperty.call(message, "filename"))
12818
+ if (!$util.isString(message.filename))
12819
+ return "filename: string expected";
12820
+ if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) {
12821
+ if (!Array.isArray(message.tags))
12822
+ return "tags: array expected";
12823
+ for (let i = 0; i < message.tags.length; ++i)
12824
+ if (!$util.isString(message.tags[i]))
12825
+ return "tags: string[] expected";
12826
+ }
12827
+ if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled"))
12828
+ if (typeof message.disabled !== "boolean")
12829
+ return "disabled: boolean expected";
12830
+ if (message.description != null && Object.hasOwnProperty.call(message, "description"))
12831
+ if (!$util.isString(message.description))
12832
+ return "description: string expected";
12833
+ if (message.language != null && Object.hasOwnProperty.call(message, "language"))
12834
+ if (!$util.isString(message.language))
12835
+ return "language: string expected";
12836
+ if (message.args != null && Object.hasOwnProperty.call(message, "args")) {
12837
+ if (!Array.isArray(message.args))
12838
+ return "args: array expected";
12839
+ for (let i = 0; i < message.args.length; ++i)
12840
+ if (!$util.isString(message.args[i]))
12841
+ return "args: string[] expected";
12842
+ }
12843
+ if (message.depsFile != null && Object.hasOwnProperty.call(message, "depsFile"))
12844
+ if (!$util.isString(message.depsFile))
12845
+ return "depsFile: string expected";
12846
+ if (message.runtimeVersion != null && Object.hasOwnProperty.call(message, "runtimeVersion"))
12847
+ if (!$util.isString(message.runtimeVersion))
12848
+ return "runtimeVersion: string expected";
12849
+ if (message.envRoot != null && Object.hasOwnProperty.call(message, "envRoot"))
12850
+ if (!$util.isString(message.envRoot))
12851
+ return "envRoot: string expected";
12852
+ if (message.timeoutMillis != null && Object.hasOwnProperty.call(message, "timeoutMillis"))
12853
+ if (!$util.isInteger(message.timeoutMillis))
12854
+ return "timeoutMillis: integer expected";
12855
+ return null;
12856
+ };
12857
+
12858
+ /**
12859
+ * Creates a ScriptConfig message from a plain object. Also converts values to their respective internal types.
12860
+ * @function fromObject
12861
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12862
+ * @static
12863
+ * @param {Object.<string,*>} object Plain object
12864
+ * @returns {sqlanvil.ActionConfig.ScriptConfig} ScriptConfig
12865
+ */
12866
+ ScriptConfig.fromObject = function fromObject(object, long) {
12867
+ if (object instanceof $root.sqlanvil.ActionConfig.ScriptConfig)
12868
+ return object;
12869
+ if (!$util.isObject(object))
12870
+ throw TypeError(".sqlanvil.ActionConfig.ScriptConfig: object expected");
12871
+ if (long === undefined)
12872
+ long = 0;
12873
+ if (long > $util.recursionLimit)
12874
+ throw Error("maximum nesting depth exceeded");
12875
+ let message = new $root.sqlanvil.ActionConfig.ScriptConfig();
12876
+ if (object.name != null)
12877
+ message.name = String(object.name);
12878
+ if (object.dataset != null)
12879
+ message.dataset = String(object.dataset);
12880
+ if (object.project != null)
12881
+ message.project = String(object.project);
12882
+ if (object.dependencyTargets) {
12883
+ if (!Array.isArray(object.dependencyTargets))
12884
+ throw TypeError(".sqlanvil.ActionConfig.ScriptConfig.dependencyTargets: array expected");
12885
+ message.dependencyTargets = [];
12886
+ for (let i = 0; i < object.dependencyTargets.length; ++i) {
12887
+ if (!$util.isObject(object.dependencyTargets[i]))
12888
+ throw TypeError(".sqlanvil.ActionConfig.ScriptConfig.dependencyTargets: object expected");
12889
+ message.dependencyTargets[i] = $root.sqlanvil.ActionConfig.Target.fromObject(object.dependencyTargets[i], long + 1);
12890
+ }
12891
+ }
12892
+ if (object.filename != null)
12893
+ message.filename = String(object.filename);
12894
+ if (object.tags) {
12895
+ if (!Array.isArray(object.tags))
12896
+ throw TypeError(".sqlanvil.ActionConfig.ScriptConfig.tags: array expected");
12897
+ message.tags = [];
12898
+ for (let i = 0; i < object.tags.length; ++i)
12899
+ message.tags[i] = String(object.tags[i]);
12900
+ }
12901
+ if (object.disabled != null)
12902
+ message.disabled = Boolean(object.disabled);
12903
+ if (object.description != null)
12904
+ message.description = String(object.description);
12905
+ if (object.language != null)
12906
+ message.language = String(object.language);
12907
+ if (object.args) {
12908
+ if (!Array.isArray(object.args))
12909
+ throw TypeError(".sqlanvil.ActionConfig.ScriptConfig.args: array expected");
12910
+ message.args = [];
12911
+ for (let i = 0; i < object.args.length; ++i)
12912
+ message.args[i] = String(object.args[i]);
12913
+ }
12914
+ if (object.depsFile != null)
12915
+ message.depsFile = String(object.depsFile);
12916
+ if (object.runtimeVersion != null)
12917
+ message.runtimeVersion = String(object.runtimeVersion);
12918
+ if (object.envRoot != null)
12919
+ message.envRoot = String(object.envRoot);
12920
+ if (object.timeoutMillis != null)
12921
+ message.timeoutMillis = object.timeoutMillis | 0;
12922
+ return message;
12923
+ };
12924
+
12925
+ /**
12926
+ * Creates a plain object from a ScriptConfig message. Also converts values to other types if specified.
12927
+ * @function toObject
12928
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
12929
+ * @static
12930
+ * @param {sqlanvil.ActionConfig.ScriptConfig} message ScriptConfig
12931
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
12932
+ * @returns {Object.<string,*>} Plain object
12933
+ */
12934
+ ScriptConfig.toObject = function toObject(message, options, q) {
12935
+ if (!options)
12936
+ options = {};
12937
+ if (q === undefined)
12938
+ q = 0;
12939
+ if (q > $util.recursionLimit)
12940
+ throw Error("max depth exceeded");
12941
+ let object = {};
12942
+ if (options.arrays || options.defaults) {
12943
+ object.dependencyTargets = [];
12944
+ object.tags = [];
12945
+ object.args = [];
12946
+ }
12947
+ if (options.defaults) {
12948
+ object.name = "";
12949
+ object.dataset = "";
12950
+ object.project = "";
12951
+ object.filename = "";
12952
+ object.disabled = false;
12953
+ object.description = "";
12954
+ object.language = "";
12955
+ object.depsFile = "";
12956
+ object.runtimeVersion = "";
12957
+ object.envRoot = "";
12958
+ object.timeoutMillis = 0;
12959
+ }
12960
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
12961
+ object.name = message.name;
12962
+ if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset"))
12963
+ object.dataset = message.dataset;
12964
+ if (message.project != null && Object.hasOwnProperty.call(message, "project"))
12965
+ object.project = message.project;
12966
+ if (message.dependencyTargets && message.dependencyTargets.length) {
12967
+ object.dependencyTargets = [];
12968
+ for (let j = 0; j < message.dependencyTargets.length; ++j)
12969
+ object.dependencyTargets[j] = $root.sqlanvil.ActionConfig.Target.toObject(message.dependencyTargets[j], options, q + 1);
12970
+ }
12971
+ if (message.filename != null && Object.hasOwnProperty.call(message, "filename"))
12972
+ object.filename = message.filename;
12973
+ if (message.tags && message.tags.length) {
12974
+ object.tags = [];
12975
+ for (let j = 0; j < message.tags.length; ++j)
12976
+ object.tags[j] = message.tags[j];
12977
+ }
12978
+ if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled"))
12979
+ object.disabled = message.disabled;
12980
+ if (message.description != null && Object.hasOwnProperty.call(message, "description"))
12981
+ object.description = message.description;
12982
+ if (message.language != null && Object.hasOwnProperty.call(message, "language"))
12983
+ object.language = message.language;
12984
+ if (message.args && message.args.length) {
12985
+ object.args = [];
12986
+ for (let j = 0; j < message.args.length; ++j)
12987
+ object.args[j] = message.args[j];
12988
+ }
12989
+ if (message.depsFile != null && Object.hasOwnProperty.call(message, "depsFile"))
12990
+ object.depsFile = message.depsFile;
12991
+ if (message.runtimeVersion != null && Object.hasOwnProperty.call(message, "runtimeVersion"))
12992
+ object.runtimeVersion = message.runtimeVersion;
12993
+ if (message.envRoot != null && Object.hasOwnProperty.call(message, "envRoot"))
12994
+ object.envRoot = message.envRoot;
12995
+ if (message.timeoutMillis != null && Object.hasOwnProperty.call(message, "timeoutMillis"))
12996
+ object.timeoutMillis = message.timeoutMillis;
12997
+ return object;
12998
+ };
12999
+
13000
+ /**
13001
+ * Converts this ScriptConfig to JSON.
13002
+ * @function toJSON
13003
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
13004
+ * @instance
13005
+ * @returns {Object.<string,*>} JSON object
13006
+ */
13007
+ ScriptConfig.prototype.toJSON = function toJSON() {
13008
+ return this.constructor.toObject(this, $protobuf__namespace.util.toJSONOptions);
13009
+ };
13010
+
13011
+ /**
13012
+ * Gets the default type url for ScriptConfig
13013
+ * @function getTypeUrl
13014
+ * @memberof sqlanvil.ActionConfig.ScriptConfig
13015
+ * @static
13016
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
13017
+ * @returns {string} The default type url
13018
+ */
13019
+ ScriptConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
13020
+ if (typeUrlPrefix === undefined) {
13021
+ typeUrlPrefix = "type.googleapis.com";
13022
+ }
13023
+ return typeUrlPrefix + "/sqlanvil.ActionConfig.ScriptConfig";
13024
+ };
13025
+
13026
+ return ScriptConfig;
13027
+ })();
13028
+
12384
13029
  ActionConfig.RlsPolicyConfig = (function() {
12385
13030
 
12386
13031
  /**
@@ -16428,6 +17073,7 @@ const sqlanvil = $root.sqlanvil = (() => {
16428
17073
  * @property {string|null} [engine] MysqlOptions engine
16429
17074
  * @property {string|null} [charset] MysqlOptions charset
16430
17075
  * @property {string|null} [collation] MysqlOptions collation
17076
+ * @property {string|null} [rowFormat] MysqlOptions rowFormat
16431
17077
  * @property {Array.<sqlanvil.MysqlOptions.IIndex>|null} [indexes] MysqlOptions indexes
16432
17078
  * @property {sqlanvil.MysqlOptions.IPartition|null} [partition] MysqlOptions partition
16433
17079
  */
@@ -16472,6 +17118,14 @@ const sqlanvil = $root.sqlanvil = (() => {
16472
17118
  */
16473
17119
  MysqlOptions.prototype.collation = "";
16474
17120
 
17121
+ /**
17122
+ * MysqlOptions rowFormat.
17123
+ * @member {string} rowFormat
17124
+ * @memberof sqlanvil.MysqlOptions
17125
+ * @instance
17126
+ */
17127
+ MysqlOptions.prototype.rowFormat = "";
17128
+
16475
17129
  /**
16476
17130
  * MysqlOptions indexes.
16477
17131
  * @member {Array.<sqlanvil.MysqlOptions.IIndex>} indexes
@@ -16527,6 +17181,8 @@ const sqlanvil = $root.sqlanvil = (() => {
16527
17181
  $root.sqlanvil.MysqlOptions.Index.encode(message.indexes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim();
16528
17182
  if (message.partition != null && Object.hasOwnProperty.call(message, "partition"))
16529
17183
  $root.sqlanvil.MysqlOptions.Partition.encode(message.partition, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim();
17184
+ if (message.rowFormat != null && Object.hasOwnProperty.call(message, "rowFormat"))
17185
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.rowFormat);
16530
17186
  return writer;
16531
17187
  };
16532
17188
 
@@ -16579,6 +17235,10 @@ const sqlanvil = $root.sqlanvil = (() => {
16579
17235
  message.collation = reader.string();
16580
17236
  break;
16581
17237
  }
17238
+ case 6: {
17239
+ message.rowFormat = reader.string();
17240
+ break;
17241
+ }
16582
17242
  case 4: {
16583
17243
  if (!(message.indexes && message.indexes.length))
16584
17244
  message.indexes = [];
@@ -16637,6 +17297,9 @@ const sqlanvil = $root.sqlanvil = (() => {
16637
17297
  if (message.collation != null && Object.hasOwnProperty.call(message, "collation"))
16638
17298
  if (!$util.isString(message.collation))
16639
17299
  return "collation: string expected";
17300
+ if (message.rowFormat != null && Object.hasOwnProperty.call(message, "rowFormat"))
17301
+ if (!$util.isString(message.rowFormat))
17302
+ return "rowFormat: string expected";
16640
17303
  if (message.indexes != null && Object.hasOwnProperty.call(message, "indexes")) {
16641
17304
  if (!Array.isArray(message.indexes))
16642
17305
  return "indexes: array expected";
@@ -16678,6 +17341,8 @@ const sqlanvil = $root.sqlanvil = (() => {
16678
17341
  message.charset = String(object.charset);
16679
17342
  if (object.collation != null)
16680
17343
  message.collation = String(object.collation);
17344
+ if (object.rowFormat != null)
17345
+ message.rowFormat = String(object.rowFormat);
16681
17346
  if (object.indexes) {
16682
17347
  if (!Array.isArray(object.indexes))
16683
17348
  throw TypeError(".sqlanvil.MysqlOptions.indexes: array expected");
@@ -16720,6 +17385,7 @@ const sqlanvil = $root.sqlanvil = (() => {
16720
17385
  object.charset = "";
16721
17386
  object.collation = "";
16722
17387
  object.partition = null;
17388
+ object.rowFormat = "";
16723
17389
  }
16724
17390
  if (message.engine != null && Object.hasOwnProperty.call(message, "engine"))
16725
17391
  object.engine = message.engine;
@@ -16734,6 +17400,8 @@ const sqlanvil = $root.sqlanvil = (() => {
16734
17400
  }
16735
17401
  if (message.partition != null && Object.hasOwnProperty.call(message, "partition"))
16736
17402
  object.partition = $root.sqlanvil.MysqlOptions.Partition.toObject(message.partition, options, q + 1);
17403
+ if (message.rowFormat != null && Object.hasOwnProperty.call(message, "rowFormat"))
17404
+ object.rowFormat = message.rowFormat;
16737
17405
  return object;
16738
17406
  };
16739
17407
 
@@ -16772,6 +17440,7 @@ const sqlanvil = $root.sqlanvil = (() => {
16772
17440
  * @property {string|null} [name] Index name
16773
17441
  * @property {Array.<string>|null} [columns] Index columns
16774
17442
  * @property {boolean|null} [unique] Index unique
17443
+ * @property {string|null} [type] Index type
16775
17444
  */
16776
17445
 
16777
17446
  /**
@@ -16814,6 +17483,14 @@ const sqlanvil = $root.sqlanvil = (() => {
16814
17483
  */
16815
17484
  Index.prototype.unique = false;
16816
17485
 
17486
+ /**
17487
+ * Index type.
17488
+ * @member {string} type
17489
+ * @memberof sqlanvil.MysqlOptions.Index
17490
+ * @instance
17491
+ */
17492
+ Index.prototype.type = "";
17493
+
16817
17494
  /**
16818
17495
  * Creates a new Index instance using the specified properties.
16819
17496
  * @function create
@@ -16849,6 +17526,8 @@ const sqlanvil = $root.sqlanvil = (() => {
16849
17526
  writer.uint32(/* id 2, wireType 2 =*/18).string(message.columns[i]);
16850
17527
  if (message.unique != null && Object.hasOwnProperty.call(message, "unique"))
16851
17528
  writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unique);
17529
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
17530
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.type);
16852
17531
  return writer;
16853
17532
  };
16854
17533
 
@@ -16903,6 +17582,10 @@ const sqlanvil = $root.sqlanvil = (() => {
16903
17582
  message.unique = reader.bool();
16904
17583
  break;
16905
17584
  }
17585
+ case 4: {
17586
+ message.type = reader.string();
17587
+ break;
17588
+ }
16906
17589
  default:
16907
17590
  reader.skipType(tag & 7, long);
16908
17591
  break;
@@ -16955,6 +17638,9 @@ const sqlanvil = $root.sqlanvil = (() => {
16955
17638
  if (message.unique != null && Object.hasOwnProperty.call(message, "unique"))
16956
17639
  if (typeof message.unique !== "boolean")
16957
17640
  return "unique: boolean expected";
17641
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
17642
+ if (!$util.isString(message.type))
17643
+ return "type: string expected";
16958
17644
  return null;
16959
17645
  };
16960
17646
 
@@ -16987,6 +17673,8 @@ const sqlanvil = $root.sqlanvil = (() => {
16987
17673
  }
16988
17674
  if (object.unique != null)
16989
17675
  message.unique = Boolean(object.unique);
17676
+ if (object.type != null)
17677
+ message.type = String(object.type);
16990
17678
  return message;
16991
17679
  };
16992
17680
 
@@ -17012,6 +17700,7 @@ const sqlanvil = $root.sqlanvil = (() => {
17012
17700
  if (options.defaults) {
17013
17701
  object.name = "";
17014
17702
  object.unique = false;
17703
+ object.type = "";
17015
17704
  }
17016
17705
  if (message.name != null && Object.hasOwnProperty.call(message, "name"))
17017
17706
  object.name = message.name;
@@ -17022,6 +17711,8 @@ const sqlanvil = $root.sqlanvil = (() => {
17022
17711
  }
17023
17712
  if (message.unique != null && Object.hasOwnProperty.call(message, "unique"))
17024
17713
  object.unique = message.unique;
17714
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
17715
+ object.type = message.type;
17025
17716
  return object;
17026
17717
  };
17027
17718
 
@@ -27599,61 +28290,705 @@ const sqlanvil = $root.sqlanvil = (() => {
27599
28290
  }
27600
28291
  if (message.actionDescriptor != null && Object.hasOwnProperty.call(message, "actionDescriptor"))
27601
28292
  object.actionDescriptor = $root.sqlanvil.ActionDescriptor.toObject(message.actionDescriptor, options, q + 1);
27602
- if (message.connectionName != null && Object.hasOwnProperty.call(message, "connectionName"))
27603
- object.connectionName = message.connectionName;
27604
- if (message.platform != null && Object.hasOwnProperty.call(message, "platform"))
27605
- object.platform = message.platform;
27606
- if (message.project != null && Object.hasOwnProperty.call(message, "project"))
27607
- object.project = message.project;
27608
- if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset"))
27609
- object.dataset = message.dataset;
27610
- if (message.sourceName != null && Object.hasOwnProperty.call(message, "sourceName"))
27611
- object.sourceName = message.sourceName;
27612
- if (message.billingProject != null && Object.hasOwnProperty.call(message, "billingProject"))
27613
- object.billingProject = message.billingProject;
27614
- let keys2;
27615
- if (message.columnTypes && (keys2 = Object.keys(message.columnTypes)).length) {
27616
- object.columnTypes = {};
27617
- for (let j = 0; j < keys2.length; ++j) {
27618
- if (keys2[j] === "__proto__")
27619
- $util.makeProp(object.columnTypes, keys2[j]);
27620
- object.columnTypes[keys2[j]] = message.columnTypes[keys2[j]];
27621
- }
27622
- }
28293
+ if (message.connectionName != null && Object.hasOwnProperty.call(message, "connectionName"))
28294
+ object.connectionName = message.connectionName;
28295
+ if (message.platform != null && Object.hasOwnProperty.call(message, "platform"))
28296
+ object.platform = message.platform;
28297
+ if (message.project != null && Object.hasOwnProperty.call(message, "project"))
28298
+ object.project = message.project;
28299
+ if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset"))
28300
+ object.dataset = message.dataset;
28301
+ if (message.sourceName != null && Object.hasOwnProperty.call(message, "sourceName"))
28302
+ object.sourceName = message.sourceName;
28303
+ if (message.billingProject != null && Object.hasOwnProperty.call(message, "billingProject"))
28304
+ object.billingProject = message.billingProject;
28305
+ let keys2;
28306
+ if (message.columnTypes && (keys2 = Object.keys(message.columnTypes)).length) {
28307
+ object.columnTypes = {};
28308
+ for (let j = 0; j < keys2.length; ++j) {
28309
+ if (keys2[j] === "__proto__")
28310
+ $util.makeProp(object.columnTypes, keys2[j]);
28311
+ object.columnTypes[keys2[j]] = message.columnTypes[keys2[j]];
28312
+ }
28313
+ }
28314
+ if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName"))
28315
+ object.fileName = message.fileName;
28316
+ if (message.database != null && Object.hasOwnProperty.call(message, "database"))
28317
+ object.database = message.database;
28318
+ return object;
28319
+ };
28320
+
28321
+ /**
28322
+ * Converts this Extract to JSON.
28323
+ * @function toJSON
28324
+ * @memberof sqlanvil.Extract
28325
+ * @instance
28326
+ * @returns {Object.<string,*>} JSON object
28327
+ */
28328
+ Extract.prototype.toJSON = function toJSON() {
28329
+ return this.constructor.toObject(this, $protobuf__namespace.util.toJSONOptions);
28330
+ };
28331
+
28332
+ /**
28333
+ * Gets the default type url for Extract
28334
+ * @function getTypeUrl
28335
+ * @memberof sqlanvil.Extract
28336
+ * @static
28337
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
28338
+ * @returns {string} The default type url
28339
+ */
28340
+ Extract.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
28341
+ if (typeUrlPrefix === undefined) {
28342
+ typeUrlPrefix = "type.googleapis.com";
28343
+ }
28344
+ return typeUrlPrefix + "/sqlanvil.Extract";
28345
+ };
28346
+
28347
+ return Extract;
28348
+ })();
28349
+
28350
+ sqlanvil.Script = (function() {
28351
+
28352
+ /**
28353
+ * Properties of a Script.
28354
+ * @memberof sqlanvil
28355
+ * @interface IScript
28356
+ * @property {sqlanvil.ITarget|null} [target] Script target
28357
+ * @property {sqlanvil.ITarget|null} [canonicalTarget] Script canonicalTarget
28358
+ * @property {Array.<sqlanvil.ITarget>|null} [dependencyTargets] Script dependencyTargets
28359
+ * @property {sqlanvil.ActionHermeticity|null} [hermeticity] Script hermeticity
28360
+ * @property {boolean|null} [disabled] Script disabled
28361
+ * @property {Array.<string>|null} [tags] Script tags
28362
+ * @property {sqlanvil.IActionDescriptor|null} [actionDescriptor] Script actionDescriptor
28363
+ * @property {string|null} [language] Script language
28364
+ * @property {string|null} [scriptFilename] Script scriptFilename
28365
+ * @property {Array.<string>|null} [args] Script args
28366
+ * @property {string|null} [depsFile] Script depsFile
28367
+ * @property {string|null} [runtimeVersion] Script runtimeVersion
28368
+ * @property {string|null} [envRoot] Script envRoot
28369
+ * @property {number|null} [timeoutMillis] Script timeoutMillis
28370
+ * @property {string|null} [fileName] Script fileName
28371
+ */
28372
+
28373
+ /**
28374
+ * Constructs a new Script.
28375
+ * @memberof sqlanvil
28376
+ * @classdesc Represents a Script.
28377
+ * @implements IScript
28378
+ * @constructor
28379
+ * @param {sqlanvil.IScript=} [properties] Properties to set
28380
+ */
28381
+ function Script(properties) {
28382
+ this.dependencyTargets = [];
28383
+ this.tags = [];
28384
+ this.args = [];
28385
+ if (properties)
28386
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
28387
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
28388
+ this[keys[i]] = properties[keys[i]];
28389
+ }
28390
+
28391
+ /**
28392
+ * Script target.
28393
+ * @member {sqlanvil.ITarget|null|undefined} target
28394
+ * @memberof sqlanvil.Script
28395
+ * @instance
28396
+ */
28397
+ Script.prototype.target = null;
28398
+
28399
+ /**
28400
+ * Script canonicalTarget.
28401
+ * @member {sqlanvil.ITarget|null|undefined} canonicalTarget
28402
+ * @memberof sqlanvil.Script
28403
+ * @instance
28404
+ */
28405
+ Script.prototype.canonicalTarget = null;
28406
+
28407
+ /**
28408
+ * Script dependencyTargets.
28409
+ * @member {Array.<sqlanvil.ITarget>} dependencyTargets
28410
+ * @memberof sqlanvil.Script
28411
+ * @instance
28412
+ */
28413
+ Script.prototype.dependencyTargets = $util.emptyArray;
28414
+
28415
+ /**
28416
+ * Script hermeticity.
28417
+ * @member {sqlanvil.ActionHermeticity} hermeticity
28418
+ * @memberof sqlanvil.Script
28419
+ * @instance
28420
+ */
28421
+ Script.prototype.hermeticity = 0;
28422
+
28423
+ /**
28424
+ * Script disabled.
28425
+ * @member {boolean} disabled
28426
+ * @memberof sqlanvil.Script
28427
+ * @instance
28428
+ */
28429
+ Script.prototype.disabled = false;
28430
+
28431
+ /**
28432
+ * Script tags.
28433
+ * @member {Array.<string>} tags
28434
+ * @memberof sqlanvil.Script
28435
+ * @instance
28436
+ */
28437
+ Script.prototype.tags = $util.emptyArray;
28438
+
28439
+ /**
28440
+ * Script actionDescriptor.
28441
+ * @member {sqlanvil.IActionDescriptor|null|undefined} actionDescriptor
28442
+ * @memberof sqlanvil.Script
28443
+ * @instance
28444
+ */
28445
+ Script.prototype.actionDescriptor = null;
28446
+
28447
+ /**
28448
+ * Script language.
28449
+ * @member {string} language
28450
+ * @memberof sqlanvil.Script
28451
+ * @instance
28452
+ */
28453
+ Script.prototype.language = "";
28454
+
28455
+ /**
28456
+ * Script scriptFilename.
28457
+ * @member {string} scriptFilename
28458
+ * @memberof sqlanvil.Script
28459
+ * @instance
28460
+ */
28461
+ Script.prototype.scriptFilename = "";
28462
+
28463
+ /**
28464
+ * Script args.
28465
+ * @member {Array.<string>} args
28466
+ * @memberof sqlanvil.Script
28467
+ * @instance
28468
+ */
28469
+ Script.prototype.args = $util.emptyArray;
28470
+
28471
+ /**
28472
+ * Script depsFile.
28473
+ * @member {string} depsFile
28474
+ * @memberof sqlanvil.Script
28475
+ * @instance
28476
+ */
28477
+ Script.prototype.depsFile = "";
28478
+
28479
+ /**
28480
+ * Script runtimeVersion.
28481
+ * @member {string} runtimeVersion
28482
+ * @memberof sqlanvil.Script
28483
+ * @instance
28484
+ */
28485
+ Script.prototype.runtimeVersion = "";
28486
+
28487
+ /**
28488
+ * Script envRoot.
28489
+ * @member {string} envRoot
28490
+ * @memberof sqlanvil.Script
28491
+ * @instance
28492
+ */
28493
+ Script.prototype.envRoot = "";
28494
+
28495
+ /**
28496
+ * Script timeoutMillis.
28497
+ * @member {number} timeoutMillis
28498
+ * @memberof sqlanvil.Script
28499
+ * @instance
28500
+ */
28501
+ Script.prototype.timeoutMillis = 0;
28502
+
28503
+ /**
28504
+ * Script fileName.
28505
+ * @member {string} fileName
28506
+ * @memberof sqlanvil.Script
28507
+ * @instance
28508
+ */
28509
+ Script.prototype.fileName = "";
28510
+
28511
+ /**
28512
+ * Creates a new Script instance using the specified properties.
28513
+ * @function create
28514
+ * @memberof sqlanvil.Script
28515
+ * @static
28516
+ * @param {sqlanvil.IScript=} [properties] Properties to set
28517
+ * @returns {sqlanvil.Script} Script instance
28518
+ */
28519
+ Script.create = function create(properties) {
28520
+ return new Script(properties);
28521
+ };
28522
+
28523
+ /**
28524
+ * Encodes the specified Script message. Does not implicitly {@link sqlanvil.Script.verify|verify} messages.
28525
+ * @function encode
28526
+ * @memberof sqlanvil.Script
28527
+ * @static
28528
+ * @param {sqlanvil.IScript} message Script message or plain object to encode
28529
+ * @param {$protobuf.Writer} [writer] Writer to encode to
28530
+ * @returns {$protobuf.Writer} Writer
28531
+ */
28532
+ Script.encode = function encode(message, writer, q) {
28533
+ if (!writer)
28534
+ writer = $Writer.create();
28535
+ if (q === undefined)
28536
+ q = 0;
28537
+ if (q > $util.recursionLimit)
28538
+ throw Error("max depth exceeded");
28539
+ if (message.target != null && Object.hasOwnProperty.call(message, "target"))
28540
+ $root.sqlanvil.Target.encode(message.target, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim();
28541
+ if (message.canonicalTarget != null && Object.hasOwnProperty.call(message, "canonicalTarget"))
28542
+ $root.sqlanvil.Target.encode(message.canonicalTarget, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim();
28543
+ if (message.dependencyTargets != null && message.dependencyTargets.length)
28544
+ for (let i = 0; i < message.dependencyTargets.length; ++i)
28545
+ $root.sqlanvil.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim();
28546
+ if (message.hermeticity != null && Object.hasOwnProperty.call(message, "hermeticity"))
28547
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.hermeticity);
28548
+ if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled"))
28549
+ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.disabled);
28550
+ if (message.tags != null && message.tags.length)
28551
+ for (let i = 0; i < message.tags.length; ++i)
28552
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.tags[i]);
28553
+ if (message.actionDescriptor != null && Object.hasOwnProperty.call(message, "actionDescriptor"))
28554
+ $root.sqlanvil.ActionDescriptor.encode(message.actionDescriptor, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim();
28555
+ if (message.language != null && Object.hasOwnProperty.call(message, "language"))
28556
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.language);
28557
+ if (message.scriptFilename != null && Object.hasOwnProperty.call(message, "scriptFilename"))
28558
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.scriptFilename);
28559
+ if (message.args != null && message.args.length)
28560
+ for (let i = 0; i < message.args.length; ++i)
28561
+ writer.uint32(/* id 10, wireType 2 =*/82).string(message.args[i]);
28562
+ if (message.depsFile != null && Object.hasOwnProperty.call(message, "depsFile"))
28563
+ writer.uint32(/* id 11, wireType 2 =*/90).string(message.depsFile);
28564
+ if (message.runtimeVersion != null && Object.hasOwnProperty.call(message, "runtimeVersion"))
28565
+ writer.uint32(/* id 12, wireType 2 =*/98).string(message.runtimeVersion);
28566
+ if (message.envRoot != null && Object.hasOwnProperty.call(message, "envRoot"))
28567
+ writer.uint32(/* id 13, wireType 2 =*/106).string(message.envRoot);
28568
+ if (message.timeoutMillis != null && Object.hasOwnProperty.call(message, "timeoutMillis"))
28569
+ writer.uint32(/* id 14, wireType 0 =*/112).int32(message.timeoutMillis);
28570
+ if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName"))
28571
+ writer.uint32(/* id 15, wireType 2 =*/122).string(message.fileName);
28572
+ return writer;
28573
+ };
28574
+
28575
+ /**
28576
+ * Encodes the specified Script message, length delimited. Does not implicitly {@link sqlanvil.Script.verify|verify} messages.
28577
+ * @function encodeDelimited
28578
+ * @memberof sqlanvil.Script
28579
+ * @static
28580
+ * @param {sqlanvil.IScript} message Script message or plain object to encode
28581
+ * @param {$protobuf.Writer} [writer] Writer to encode to
28582
+ * @returns {$protobuf.Writer} Writer
28583
+ */
28584
+ Script.encodeDelimited = function encodeDelimited(message, writer) {
28585
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
28586
+ };
28587
+
28588
+ /**
28589
+ * Decodes a Script message from the specified reader or buffer.
28590
+ * @function decode
28591
+ * @memberof sqlanvil.Script
28592
+ * @static
28593
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
28594
+ * @param {number} [length] Message length if known beforehand
28595
+ * @returns {sqlanvil.Script} Script
28596
+ * @throws {Error} If the payload is not a reader or valid buffer
28597
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
28598
+ */
28599
+ Script.decode = function decode(reader, length, error, long) {
28600
+ if (!(reader instanceof $Reader))
28601
+ reader = $Reader.create(reader);
28602
+ if (long === undefined)
28603
+ long = 0;
28604
+ if (long > $Reader.recursionLimit)
28605
+ throw Error("maximum nesting depth exceeded");
28606
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.Script();
28607
+ while (reader.pos < end) {
28608
+ let tag = reader.uint32();
28609
+ if (tag === error)
28610
+ break;
28611
+ switch (tag >>> 3) {
28612
+ case 1: {
28613
+ message.target = $root.sqlanvil.Target.decode(reader, reader.uint32(), undefined, long + 1);
28614
+ break;
28615
+ }
28616
+ case 2: {
28617
+ message.canonicalTarget = $root.sqlanvil.Target.decode(reader, reader.uint32(), undefined, long + 1);
28618
+ break;
28619
+ }
28620
+ case 3: {
28621
+ if (!(message.dependencyTargets && message.dependencyTargets.length))
28622
+ message.dependencyTargets = [];
28623
+ message.dependencyTargets.push($root.sqlanvil.Target.decode(reader, reader.uint32(), undefined, long + 1));
28624
+ break;
28625
+ }
28626
+ case 4: {
28627
+ message.hermeticity = reader.int32();
28628
+ break;
28629
+ }
28630
+ case 5: {
28631
+ message.disabled = reader.bool();
28632
+ break;
28633
+ }
28634
+ case 6: {
28635
+ if (!(message.tags && message.tags.length))
28636
+ message.tags = [];
28637
+ message.tags.push(reader.string());
28638
+ break;
28639
+ }
28640
+ case 7: {
28641
+ message.actionDescriptor = $root.sqlanvil.ActionDescriptor.decode(reader, reader.uint32(), undefined, long + 1);
28642
+ break;
28643
+ }
28644
+ case 8: {
28645
+ message.language = reader.string();
28646
+ break;
28647
+ }
28648
+ case 9: {
28649
+ message.scriptFilename = reader.string();
28650
+ break;
28651
+ }
28652
+ case 10: {
28653
+ if (!(message.args && message.args.length))
28654
+ message.args = [];
28655
+ message.args.push(reader.string());
28656
+ break;
28657
+ }
28658
+ case 11: {
28659
+ message.depsFile = reader.string();
28660
+ break;
28661
+ }
28662
+ case 12: {
28663
+ message.runtimeVersion = reader.string();
28664
+ break;
28665
+ }
28666
+ case 13: {
28667
+ message.envRoot = reader.string();
28668
+ break;
28669
+ }
28670
+ case 14: {
28671
+ message.timeoutMillis = reader.int32();
28672
+ break;
28673
+ }
28674
+ case 15: {
28675
+ message.fileName = reader.string();
28676
+ break;
28677
+ }
28678
+ default:
28679
+ reader.skipType(tag & 7, long);
28680
+ break;
28681
+ }
28682
+ }
28683
+ return message;
28684
+ };
28685
+
28686
+ /**
28687
+ * Decodes a Script message from the specified reader or buffer, length delimited.
28688
+ * @function decodeDelimited
28689
+ * @memberof sqlanvil.Script
28690
+ * @static
28691
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
28692
+ * @returns {sqlanvil.Script} Script
28693
+ * @throws {Error} If the payload is not a reader or valid buffer
28694
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
28695
+ */
28696
+ Script.decodeDelimited = function decodeDelimited(reader) {
28697
+ if (!(reader instanceof $Reader))
28698
+ reader = new $Reader(reader);
28699
+ return this.decode(reader, reader.uint32());
28700
+ };
28701
+
28702
+ /**
28703
+ * Verifies a Script message.
28704
+ * @function verify
28705
+ * @memberof sqlanvil.Script
28706
+ * @static
28707
+ * @param {Object.<string,*>} message Plain object to verify
28708
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
28709
+ */
28710
+ Script.verify = function verify(message, long) {
28711
+ if (typeof message !== "object" || message === null)
28712
+ return "object expected";
28713
+ if (long === undefined)
28714
+ long = 0;
28715
+ if (long > $util.recursionLimit)
28716
+ return "maximum nesting depth exceeded";
28717
+ if (message.target != null && Object.hasOwnProperty.call(message, "target")) {
28718
+ let error = $root.sqlanvil.Target.verify(message.target, long + 1);
28719
+ if (error)
28720
+ return "target." + error;
28721
+ }
28722
+ if (message.canonicalTarget != null && Object.hasOwnProperty.call(message, "canonicalTarget")) {
28723
+ let error = $root.sqlanvil.Target.verify(message.canonicalTarget, long + 1);
28724
+ if (error)
28725
+ return "canonicalTarget." + error;
28726
+ }
28727
+ if (message.dependencyTargets != null && Object.hasOwnProperty.call(message, "dependencyTargets")) {
28728
+ if (!Array.isArray(message.dependencyTargets))
28729
+ return "dependencyTargets: array expected";
28730
+ for (let i = 0; i < message.dependencyTargets.length; ++i) {
28731
+ let error = $root.sqlanvil.Target.verify(message.dependencyTargets[i], long + 1);
28732
+ if (error)
28733
+ return "dependencyTargets." + error;
28734
+ }
28735
+ }
28736
+ if (message.hermeticity != null && Object.hasOwnProperty.call(message, "hermeticity"))
28737
+ switch (message.hermeticity) {
28738
+ default:
28739
+ return "hermeticity: enum value expected";
28740
+ case 0:
28741
+ case 1:
28742
+ case 2:
28743
+ break;
28744
+ }
28745
+ if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled"))
28746
+ if (typeof message.disabled !== "boolean")
28747
+ return "disabled: boolean expected";
28748
+ if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) {
28749
+ if (!Array.isArray(message.tags))
28750
+ return "tags: array expected";
28751
+ for (let i = 0; i < message.tags.length; ++i)
28752
+ if (!$util.isString(message.tags[i]))
28753
+ return "tags: string[] expected";
28754
+ }
28755
+ if (message.actionDescriptor != null && Object.hasOwnProperty.call(message, "actionDescriptor")) {
28756
+ let error = $root.sqlanvil.ActionDescriptor.verify(message.actionDescriptor, long + 1);
28757
+ if (error)
28758
+ return "actionDescriptor." + error;
28759
+ }
28760
+ if (message.language != null && Object.hasOwnProperty.call(message, "language"))
28761
+ if (!$util.isString(message.language))
28762
+ return "language: string expected";
28763
+ if (message.scriptFilename != null && Object.hasOwnProperty.call(message, "scriptFilename"))
28764
+ if (!$util.isString(message.scriptFilename))
28765
+ return "scriptFilename: string expected";
28766
+ if (message.args != null && Object.hasOwnProperty.call(message, "args")) {
28767
+ if (!Array.isArray(message.args))
28768
+ return "args: array expected";
28769
+ for (let i = 0; i < message.args.length; ++i)
28770
+ if (!$util.isString(message.args[i]))
28771
+ return "args: string[] expected";
28772
+ }
28773
+ if (message.depsFile != null && Object.hasOwnProperty.call(message, "depsFile"))
28774
+ if (!$util.isString(message.depsFile))
28775
+ return "depsFile: string expected";
28776
+ if (message.runtimeVersion != null && Object.hasOwnProperty.call(message, "runtimeVersion"))
28777
+ if (!$util.isString(message.runtimeVersion))
28778
+ return "runtimeVersion: string expected";
28779
+ if (message.envRoot != null && Object.hasOwnProperty.call(message, "envRoot"))
28780
+ if (!$util.isString(message.envRoot))
28781
+ return "envRoot: string expected";
28782
+ if (message.timeoutMillis != null && Object.hasOwnProperty.call(message, "timeoutMillis"))
28783
+ if (!$util.isInteger(message.timeoutMillis))
28784
+ return "timeoutMillis: integer expected";
28785
+ if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName"))
28786
+ if (!$util.isString(message.fileName))
28787
+ return "fileName: string expected";
28788
+ return null;
28789
+ };
28790
+
28791
+ /**
28792
+ * Creates a Script message from a plain object. Also converts values to their respective internal types.
28793
+ * @function fromObject
28794
+ * @memberof sqlanvil.Script
28795
+ * @static
28796
+ * @param {Object.<string,*>} object Plain object
28797
+ * @returns {sqlanvil.Script} Script
28798
+ */
28799
+ Script.fromObject = function fromObject(object, long) {
28800
+ if (object instanceof $root.sqlanvil.Script)
28801
+ return object;
28802
+ if (!$util.isObject(object))
28803
+ throw TypeError(".sqlanvil.Script: object expected");
28804
+ if (long === undefined)
28805
+ long = 0;
28806
+ if (long > $util.recursionLimit)
28807
+ throw Error("maximum nesting depth exceeded");
28808
+ let message = new $root.sqlanvil.Script();
28809
+ if (object.target != null) {
28810
+ if (!$util.isObject(object.target))
28811
+ throw TypeError(".sqlanvil.Script.target: object expected");
28812
+ message.target = $root.sqlanvil.Target.fromObject(object.target, long + 1);
28813
+ }
28814
+ if (object.canonicalTarget != null) {
28815
+ if (!$util.isObject(object.canonicalTarget))
28816
+ throw TypeError(".sqlanvil.Script.canonicalTarget: object expected");
28817
+ message.canonicalTarget = $root.sqlanvil.Target.fromObject(object.canonicalTarget, long + 1);
28818
+ }
28819
+ if (object.dependencyTargets) {
28820
+ if (!Array.isArray(object.dependencyTargets))
28821
+ throw TypeError(".sqlanvil.Script.dependencyTargets: array expected");
28822
+ message.dependencyTargets = [];
28823
+ for (let i = 0; i < object.dependencyTargets.length; ++i) {
28824
+ if (!$util.isObject(object.dependencyTargets[i]))
28825
+ throw TypeError(".sqlanvil.Script.dependencyTargets: object expected");
28826
+ message.dependencyTargets[i] = $root.sqlanvil.Target.fromObject(object.dependencyTargets[i], long + 1);
28827
+ }
28828
+ }
28829
+ switch (object.hermeticity) {
28830
+ default:
28831
+ if (typeof object.hermeticity === "number") {
28832
+ message.hermeticity = object.hermeticity;
28833
+ break;
28834
+ }
28835
+ break;
28836
+ case "UNKNOWN":
28837
+ case 0:
28838
+ message.hermeticity = 0;
28839
+ break;
28840
+ case "HERMETIC":
28841
+ case 1:
28842
+ message.hermeticity = 1;
28843
+ break;
28844
+ case "NON_HERMETIC":
28845
+ case 2:
28846
+ message.hermeticity = 2;
28847
+ break;
28848
+ }
28849
+ if (object.disabled != null)
28850
+ message.disabled = Boolean(object.disabled);
28851
+ if (object.tags) {
28852
+ if (!Array.isArray(object.tags))
28853
+ throw TypeError(".sqlanvil.Script.tags: array expected");
28854
+ message.tags = [];
28855
+ for (let i = 0; i < object.tags.length; ++i)
28856
+ message.tags[i] = String(object.tags[i]);
28857
+ }
28858
+ if (object.actionDescriptor != null) {
28859
+ if (!$util.isObject(object.actionDescriptor))
28860
+ throw TypeError(".sqlanvil.Script.actionDescriptor: object expected");
28861
+ message.actionDescriptor = $root.sqlanvil.ActionDescriptor.fromObject(object.actionDescriptor, long + 1);
28862
+ }
28863
+ if (object.language != null)
28864
+ message.language = String(object.language);
28865
+ if (object.scriptFilename != null)
28866
+ message.scriptFilename = String(object.scriptFilename);
28867
+ if (object.args) {
28868
+ if (!Array.isArray(object.args))
28869
+ throw TypeError(".sqlanvil.Script.args: array expected");
28870
+ message.args = [];
28871
+ for (let i = 0; i < object.args.length; ++i)
28872
+ message.args[i] = String(object.args[i]);
28873
+ }
28874
+ if (object.depsFile != null)
28875
+ message.depsFile = String(object.depsFile);
28876
+ if (object.runtimeVersion != null)
28877
+ message.runtimeVersion = String(object.runtimeVersion);
28878
+ if (object.envRoot != null)
28879
+ message.envRoot = String(object.envRoot);
28880
+ if (object.timeoutMillis != null)
28881
+ message.timeoutMillis = object.timeoutMillis | 0;
28882
+ if (object.fileName != null)
28883
+ message.fileName = String(object.fileName);
28884
+ return message;
28885
+ };
28886
+
28887
+ /**
28888
+ * Creates a plain object from a Script message. Also converts values to other types if specified.
28889
+ * @function toObject
28890
+ * @memberof sqlanvil.Script
28891
+ * @static
28892
+ * @param {sqlanvil.Script} message Script
28893
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
28894
+ * @returns {Object.<string,*>} Plain object
28895
+ */
28896
+ Script.toObject = function toObject(message, options, q) {
28897
+ if (!options)
28898
+ options = {};
28899
+ if (q === undefined)
28900
+ q = 0;
28901
+ if (q > $util.recursionLimit)
28902
+ throw Error("max depth exceeded");
28903
+ let object = {};
28904
+ if (options.arrays || options.defaults) {
28905
+ object.dependencyTargets = [];
28906
+ object.tags = [];
28907
+ object.args = [];
28908
+ }
28909
+ if (options.defaults) {
28910
+ object.target = null;
28911
+ object.canonicalTarget = null;
28912
+ object.hermeticity = options.enums === String ? "UNKNOWN" : 0;
28913
+ object.disabled = false;
28914
+ object.actionDescriptor = null;
28915
+ object.language = "";
28916
+ object.scriptFilename = "";
28917
+ object.depsFile = "";
28918
+ object.runtimeVersion = "";
28919
+ object.envRoot = "";
28920
+ object.timeoutMillis = 0;
28921
+ object.fileName = "";
28922
+ }
28923
+ if (message.target != null && Object.hasOwnProperty.call(message, "target"))
28924
+ object.target = $root.sqlanvil.Target.toObject(message.target, options, q + 1);
28925
+ if (message.canonicalTarget != null && Object.hasOwnProperty.call(message, "canonicalTarget"))
28926
+ object.canonicalTarget = $root.sqlanvil.Target.toObject(message.canonicalTarget, options, q + 1);
28927
+ if (message.dependencyTargets && message.dependencyTargets.length) {
28928
+ object.dependencyTargets = [];
28929
+ for (let j = 0; j < message.dependencyTargets.length; ++j)
28930
+ object.dependencyTargets[j] = $root.sqlanvil.Target.toObject(message.dependencyTargets[j], options, q + 1);
28931
+ }
28932
+ if (message.hermeticity != null && Object.hasOwnProperty.call(message, "hermeticity"))
28933
+ object.hermeticity = options.enums === String ? $root.sqlanvil.ActionHermeticity[message.hermeticity] === undefined ? message.hermeticity : $root.sqlanvil.ActionHermeticity[message.hermeticity] : message.hermeticity;
28934
+ if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled"))
28935
+ object.disabled = message.disabled;
28936
+ if (message.tags && message.tags.length) {
28937
+ object.tags = [];
28938
+ for (let j = 0; j < message.tags.length; ++j)
28939
+ object.tags[j] = message.tags[j];
28940
+ }
28941
+ if (message.actionDescriptor != null && Object.hasOwnProperty.call(message, "actionDescriptor"))
28942
+ object.actionDescriptor = $root.sqlanvil.ActionDescriptor.toObject(message.actionDescriptor, options, q + 1);
28943
+ if (message.language != null && Object.hasOwnProperty.call(message, "language"))
28944
+ object.language = message.language;
28945
+ if (message.scriptFilename != null && Object.hasOwnProperty.call(message, "scriptFilename"))
28946
+ object.scriptFilename = message.scriptFilename;
28947
+ if (message.args && message.args.length) {
28948
+ object.args = [];
28949
+ for (let j = 0; j < message.args.length; ++j)
28950
+ object.args[j] = message.args[j];
28951
+ }
28952
+ if (message.depsFile != null && Object.hasOwnProperty.call(message, "depsFile"))
28953
+ object.depsFile = message.depsFile;
28954
+ if (message.runtimeVersion != null && Object.hasOwnProperty.call(message, "runtimeVersion"))
28955
+ object.runtimeVersion = message.runtimeVersion;
28956
+ if (message.envRoot != null && Object.hasOwnProperty.call(message, "envRoot"))
28957
+ object.envRoot = message.envRoot;
28958
+ if (message.timeoutMillis != null && Object.hasOwnProperty.call(message, "timeoutMillis"))
28959
+ object.timeoutMillis = message.timeoutMillis;
27623
28960
  if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName"))
27624
28961
  object.fileName = message.fileName;
27625
- if (message.database != null && Object.hasOwnProperty.call(message, "database"))
27626
- object.database = message.database;
27627
28962
  return object;
27628
28963
  };
27629
28964
 
27630
28965
  /**
27631
- * Converts this Extract to JSON.
28966
+ * Converts this Script to JSON.
27632
28967
  * @function toJSON
27633
- * @memberof sqlanvil.Extract
28968
+ * @memberof sqlanvil.Script
27634
28969
  * @instance
27635
28970
  * @returns {Object.<string,*>} JSON object
27636
28971
  */
27637
- Extract.prototype.toJSON = function toJSON() {
28972
+ Script.prototype.toJSON = function toJSON() {
27638
28973
  return this.constructor.toObject(this, $protobuf__namespace.util.toJSONOptions);
27639
28974
  };
27640
28975
 
27641
28976
  /**
27642
- * Gets the default type url for Extract
28977
+ * Gets the default type url for Script
27643
28978
  * @function getTypeUrl
27644
- * @memberof sqlanvil.Extract
28979
+ * @memberof sqlanvil.Script
27645
28980
  * @static
27646
28981
  * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
27647
28982
  * @returns {string} The default type url
27648
28983
  */
27649
- Extract.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
28984
+ Script.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
27650
28985
  if (typeUrlPrefix === undefined) {
27651
28986
  typeUrlPrefix = "type.googleapis.com";
27652
28987
  }
27653
- return typeUrlPrefix + "/sqlanvil.Extract";
28988
+ return typeUrlPrefix + "/sqlanvil.Script";
27654
28989
  };
27655
28990
 
27656
- return Extract;
28991
+ return Script;
27657
28992
  })();
27658
28993
 
27659
28994
  sqlanvil.Assertion = (function() {
@@ -31733,6 +33068,7 @@ const sqlanvil = $root.sqlanvil = (() => {
31733
33068
  * @property {Array.<sqlanvil.IExport>|null} [exports] CompiledGraph exports
31734
33069
  * @property {Array.<sqlanvil.IImport>|null} [imports] CompiledGraph imports
31735
33070
  * @property {Array.<sqlanvil.IExtract>|null} [extracts] CompiledGraph extracts
33071
+ * @property {Array.<sqlanvil.IScript>|null} [scripts] CompiledGraph scripts
31736
33072
  * @property {sqlanvil.IGraphErrors|null} [graphErrors] CompiledGraph graphErrors
31737
33073
  * @property {string|null} [sqlanvilCoreVersion] CompiledGraph sqlanvilCoreVersion
31738
33074
  * @property {Array.<sqlanvil.ITarget>|null} [targets] CompiledGraph targets
@@ -31758,6 +33094,7 @@ const sqlanvil = $root.sqlanvil = (() => {
31758
33094
  this.exports = [];
31759
33095
  this.imports = [];
31760
33096
  this.extracts = [];
33097
+ this.scripts = [];
31761
33098
  this.targets = [];
31762
33099
  if (properties)
31763
33100
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
@@ -31853,6 +33190,14 @@ const sqlanvil = $root.sqlanvil = (() => {
31853
33190
  */
31854
33191
  CompiledGraph.prototype.extracts = $util.emptyArray;
31855
33192
 
33193
+ /**
33194
+ * CompiledGraph scripts.
33195
+ * @member {Array.<sqlanvil.IScript>} scripts
33196
+ * @memberof sqlanvil.CompiledGraph
33197
+ * @instance
33198
+ */
33199
+ CompiledGraph.prototype.scripts = $util.emptyArray;
33200
+
31856
33201
  /**
31857
33202
  * CompiledGraph graphErrors.
31858
33203
  * @member {sqlanvil.IGraphErrors|null|undefined} graphErrors
@@ -31954,6 +33299,9 @@ const sqlanvil = $root.sqlanvil = (() => {
31954
33299
  if (message.extracts != null && message.extracts.length)
31955
33300
  for (let i = 0; i < message.extracts.length; ++i)
31956
33301
  $root.sqlanvil.Extract.encode(message.extracts[i], writer.uint32(/* id 17, wireType 2 =*/138).fork(), q + 1).ldelim();
33302
+ if (message.scripts != null && message.scripts.length)
33303
+ for (let i = 0; i < message.scripts.length; ++i)
33304
+ $root.sqlanvil.Script.encode(message.scripts[i], writer.uint32(/* id 18, wireType 2 =*/146).fork(), q + 1).ldelim();
31957
33305
  return writer;
31958
33306
  };
31959
33307
 
@@ -32058,6 +33406,12 @@ const sqlanvil = $root.sqlanvil = (() => {
32058
33406
  message.extracts.push($root.sqlanvil.Extract.decode(reader, reader.uint32(), undefined, long + 1));
32059
33407
  break;
32060
33408
  }
33409
+ case 18: {
33410
+ if (!(message.scripts && message.scripts.length))
33411
+ message.scripts = [];
33412
+ message.scripts.push($root.sqlanvil.Script.decode(reader, reader.uint32(), undefined, long + 1));
33413
+ break;
33414
+ }
32061
33415
  case 7: {
32062
33416
  message.graphErrors = $root.sqlanvil.GraphErrors.decode(reader, reader.uint32(), undefined, long + 1);
32063
33417
  break;
@@ -32210,6 +33564,15 @@ const sqlanvil = $root.sqlanvil = (() => {
32210
33564
  return "extracts." + error;
32211
33565
  }
32212
33566
  }
33567
+ if (message.scripts != null && Object.hasOwnProperty.call(message, "scripts")) {
33568
+ if (!Array.isArray(message.scripts))
33569
+ return "scripts: array expected";
33570
+ for (let i = 0; i < message.scripts.length; ++i) {
33571
+ let error = $root.sqlanvil.Script.verify(message.scripts[i], long + 1);
33572
+ if (error)
33573
+ return "scripts." + error;
33574
+ }
33575
+ }
32213
33576
  if (message.graphErrors != null && Object.hasOwnProperty.call(message, "graphErrors")) {
32214
33577
  let error = $root.sqlanvil.GraphErrors.verify(message.graphErrors, long + 1);
32215
33578
  if (error)
@@ -32358,6 +33721,16 @@ const sqlanvil = $root.sqlanvil = (() => {
32358
33721
  message.extracts[i] = $root.sqlanvil.Extract.fromObject(object.extracts[i], long + 1);
32359
33722
  }
32360
33723
  }
33724
+ if (object.scripts) {
33725
+ if (!Array.isArray(object.scripts))
33726
+ throw TypeError(".sqlanvil.CompiledGraph.scripts: array expected");
33727
+ message.scripts = [];
33728
+ for (let i = 0; i < object.scripts.length; ++i) {
33729
+ if (!$util.isObject(object.scripts[i]))
33730
+ throw TypeError(".sqlanvil.CompiledGraph.scripts: object expected");
33731
+ message.scripts[i] = $root.sqlanvil.Script.fromObject(object.scripts[i], long + 1);
33732
+ }
33733
+ }
32361
33734
  if (object.graphErrors != null) {
32362
33735
  if (!$util.isObject(object.graphErrors))
32363
33736
  throw TypeError(".sqlanvil.CompiledGraph.graphErrors: object expected");
@@ -32412,6 +33785,7 @@ const sqlanvil = $root.sqlanvil = (() => {
32412
33785
  object.exports = [];
32413
33786
  object.imports = [];
32414
33787
  object.extracts = [];
33788
+ object.scripts = [];
32415
33789
  }
32416
33790
  if (options.defaults) {
32417
33791
  object.projectConfig = null;
@@ -32482,6 +33856,11 @@ const sqlanvil = $root.sqlanvil = (() => {
32482
33856
  for (let j = 0; j < message.extracts.length; ++j)
32483
33857
  object.extracts[j] = $root.sqlanvil.Extract.toObject(message.extracts[j], options, q + 1);
32484
33858
  }
33859
+ if (message.scripts && message.scripts.length) {
33860
+ object.scripts = [];
33861
+ for (let j = 0; j < message.scripts.length; ++j)
33862
+ object.scripts[j] = $root.sqlanvil.Script.toObject(message.scripts[j], options, q + 1);
33863
+ }
32485
33864
  return object;
32486
33865
  };
32487
33866
 
@@ -38225,6 +39604,389 @@ const sqlanvil = $root.sqlanvil = (() => {
38225
39604
  return ExtractSpec;
38226
39605
  })();
38227
39606
 
39607
+ sqlanvil.ScriptSpec = (function() {
39608
+
39609
+ /**
39610
+ * Properties of a ScriptSpec.
39611
+ * @memberof sqlanvil
39612
+ * @interface IScriptSpec
39613
+ * @property {string|null} [language] ScriptSpec language
39614
+ * @property {string|null} [filename] ScriptSpec filename
39615
+ * @property {Array.<string>|null} [args] ScriptSpec args
39616
+ * @property {string|null} [depsFile] ScriptSpec depsFile
39617
+ * @property {string|null} [runtimeVersion] ScriptSpec runtimeVersion
39618
+ * @property {string|null} [envRoot] ScriptSpec envRoot
39619
+ * @property {number|null} [timeoutMillis] ScriptSpec timeoutMillis
39620
+ */
39621
+
39622
+ /**
39623
+ * Constructs a new ScriptSpec.
39624
+ * @memberof sqlanvil
39625
+ * @classdesc Represents a ScriptSpec.
39626
+ * @implements IScriptSpec
39627
+ * @constructor
39628
+ * @param {sqlanvil.IScriptSpec=} [properties] Properties to set
39629
+ */
39630
+ function ScriptSpec(properties) {
39631
+ this.args = [];
39632
+ if (properties)
39633
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
39634
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
39635
+ this[keys[i]] = properties[keys[i]];
39636
+ }
39637
+
39638
+ /**
39639
+ * ScriptSpec language.
39640
+ * @member {string} language
39641
+ * @memberof sqlanvil.ScriptSpec
39642
+ * @instance
39643
+ */
39644
+ ScriptSpec.prototype.language = "";
39645
+
39646
+ /**
39647
+ * ScriptSpec filename.
39648
+ * @member {string} filename
39649
+ * @memberof sqlanvil.ScriptSpec
39650
+ * @instance
39651
+ */
39652
+ ScriptSpec.prototype.filename = "";
39653
+
39654
+ /**
39655
+ * ScriptSpec args.
39656
+ * @member {Array.<string>} args
39657
+ * @memberof sqlanvil.ScriptSpec
39658
+ * @instance
39659
+ */
39660
+ ScriptSpec.prototype.args = $util.emptyArray;
39661
+
39662
+ /**
39663
+ * ScriptSpec depsFile.
39664
+ * @member {string} depsFile
39665
+ * @memberof sqlanvil.ScriptSpec
39666
+ * @instance
39667
+ */
39668
+ ScriptSpec.prototype.depsFile = "";
39669
+
39670
+ /**
39671
+ * ScriptSpec runtimeVersion.
39672
+ * @member {string} runtimeVersion
39673
+ * @memberof sqlanvil.ScriptSpec
39674
+ * @instance
39675
+ */
39676
+ ScriptSpec.prototype.runtimeVersion = "";
39677
+
39678
+ /**
39679
+ * ScriptSpec envRoot.
39680
+ * @member {string} envRoot
39681
+ * @memberof sqlanvil.ScriptSpec
39682
+ * @instance
39683
+ */
39684
+ ScriptSpec.prototype.envRoot = "";
39685
+
39686
+ /**
39687
+ * ScriptSpec timeoutMillis.
39688
+ * @member {number} timeoutMillis
39689
+ * @memberof sqlanvil.ScriptSpec
39690
+ * @instance
39691
+ */
39692
+ ScriptSpec.prototype.timeoutMillis = 0;
39693
+
39694
+ /**
39695
+ * Creates a new ScriptSpec instance using the specified properties.
39696
+ * @function create
39697
+ * @memberof sqlanvil.ScriptSpec
39698
+ * @static
39699
+ * @param {sqlanvil.IScriptSpec=} [properties] Properties to set
39700
+ * @returns {sqlanvil.ScriptSpec} ScriptSpec instance
39701
+ */
39702
+ ScriptSpec.create = function create(properties) {
39703
+ return new ScriptSpec(properties);
39704
+ };
39705
+
39706
+ /**
39707
+ * Encodes the specified ScriptSpec message. Does not implicitly {@link sqlanvil.ScriptSpec.verify|verify} messages.
39708
+ * @function encode
39709
+ * @memberof sqlanvil.ScriptSpec
39710
+ * @static
39711
+ * @param {sqlanvil.IScriptSpec} message ScriptSpec message or plain object to encode
39712
+ * @param {$protobuf.Writer} [writer] Writer to encode to
39713
+ * @returns {$protobuf.Writer} Writer
39714
+ */
39715
+ ScriptSpec.encode = function encode(message, writer, q) {
39716
+ if (!writer)
39717
+ writer = $Writer.create();
39718
+ if (q === undefined)
39719
+ q = 0;
39720
+ if (q > $util.recursionLimit)
39721
+ throw Error("max depth exceeded");
39722
+ if (message.language != null && Object.hasOwnProperty.call(message, "language"))
39723
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.language);
39724
+ if (message.filename != null && Object.hasOwnProperty.call(message, "filename"))
39725
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.filename);
39726
+ if (message.args != null && message.args.length)
39727
+ for (let i = 0; i < message.args.length; ++i)
39728
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.args[i]);
39729
+ if (message.depsFile != null && Object.hasOwnProperty.call(message, "depsFile"))
39730
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.depsFile);
39731
+ if (message.runtimeVersion != null && Object.hasOwnProperty.call(message, "runtimeVersion"))
39732
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.runtimeVersion);
39733
+ if (message.envRoot != null && Object.hasOwnProperty.call(message, "envRoot"))
39734
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.envRoot);
39735
+ if (message.timeoutMillis != null && Object.hasOwnProperty.call(message, "timeoutMillis"))
39736
+ writer.uint32(/* id 7, wireType 0 =*/56).int32(message.timeoutMillis);
39737
+ return writer;
39738
+ };
39739
+
39740
+ /**
39741
+ * Encodes the specified ScriptSpec message, length delimited. Does not implicitly {@link sqlanvil.ScriptSpec.verify|verify} messages.
39742
+ * @function encodeDelimited
39743
+ * @memberof sqlanvil.ScriptSpec
39744
+ * @static
39745
+ * @param {sqlanvil.IScriptSpec} message ScriptSpec message or plain object to encode
39746
+ * @param {$protobuf.Writer} [writer] Writer to encode to
39747
+ * @returns {$protobuf.Writer} Writer
39748
+ */
39749
+ ScriptSpec.encodeDelimited = function encodeDelimited(message, writer) {
39750
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
39751
+ };
39752
+
39753
+ /**
39754
+ * Decodes a ScriptSpec message from the specified reader or buffer.
39755
+ * @function decode
39756
+ * @memberof sqlanvil.ScriptSpec
39757
+ * @static
39758
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
39759
+ * @param {number} [length] Message length if known beforehand
39760
+ * @returns {sqlanvil.ScriptSpec} ScriptSpec
39761
+ * @throws {Error} If the payload is not a reader or valid buffer
39762
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
39763
+ */
39764
+ ScriptSpec.decode = function decode(reader, length, error, long) {
39765
+ if (!(reader instanceof $Reader))
39766
+ reader = $Reader.create(reader);
39767
+ if (long === undefined)
39768
+ long = 0;
39769
+ if (long > $Reader.recursionLimit)
39770
+ throw Error("maximum nesting depth exceeded");
39771
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.ScriptSpec();
39772
+ while (reader.pos < end) {
39773
+ let tag = reader.uint32();
39774
+ if (tag === error)
39775
+ break;
39776
+ switch (tag >>> 3) {
39777
+ case 1: {
39778
+ message.language = reader.string();
39779
+ break;
39780
+ }
39781
+ case 2: {
39782
+ message.filename = reader.string();
39783
+ break;
39784
+ }
39785
+ case 3: {
39786
+ if (!(message.args && message.args.length))
39787
+ message.args = [];
39788
+ message.args.push(reader.string());
39789
+ break;
39790
+ }
39791
+ case 4: {
39792
+ message.depsFile = reader.string();
39793
+ break;
39794
+ }
39795
+ case 5: {
39796
+ message.runtimeVersion = reader.string();
39797
+ break;
39798
+ }
39799
+ case 6: {
39800
+ message.envRoot = reader.string();
39801
+ break;
39802
+ }
39803
+ case 7: {
39804
+ message.timeoutMillis = reader.int32();
39805
+ break;
39806
+ }
39807
+ default:
39808
+ reader.skipType(tag & 7, long);
39809
+ break;
39810
+ }
39811
+ }
39812
+ return message;
39813
+ };
39814
+
39815
+ /**
39816
+ * Decodes a ScriptSpec message from the specified reader or buffer, length delimited.
39817
+ * @function decodeDelimited
39818
+ * @memberof sqlanvil.ScriptSpec
39819
+ * @static
39820
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
39821
+ * @returns {sqlanvil.ScriptSpec} ScriptSpec
39822
+ * @throws {Error} If the payload is not a reader or valid buffer
39823
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
39824
+ */
39825
+ ScriptSpec.decodeDelimited = function decodeDelimited(reader) {
39826
+ if (!(reader instanceof $Reader))
39827
+ reader = new $Reader(reader);
39828
+ return this.decode(reader, reader.uint32());
39829
+ };
39830
+
39831
+ /**
39832
+ * Verifies a ScriptSpec message.
39833
+ * @function verify
39834
+ * @memberof sqlanvil.ScriptSpec
39835
+ * @static
39836
+ * @param {Object.<string,*>} message Plain object to verify
39837
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
39838
+ */
39839
+ ScriptSpec.verify = function verify(message, long) {
39840
+ if (typeof message !== "object" || message === null)
39841
+ return "object expected";
39842
+ if (long === undefined)
39843
+ long = 0;
39844
+ if (long > $util.recursionLimit)
39845
+ return "maximum nesting depth exceeded";
39846
+ if (message.language != null && Object.hasOwnProperty.call(message, "language"))
39847
+ if (!$util.isString(message.language))
39848
+ return "language: string expected";
39849
+ if (message.filename != null && Object.hasOwnProperty.call(message, "filename"))
39850
+ if (!$util.isString(message.filename))
39851
+ return "filename: string expected";
39852
+ if (message.args != null && Object.hasOwnProperty.call(message, "args")) {
39853
+ if (!Array.isArray(message.args))
39854
+ return "args: array expected";
39855
+ for (let i = 0; i < message.args.length; ++i)
39856
+ if (!$util.isString(message.args[i]))
39857
+ return "args: string[] expected";
39858
+ }
39859
+ if (message.depsFile != null && Object.hasOwnProperty.call(message, "depsFile"))
39860
+ if (!$util.isString(message.depsFile))
39861
+ return "depsFile: string expected";
39862
+ if (message.runtimeVersion != null && Object.hasOwnProperty.call(message, "runtimeVersion"))
39863
+ if (!$util.isString(message.runtimeVersion))
39864
+ return "runtimeVersion: string expected";
39865
+ if (message.envRoot != null && Object.hasOwnProperty.call(message, "envRoot"))
39866
+ if (!$util.isString(message.envRoot))
39867
+ return "envRoot: string expected";
39868
+ if (message.timeoutMillis != null && Object.hasOwnProperty.call(message, "timeoutMillis"))
39869
+ if (!$util.isInteger(message.timeoutMillis))
39870
+ return "timeoutMillis: integer expected";
39871
+ return null;
39872
+ };
39873
+
39874
+ /**
39875
+ * Creates a ScriptSpec message from a plain object. Also converts values to their respective internal types.
39876
+ * @function fromObject
39877
+ * @memberof sqlanvil.ScriptSpec
39878
+ * @static
39879
+ * @param {Object.<string,*>} object Plain object
39880
+ * @returns {sqlanvil.ScriptSpec} ScriptSpec
39881
+ */
39882
+ ScriptSpec.fromObject = function fromObject(object, long) {
39883
+ if (object instanceof $root.sqlanvil.ScriptSpec)
39884
+ return object;
39885
+ if (!$util.isObject(object))
39886
+ throw TypeError(".sqlanvil.ScriptSpec: object expected");
39887
+ if (long === undefined)
39888
+ long = 0;
39889
+ if (long > $util.recursionLimit)
39890
+ throw Error("maximum nesting depth exceeded");
39891
+ let message = new $root.sqlanvil.ScriptSpec();
39892
+ if (object.language != null)
39893
+ message.language = String(object.language);
39894
+ if (object.filename != null)
39895
+ message.filename = String(object.filename);
39896
+ if (object.args) {
39897
+ if (!Array.isArray(object.args))
39898
+ throw TypeError(".sqlanvil.ScriptSpec.args: array expected");
39899
+ message.args = [];
39900
+ for (let i = 0; i < object.args.length; ++i)
39901
+ message.args[i] = String(object.args[i]);
39902
+ }
39903
+ if (object.depsFile != null)
39904
+ message.depsFile = String(object.depsFile);
39905
+ if (object.runtimeVersion != null)
39906
+ message.runtimeVersion = String(object.runtimeVersion);
39907
+ if (object.envRoot != null)
39908
+ message.envRoot = String(object.envRoot);
39909
+ if (object.timeoutMillis != null)
39910
+ message.timeoutMillis = object.timeoutMillis | 0;
39911
+ return message;
39912
+ };
39913
+
39914
+ /**
39915
+ * Creates a plain object from a ScriptSpec message. Also converts values to other types if specified.
39916
+ * @function toObject
39917
+ * @memberof sqlanvil.ScriptSpec
39918
+ * @static
39919
+ * @param {sqlanvil.ScriptSpec} message ScriptSpec
39920
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
39921
+ * @returns {Object.<string,*>} Plain object
39922
+ */
39923
+ ScriptSpec.toObject = function toObject(message, options, q) {
39924
+ if (!options)
39925
+ options = {};
39926
+ if (q === undefined)
39927
+ q = 0;
39928
+ if (q > $util.recursionLimit)
39929
+ throw Error("max depth exceeded");
39930
+ let object = {};
39931
+ if (options.arrays || options.defaults)
39932
+ object.args = [];
39933
+ if (options.defaults) {
39934
+ object.language = "";
39935
+ object.filename = "";
39936
+ object.depsFile = "";
39937
+ object.runtimeVersion = "";
39938
+ object.envRoot = "";
39939
+ object.timeoutMillis = 0;
39940
+ }
39941
+ if (message.language != null && Object.hasOwnProperty.call(message, "language"))
39942
+ object.language = message.language;
39943
+ if (message.filename != null && Object.hasOwnProperty.call(message, "filename"))
39944
+ object.filename = message.filename;
39945
+ if (message.args && message.args.length) {
39946
+ object.args = [];
39947
+ for (let j = 0; j < message.args.length; ++j)
39948
+ object.args[j] = message.args[j];
39949
+ }
39950
+ if (message.depsFile != null && Object.hasOwnProperty.call(message, "depsFile"))
39951
+ object.depsFile = message.depsFile;
39952
+ if (message.runtimeVersion != null && Object.hasOwnProperty.call(message, "runtimeVersion"))
39953
+ object.runtimeVersion = message.runtimeVersion;
39954
+ if (message.envRoot != null && Object.hasOwnProperty.call(message, "envRoot"))
39955
+ object.envRoot = message.envRoot;
39956
+ if (message.timeoutMillis != null && Object.hasOwnProperty.call(message, "timeoutMillis"))
39957
+ object.timeoutMillis = message.timeoutMillis;
39958
+ return object;
39959
+ };
39960
+
39961
+ /**
39962
+ * Converts this ScriptSpec to JSON.
39963
+ * @function toJSON
39964
+ * @memberof sqlanvil.ScriptSpec
39965
+ * @instance
39966
+ * @returns {Object.<string,*>} JSON object
39967
+ */
39968
+ ScriptSpec.prototype.toJSON = function toJSON() {
39969
+ return this.constructor.toObject(this, $protobuf__namespace.util.toJSONOptions);
39970
+ };
39971
+
39972
+ /**
39973
+ * Gets the default type url for ScriptSpec
39974
+ * @function getTypeUrl
39975
+ * @memberof sqlanvil.ScriptSpec
39976
+ * @static
39977
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
39978
+ * @returns {string} The default type url
39979
+ */
39980
+ ScriptSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
39981
+ if (typeUrlPrefix === undefined) {
39982
+ typeUrlPrefix = "type.googleapis.com";
39983
+ }
39984
+ return typeUrlPrefix + "/sqlanvil.ScriptSpec";
39985
+ };
39986
+
39987
+ return ScriptSpec;
39988
+ })();
39989
+
38228
39990
  sqlanvil.ExecutionAction = (function() {
38229
39991
 
38230
39992
  /**
@@ -38243,6 +40005,7 @@ const sqlanvil = $root.sqlanvil = (() => {
38243
40005
  * @property {sqlanvil.IExportSpec|null} ["export"] ExecutionAction export
38244
40006
  * @property {sqlanvil.IImportSpec|null} ["import"] ExecutionAction import
38245
40007
  * @property {sqlanvil.IExtractSpec|null} [extract] ExecutionAction extract
40008
+ * @property {sqlanvil.IScriptSpec|null} [script] ExecutionAction script
38246
40009
  */
38247
40010
 
38248
40011
  /**
@@ -38358,6 +40121,14 @@ const sqlanvil = $root.sqlanvil = (() => {
38358
40121
  */
38359
40122
  ExecutionAction.prototype.extract = null;
38360
40123
 
40124
+ /**
40125
+ * ExecutionAction script.
40126
+ * @member {sqlanvil.IScriptSpec|null|undefined} script
40127
+ * @memberof sqlanvil.ExecutionAction
40128
+ * @instance
40129
+ */
40130
+ ExecutionAction.prototype.script = null;
40131
+
38361
40132
  /**
38362
40133
  * Creates a new ExecutionAction instance using the specified properties.
38363
40134
  * @function create
@@ -38412,6 +40183,8 @@ const sqlanvil = $root.sqlanvil = (() => {
38412
40183
  $root.sqlanvil.ImportSpec.encode(message["import"], writer.uint32(/* id 14, wireType 2 =*/114).fork(), q + 1).ldelim();
38413
40184
  if (message.extract != null && Object.hasOwnProperty.call(message, "extract"))
38414
40185
  $root.sqlanvil.ExtractSpec.encode(message.extract, writer.uint32(/* id 15, wireType 2 =*/122).fork(), q + 1).ldelim();
40186
+ if (message.script != null && Object.hasOwnProperty.call(message, "script"))
40187
+ $root.sqlanvil.ScriptSpec.encode(message.script, writer.uint32(/* id 16, wireType 2 =*/130).fork(), q + 1).ldelim();
38415
40188
  return writer;
38416
40189
  };
38417
40190
 
@@ -38504,6 +40277,10 @@ const sqlanvil = $root.sqlanvil = (() => {
38504
40277
  message.extract = $root.sqlanvil.ExtractSpec.decode(reader, reader.uint32(), undefined, long + 1);
38505
40278
  break;
38506
40279
  }
40280
+ case 16: {
40281
+ message.script = $root.sqlanvil.ScriptSpec.decode(reader, reader.uint32(), undefined, long + 1);
40282
+ break;
40283
+ }
38507
40284
  default:
38508
40285
  reader.skipType(tag & 7, long);
38509
40286
  break;
@@ -38607,6 +40384,11 @@ const sqlanvil = $root.sqlanvil = (() => {
38607
40384
  if (error)
38608
40385
  return "extract." + error;
38609
40386
  }
40387
+ if (message.script != null && Object.hasOwnProperty.call(message, "script")) {
40388
+ let error = $root.sqlanvil.ScriptSpec.verify(message.script, long + 1);
40389
+ if (error)
40390
+ return "script." + error;
40391
+ }
38610
40392
  return null;
38611
40393
  };
38612
40394
 
@@ -38701,6 +40483,11 @@ const sqlanvil = $root.sqlanvil = (() => {
38701
40483
  throw TypeError(".sqlanvil.ExecutionAction.extract: object expected");
38702
40484
  message.extract = $root.sqlanvil.ExtractSpec.fromObject(object.extract, long + 1);
38703
40485
  }
40486
+ if (object.script != null) {
40487
+ if (!$util.isObject(object.script))
40488
+ throw TypeError(".sqlanvil.ExecutionAction.script: object expected");
40489
+ message.script = $root.sqlanvil.ScriptSpec.fromObject(object.script, long + 1);
40490
+ }
38704
40491
  return message;
38705
40492
  };
38706
40493
 
@@ -38736,6 +40523,7 @@ const sqlanvil = $root.sqlanvil = (() => {
38736
40523
  object["export"] = null;
38737
40524
  object["import"] = null;
38738
40525
  object.extract = null;
40526
+ object.script = null;
38739
40527
  }
38740
40528
  if (message.tasks && message.tasks.length) {
38741
40529
  object.tasks = [];
@@ -38767,6 +40555,8 @@ const sqlanvil = $root.sqlanvil = (() => {
38767
40555
  object["import"] = $root.sqlanvil.ImportSpec.toObject(message["import"], options, q + 1);
38768
40556
  if (message.extract != null && Object.hasOwnProperty.call(message, "extract"))
38769
40557
  object.extract = $root.sqlanvil.ExtractSpec.toObject(message.extract, options, q + 1);
40558
+ if (message.script != null && Object.hasOwnProperty.call(message, "script"))
40559
+ object.script = $root.sqlanvil.ScriptSpec.toObject(message.script, options, q + 1);
38770
40560
  return object;
38771
40561
  };
38772
40562