@sqlanvil/cli 1.7.0 → 1.8.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.
- package/README.md +1 -1
- package/bundle.js +2463 -349
- package/package.json +2 -1
- package/worker_bundle.js +9638 -7741
package/bundle.js
CHANGED
|
@@ -33,6 +33,7 @@ var pg = require('pg');
|
|
|
33
33
|
var bigquery = require('@google-cloud/bigquery');
|
|
34
34
|
var EventEmitter = require('events');
|
|
35
35
|
var Long = require('long');
|
|
36
|
+
var os = require('os');
|
|
36
37
|
var promisePoolExecutor = require('promise-pool-executor');
|
|
37
38
|
var sizeof = require('object-sizeof');
|
|
38
39
|
var mysql = require('mysql2/promise');
|
|
@@ -78,6 +79,7 @@ var tmp__namespace = /*#__PURE__*/_interopNamespace(tmp);
|
|
|
78
79
|
var pg__namespace = /*#__PURE__*/_interopNamespace(pg);
|
|
79
80
|
var EventEmitter__default = /*#__PURE__*/_interopDefaultLegacy(EventEmitter);
|
|
80
81
|
var Long__default = /*#__PURE__*/_interopDefaultLegacy(Long);
|
|
82
|
+
var os__namespace = /*#__PURE__*/_interopNamespace(os);
|
|
81
83
|
var sizeof__default = /*#__PURE__*/_interopDefaultLegacy(sizeof);
|
|
82
84
|
var mysql__namespace = /*#__PURE__*/_interopNamespace(mysql);
|
|
83
85
|
var QueryStream__default = /*#__PURE__*/_interopDefaultLegacy(QueryStream);
|
|
@@ -2097,6 +2099,7 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
2097
2099
|
* @property {sqlanvil.ActionConfig.IRealtimePublicationConfig|null} [realtimePublication] ActionConfig realtimePublication
|
|
2098
2100
|
* @property {sqlanvil.ActionConfig.IForeignWrapperConfig|null} [foreignWrapper] ActionConfig foreignWrapper
|
|
2099
2101
|
* @property {sqlanvil.ActionConfig.IVectorIndexConfig|null} [vectorIndex] ActionConfig vectorIndex
|
|
2102
|
+
* @property {sqlanvil.ActionConfig.IExportConfig|null} ["export"] ActionConfig export
|
|
2100
2103
|
*/
|
|
2101
2104
|
|
|
2102
2105
|
/**
|
|
@@ -2210,17 +2213,25 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
2210
2213
|
*/
|
|
2211
2214
|
ActionConfig.prototype.vectorIndex = null;
|
|
2212
2215
|
|
|
2216
|
+
/**
|
|
2217
|
+
* ActionConfig export.
|
|
2218
|
+
* @member {sqlanvil.ActionConfig.IExportConfig|null|undefined} export
|
|
2219
|
+
* @memberof sqlanvil.ActionConfig
|
|
2220
|
+
* @instance
|
|
2221
|
+
*/
|
|
2222
|
+
ActionConfig.prototype["export"] = null;
|
|
2223
|
+
|
|
2213
2224
|
// OneOf field names bound to virtual getters and setters
|
|
2214
2225
|
let $oneOfFields;
|
|
2215
2226
|
|
|
2216
2227
|
/**
|
|
2217
2228
|
* ActionConfig action.
|
|
2218
|
-
* @member {"table"|"view"|"incrementalTable"|"assertion"|"operation"|"declaration"|"notebook"|"dataPreparation"|"rlsPolicy"|"realtimePublication"|"foreignWrapper"|"vectorIndex"|undefined} action
|
|
2229
|
+
* @member {"table"|"view"|"incrementalTable"|"assertion"|"operation"|"declaration"|"notebook"|"dataPreparation"|"rlsPolicy"|"realtimePublication"|"foreignWrapper"|"vectorIndex"|"export"|undefined} action
|
|
2219
2230
|
* @memberof sqlanvil.ActionConfig
|
|
2220
2231
|
* @instance
|
|
2221
2232
|
*/
|
|
2222
2233
|
Object.defineProperty(ActionConfig.prototype, "action", {
|
|
2223
|
-
get: $util.oneOfGetter($oneOfFields = ["table", "view", "incrementalTable", "assertion", "operation", "declaration", "notebook", "dataPreparation", "rlsPolicy", "realtimePublication", "foreignWrapper", "vectorIndex"]),
|
|
2234
|
+
get: $util.oneOfGetter($oneOfFields = ["table", "view", "incrementalTable", "assertion", "operation", "declaration", "notebook", "dataPreparation", "rlsPolicy", "realtimePublication", "foreignWrapper", "vectorIndex", "export"]),
|
|
2224
2235
|
set: $util.oneOfSetter($oneOfFields)
|
|
2225
2236
|
});
|
|
2226
2237
|
|
|
@@ -2272,6 +2283,8 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
2272
2283
|
$root.sqlanvil.ActionConfig.ForeignWrapperConfig.encode(message.foreignWrapper, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
|
|
2273
2284
|
if (message.vectorIndex != null && Object.hasOwnProperty.call(message, "vectorIndex"))
|
|
2274
2285
|
$root.sqlanvil.ActionConfig.VectorIndexConfig.encode(message.vectorIndex, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
|
|
2286
|
+
if (message["export"] != null && Object.hasOwnProperty.call(message, "export"))
|
|
2287
|
+
$root.sqlanvil.ActionConfig.ExportConfig.encode(message["export"], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
|
|
2275
2288
|
return writer;
|
|
2276
2289
|
};
|
|
2277
2290
|
|
|
@@ -2356,6 +2369,10 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
2356
2369
|
message.vectorIndex = $root.sqlanvil.ActionConfig.VectorIndexConfig.decode(reader, reader.uint32());
|
|
2357
2370
|
break;
|
|
2358
2371
|
}
|
|
2372
|
+
case 13: {
|
|
2373
|
+
message["export"] = $root.sqlanvil.ActionConfig.ExportConfig.decode(reader, reader.uint32());
|
|
2374
|
+
break;
|
|
2375
|
+
}
|
|
2359
2376
|
default:
|
|
2360
2377
|
reader.skipType(tag & 7);
|
|
2361
2378
|
break;
|
|
@@ -2510,6 +2527,16 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
2510
2527
|
return "vectorIndex." + error;
|
|
2511
2528
|
}
|
|
2512
2529
|
}
|
|
2530
|
+
if (message["export"] != null && message.hasOwnProperty("export")) {
|
|
2531
|
+
if (properties.action === 1)
|
|
2532
|
+
return "action: multiple values";
|
|
2533
|
+
properties.action = 1;
|
|
2534
|
+
{
|
|
2535
|
+
let error = $root.sqlanvil.ActionConfig.ExportConfig.verify(message["export"]);
|
|
2536
|
+
if (error)
|
|
2537
|
+
return "export." + error;
|
|
2538
|
+
}
|
|
2539
|
+
}
|
|
2513
2540
|
return null;
|
|
2514
2541
|
};
|
|
2515
2542
|
|
|
@@ -2585,6 +2612,11 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
2585
2612
|
throw TypeError(".sqlanvil.ActionConfig.vectorIndex: object expected");
|
|
2586
2613
|
message.vectorIndex = $root.sqlanvil.ActionConfig.VectorIndexConfig.fromObject(object.vectorIndex);
|
|
2587
2614
|
}
|
|
2615
|
+
if (object["export"] != null) {
|
|
2616
|
+
if (typeof object["export"] !== "object")
|
|
2617
|
+
throw TypeError(".sqlanvil.ActionConfig.export: object expected");
|
|
2618
|
+
message["export"] = $root.sqlanvil.ActionConfig.ExportConfig.fromObject(object["export"]);
|
|
2619
|
+
}
|
|
2588
2620
|
return message;
|
|
2589
2621
|
};
|
|
2590
2622
|
|
|
@@ -2661,6 +2693,11 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
2661
2693
|
if (options.oneofs)
|
|
2662
2694
|
object.action = "vectorIndex";
|
|
2663
2695
|
}
|
|
2696
|
+
if (message["export"] != null && message.hasOwnProperty("export")) {
|
|
2697
|
+
object["export"] = $root.sqlanvil.ActionConfig.ExportConfig.toObject(message["export"], options);
|
|
2698
|
+
if (options.oneofs)
|
|
2699
|
+
object.action = "export";
|
|
2700
|
+
}
|
|
2664
2701
|
return object;
|
|
2665
2702
|
};
|
|
2666
2703
|
|
|
@@ -8454,35 +8491,29 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
8454
8491
|
return OperationConfig;
|
|
8455
8492
|
})();
|
|
8456
8493
|
|
|
8457
|
-
ActionConfig.
|
|
8494
|
+
ActionConfig.ExportOptions = (function() {
|
|
8458
8495
|
|
|
8459
8496
|
/**
|
|
8460
|
-
* Properties of
|
|
8497
|
+
* Properties of an ExportOptions.
|
|
8461
8498
|
* @memberof sqlanvil.ActionConfig
|
|
8462
|
-
* @interface
|
|
8463
|
-
* @property {string|null} [
|
|
8464
|
-
* @property {string|null} [
|
|
8465
|
-
* @property {
|
|
8466
|
-
* @property {string|null} [
|
|
8467
|
-
* @property {
|
|
8468
|
-
* @property {string|null} [filename] DeclarationConfig filename
|
|
8469
|
-
* @property {Array.<string>|null} [tags] DeclarationConfig tags
|
|
8470
|
-
* @property {string|null} [connection] DeclarationConfig connection
|
|
8471
|
-
* @property {Object.<string,string>|null} [columnTypes] DeclarationConfig columnTypes
|
|
8499
|
+
* @interface IExportOptions
|
|
8500
|
+
* @property {string|null} [location] ExportOptions location
|
|
8501
|
+
* @property {string|null} [format] ExportOptions format
|
|
8502
|
+
* @property {boolean|null} [overwrite] ExportOptions overwrite
|
|
8503
|
+
* @property {string|null} [filename] ExportOptions filename
|
|
8504
|
+
* @property {Object.<string,string>|null} [options] ExportOptions options
|
|
8472
8505
|
*/
|
|
8473
8506
|
|
|
8474
8507
|
/**
|
|
8475
|
-
* Constructs a new
|
|
8508
|
+
* Constructs a new ExportOptions.
|
|
8476
8509
|
* @memberof sqlanvil.ActionConfig
|
|
8477
|
-
* @classdesc Represents
|
|
8478
|
-
* @implements
|
|
8510
|
+
* @classdesc Represents an ExportOptions.
|
|
8511
|
+
* @implements IExportOptions
|
|
8479
8512
|
* @constructor
|
|
8480
|
-
* @param {sqlanvil.ActionConfig.
|
|
8513
|
+
* @param {sqlanvil.ActionConfig.IExportOptions=} [properties] Properties to set
|
|
8481
8514
|
*/
|
|
8482
|
-
function
|
|
8483
|
-
this.
|
|
8484
|
-
this.tags = [];
|
|
8485
|
-
this.columnTypes = {};
|
|
8515
|
+
function ExportOptions(properties) {
|
|
8516
|
+
this.options = {};
|
|
8486
8517
|
if (properties)
|
|
8487
8518
|
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
8488
8519
|
if (properties[keys[i]] != null)
|
|
@@ -8490,197 +8521,135 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
8490
8521
|
}
|
|
8491
8522
|
|
|
8492
8523
|
/**
|
|
8493
|
-
*
|
|
8494
|
-
* @member {string}
|
|
8495
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8496
|
-
* @instance
|
|
8497
|
-
*/
|
|
8498
|
-
DeclarationConfig.prototype.name = "";
|
|
8499
|
-
|
|
8500
|
-
/**
|
|
8501
|
-
* DeclarationConfig dataset.
|
|
8502
|
-
* @member {string} dataset
|
|
8503
|
-
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
8504
|
-
* @instance
|
|
8505
|
-
*/
|
|
8506
|
-
DeclarationConfig.prototype.dataset = "";
|
|
8507
|
-
|
|
8508
|
-
/**
|
|
8509
|
-
* DeclarationConfig project.
|
|
8510
|
-
* @member {string} project
|
|
8511
|
-
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
8524
|
+
* ExportOptions location.
|
|
8525
|
+
* @member {string} location
|
|
8526
|
+
* @memberof sqlanvil.ActionConfig.ExportOptions
|
|
8512
8527
|
* @instance
|
|
8513
8528
|
*/
|
|
8514
|
-
|
|
8529
|
+
ExportOptions.prototype.location = "";
|
|
8515
8530
|
|
|
8516
8531
|
/**
|
|
8517
|
-
*
|
|
8518
|
-
* @member {string}
|
|
8519
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8532
|
+
* ExportOptions format.
|
|
8533
|
+
* @member {string} format
|
|
8534
|
+
* @memberof sqlanvil.ActionConfig.ExportOptions
|
|
8520
8535
|
* @instance
|
|
8521
8536
|
*/
|
|
8522
|
-
|
|
8537
|
+
ExportOptions.prototype.format = "";
|
|
8523
8538
|
|
|
8524
8539
|
/**
|
|
8525
|
-
*
|
|
8526
|
-
* @member {
|
|
8527
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8540
|
+
* ExportOptions overwrite.
|
|
8541
|
+
* @member {boolean} overwrite
|
|
8542
|
+
* @memberof sqlanvil.ActionConfig.ExportOptions
|
|
8528
8543
|
* @instance
|
|
8529
8544
|
*/
|
|
8530
|
-
|
|
8545
|
+
ExportOptions.prototype.overwrite = false;
|
|
8531
8546
|
|
|
8532
8547
|
/**
|
|
8533
|
-
*
|
|
8548
|
+
* ExportOptions filename.
|
|
8534
8549
|
* @member {string} filename
|
|
8535
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8536
|
-
* @instance
|
|
8537
|
-
*/
|
|
8538
|
-
DeclarationConfig.prototype.filename = "";
|
|
8539
|
-
|
|
8540
|
-
/**
|
|
8541
|
-
* DeclarationConfig tags.
|
|
8542
|
-
* @member {Array.<string>} tags
|
|
8543
|
-
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
8550
|
+
* @memberof sqlanvil.ActionConfig.ExportOptions
|
|
8544
8551
|
* @instance
|
|
8545
8552
|
*/
|
|
8546
|
-
|
|
8553
|
+
ExportOptions.prototype.filename = "";
|
|
8547
8554
|
|
|
8548
8555
|
/**
|
|
8549
|
-
*
|
|
8550
|
-
* @member {string}
|
|
8551
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8552
|
-
* @instance
|
|
8553
|
-
*/
|
|
8554
|
-
DeclarationConfig.prototype.connection = "";
|
|
8555
|
-
|
|
8556
|
-
/**
|
|
8557
|
-
* DeclarationConfig columnTypes.
|
|
8558
|
-
* @member {Object.<string,string>} columnTypes
|
|
8559
|
-
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
8556
|
+
* ExportOptions options.
|
|
8557
|
+
* @member {Object.<string,string>} options
|
|
8558
|
+
* @memberof sqlanvil.ActionConfig.ExportOptions
|
|
8560
8559
|
* @instance
|
|
8561
8560
|
*/
|
|
8562
|
-
|
|
8561
|
+
ExportOptions.prototype.options = $util.emptyObject;
|
|
8563
8562
|
|
|
8564
8563
|
/**
|
|
8565
|
-
* Creates a new
|
|
8564
|
+
* Creates a new ExportOptions instance using the specified properties.
|
|
8566
8565
|
* @function create
|
|
8567
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8566
|
+
* @memberof sqlanvil.ActionConfig.ExportOptions
|
|
8568
8567
|
* @static
|
|
8569
|
-
* @param {sqlanvil.ActionConfig.
|
|
8570
|
-
* @returns {sqlanvil.ActionConfig.
|
|
8568
|
+
* @param {sqlanvil.ActionConfig.IExportOptions=} [properties] Properties to set
|
|
8569
|
+
* @returns {sqlanvil.ActionConfig.ExportOptions} ExportOptions instance
|
|
8571
8570
|
*/
|
|
8572
|
-
|
|
8573
|
-
return new
|
|
8571
|
+
ExportOptions.create = function create(properties) {
|
|
8572
|
+
return new ExportOptions(properties);
|
|
8574
8573
|
};
|
|
8575
8574
|
|
|
8576
8575
|
/**
|
|
8577
|
-
* Encodes the specified
|
|
8576
|
+
* Encodes the specified ExportOptions message. Does not implicitly {@link sqlanvil.ActionConfig.ExportOptions.verify|verify} messages.
|
|
8578
8577
|
* @function encode
|
|
8579
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8578
|
+
* @memberof sqlanvil.ActionConfig.ExportOptions
|
|
8580
8579
|
* @static
|
|
8581
|
-
* @param {sqlanvil.ActionConfig.
|
|
8580
|
+
* @param {sqlanvil.ActionConfig.IExportOptions} message ExportOptions message or plain object to encode
|
|
8582
8581
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
8583
8582
|
* @returns {$protobuf.Writer} Writer
|
|
8584
8583
|
*/
|
|
8585
|
-
|
|
8584
|
+
ExportOptions.encode = function encode(message, writer) {
|
|
8586
8585
|
if (!writer)
|
|
8587
8586
|
writer = $Writer.create();
|
|
8588
|
-
if (message.
|
|
8589
|
-
writer.uint32(/* id 1, wireType 2 =*/10).string(message.
|
|
8590
|
-
if (message.
|
|
8591
|
-
writer.uint32(/* id 2, wireType 2 =*/18).string(message.
|
|
8592
|
-
if (message.
|
|
8593
|
-
writer.uint32(/* id 3, wireType
|
|
8594
|
-
if (message.description != null && Object.hasOwnProperty.call(message, "description"))
|
|
8595
|
-
writer.uint32(/* id 4, wireType 2 =*/34).string(message.description);
|
|
8596
|
-
if (message.columns != null && message.columns.length)
|
|
8597
|
-
for (let i = 0; i < message.columns.length; ++i)
|
|
8598
|
-
$root.sqlanvil.ActionConfig.ColumnDescriptor.encode(message.columns[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
8587
|
+
if (message.location != null && Object.hasOwnProperty.call(message, "location"))
|
|
8588
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.location);
|
|
8589
|
+
if (message.format != null && Object.hasOwnProperty.call(message, "format"))
|
|
8590
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.format);
|
|
8591
|
+
if (message.overwrite != null && Object.hasOwnProperty.call(message, "overwrite"))
|
|
8592
|
+
writer.uint32(/* id 3, wireType 0 =*/24).bool(message.overwrite);
|
|
8599
8593
|
if (message.filename != null && Object.hasOwnProperty.call(message, "filename"))
|
|
8600
|
-
writer.uint32(/* id
|
|
8601
|
-
if (message.
|
|
8602
|
-
for (let i = 0; i <
|
|
8603
|
-
writer.uint32(/* id
|
|
8604
|
-
if (message.connection != null && Object.hasOwnProperty.call(message, "connection"))
|
|
8605
|
-
writer.uint32(/* id 8, wireType 2 =*/66).string(message.connection);
|
|
8606
|
-
if (message.columnTypes != null && Object.hasOwnProperty.call(message, "columnTypes"))
|
|
8607
|
-
for (let keys = Object.keys(message.columnTypes), i = 0; i < keys.length; ++i)
|
|
8608
|
-
writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.columnTypes[keys[i]]).ldelim();
|
|
8594
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.filename);
|
|
8595
|
+
if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
|
8596
|
+
for (let keys = Object.keys(message.options), i = 0; i < keys.length; ++i)
|
|
8597
|
+
writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.options[keys[i]]).ldelim();
|
|
8609
8598
|
return writer;
|
|
8610
8599
|
};
|
|
8611
8600
|
|
|
8612
8601
|
/**
|
|
8613
|
-
* Encodes the specified
|
|
8602
|
+
* Encodes the specified ExportOptions message, length delimited. Does not implicitly {@link sqlanvil.ActionConfig.ExportOptions.verify|verify} messages.
|
|
8614
8603
|
* @function encodeDelimited
|
|
8615
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8604
|
+
* @memberof sqlanvil.ActionConfig.ExportOptions
|
|
8616
8605
|
* @static
|
|
8617
|
-
* @param {sqlanvil.ActionConfig.
|
|
8606
|
+
* @param {sqlanvil.ActionConfig.IExportOptions} message ExportOptions message or plain object to encode
|
|
8618
8607
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
8619
8608
|
* @returns {$protobuf.Writer} Writer
|
|
8620
8609
|
*/
|
|
8621
|
-
|
|
8610
|
+
ExportOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
|
8622
8611
|
return this.encode(message, writer).ldelim();
|
|
8623
8612
|
};
|
|
8624
8613
|
|
|
8625
8614
|
/**
|
|
8626
|
-
* Decodes
|
|
8615
|
+
* Decodes an ExportOptions message from the specified reader or buffer.
|
|
8627
8616
|
* @function decode
|
|
8628
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8617
|
+
* @memberof sqlanvil.ActionConfig.ExportOptions
|
|
8629
8618
|
* @static
|
|
8630
8619
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
8631
8620
|
* @param {number} [length] Message length if known beforehand
|
|
8632
|
-
* @returns {sqlanvil.ActionConfig.
|
|
8621
|
+
* @returns {sqlanvil.ActionConfig.ExportOptions} ExportOptions
|
|
8633
8622
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
8634
8623
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
8635
8624
|
*/
|
|
8636
|
-
|
|
8625
|
+
ExportOptions.decode = function decode(reader, length, error) {
|
|
8637
8626
|
if (!(reader instanceof $Reader))
|
|
8638
8627
|
reader = $Reader.create(reader);
|
|
8639
|
-
let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.ActionConfig.
|
|
8628
|
+
let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.ActionConfig.ExportOptions(), key, value;
|
|
8640
8629
|
while (reader.pos < end) {
|
|
8641
8630
|
let tag = reader.uint32();
|
|
8642
8631
|
if (tag === error)
|
|
8643
8632
|
break;
|
|
8644
8633
|
switch (tag >>> 3) {
|
|
8645
8634
|
case 1: {
|
|
8646
|
-
message.
|
|
8635
|
+
message.location = reader.string();
|
|
8647
8636
|
break;
|
|
8648
8637
|
}
|
|
8649
8638
|
case 2: {
|
|
8650
|
-
message.
|
|
8639
|
+
message.format = reader.string();
|
|
8651
8640
|
break;
|
|
8652
8641
|
}
|
|
8653
8642
|
case 3: {
|
|
8654
|
-
message.
|
|
8643
|
+
message.overwrite = reader.bool();
|
|
8655
8644
|
break;
|
|
8656
8645
|
}
|
|
8657
8646
|
case 4: {
|
|
8658
|
-
message.description = reader.string();
|
|
8659
|
-
break;
|
|
8660
|
-
}
|
|
8661
|
-
case 5: {
|
|
8662
|
-
if (!(message.columns && message.columns.length))
|
|
8663
|
-
message.columns = [];
|
|
8664
|
-
message.columns.push($root.sqlanvil.ActionConfig.ColumnDescriptor.decode(reader, reader.uint32()));
|
|
8665
|
-
break;
|
|
8666
|
-
}
|
|
8667
|
-
case 6: {
|
|
8668
8647
|
message.filename = reader.string();
|
|
8669
8648
|
break;
|
|
8670
8649
|
}
|
|
8671
|
-
case
|
|
8672
|
-
if (
|
|
8673
|
-
message.
|
|
8674
|
-
message.tags.push(reader.string());
|
|
8675
|
-
break;
|
|
8676
|
-
}
|
|
8677
|
-
case 8: {
|
|
8678
|
-
message.connection = reader.string();
|
|
8679
|
-
break;
|
|
8680
|
-
}
|
|
8681
|
-
case 9: {
|
|
8682
|
-
if (message.columnTypes === $util.emptyObject)
|
|
8683
|
-
message.columnTypes = {};
|
|
8650
|
+
case 5: {
|
|
8651
|
+
if (message.options === $util.emptyObject)
|
|
8652
|
+
message.options = {};
|
|
8684
8653
|
let end2 = reader.uint32() + reader.pos;
|
|
8685
8654
|
key = "";
|
|
8686
8655
|
value = "";
|
|
@@ -8698,7 +8667,7 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
8698
8667
|
break;
|
|
8699
8668
|
}
|
|
8700
8669
|
}
|
|
8701
|
-
message.
|
|
8670
|
+
message.options[key] = value;
|
|
8702
8671
|
break;
|
|
8703
8672
|
}
|
|
8704
8673
|
default:
|
|
@@ -8710,241 +8679,179 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
8710
8679
|
};
|
|
8711
8680
|
|
|
8712
8681
|
/**
|
|
8713
|
-
* Decodes
|
|
8682
|
+
* Decodes an ExportOptions message from the specified reader or buffer, length delimited.
|
|
8714
8683
|
* @function decodeDelimited
|
|
8715
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8684
|
+
* @memberof sqlanvil.ActionConfig.ExportOptions
|
|
8716
8685
|
* @static
|
|
8717
8686
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
8718
|
-
* @returns {sqlanvil.ActionConfig.
|
|
8687
|
+
* @returns {sqlanvil.ActionConfig.ExportOptions} ExportOptions
|
|
8719
8688
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
8720
8689
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
8721
8690
|
*/
|
|
8722
|
-
|
|
8691
|
+
ExportOptions.decodeDelimited = function decodeDelimited(reader) {
|
|
8723
8692
|
if (!(reader instanceof $Reader))
|
|
8724
8693
|
reader = new $Reader(reader);
|
|
8725
8694
|
return this.decode(reader, reader.uint32());
|
|
8726
8695
|
};
|
|
8727
8696
|
|
|
8728
8697
|
/**
|
|
8729
|
-
* Verifies
|
|
8698
|
+
* Verifies an ExportOptions message.
|
|
8730
8699
|
* @function verify
|
|
8731
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8700
|
+
* @memberof sqlanvil.ActionConfig.ExportOptions
|
|
8732
8701
|
* @static
|
|
8733
8702
|
* @param {Object.<string,*>} message Plain object to verify
|
|
8734
8703
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
8735
8704
|
*/
|
|
8736
|
-
|
|
8705
|
+
ExportOptions.verify = function verify(message) {
|
|
8737
8706
|
if (typeof message !== "object" || message === null)
|
|
8738
8707
|
return "object expected";
|
|
8739
|
-
if (message.
|
|
8740
|
-
if (!$util.isString(message.
|
|
8741
|
-
return "
|
|
8742
|
-
if (message.
|
|
8743
|
-
if (!$util.isString(message.
|
|
8744
|
-
return "
|
|
8745
|
-
if (message.
|
|
8746
|
-
if (
|
|
8747
|
-
return "
|
|
8748
|
-
if (message.description != null && message.hasOwnProperty("description"))
|
|
8749
|
-
if (!$util.isString(message.description))
|
|
8750
|
-
return "description: string expected";
|
|
8751
|
-
if (message.columns != null && message.hasOwnProperty("columns")) {
|
|
8752
|
-
if (!Array.isArray(message.columns))
|
|
8753
|
-
return "columns: array expected";
|
|
8754
|
-
for (let i = 0; i < message.columns.length; ++i) {
|
|
8755
|
-
let error = $root.sqlanvil.ActionConfig.ColumnDescriptor.verify(message.columns[i]);
|
|
8756
|
-
if (error)
|
|
8757
|
-
return "columns." + error;
|
|
8758
|
-
}
|
|
8759
|
-
}
|
|
8708
|
+
if (message.location != null && message.hasOwnProperty("location"))
|
|
8709
|
+
if (!$util.isString(message.location))
|
|
8710
|
+
return "location: string expected";
|
|
8711
|
+
if (message.format != null && message.hasOwnProperty("format"))
|
|
8712
|
+
if (!$util.isString(message.format))
|
|
8713
|
+
return "format: string expected";
|
|
8714
|
+
if (message.overwrite != null && message.hasOwnProperty("overwrite"))
|
|
8715
|
+
if (typeof message.overwrite !== "boolean")
|
|
8716
|
+
return "overwrite: boolean expected";
|
|
8760
8717
|
if (message.filename != null && message.hasOwnProperty("filename"))
|
|
8761
8718
|
if (!$util.isString(message.filename))
|
|
8762
8719
|
return "filename: string expected";
|
|
8763
|
-
if (message.
|
|
8764
|
-
if (
|
|
8765
|
-
return "
|
|
8766
|
-
|
|
8767
|
-
if (!$util.isString(message.tags[i]))
|
|
8768
|
-
return "tags: string[] expected";
|
|
8769
|
-
}
|
|
8770
|
-
if (message.connection != null && message.hasOwnProperty("connection"))
|
|
8771
|
-
if (!$util.isString(message.connection))
|
|
8772
|
-
return "connection: string expected";
|
|
8773
|
-
if (message.columnTypes != null && message.hasOwnProperty("columnTypes")) {
|
|
8774
|
-
if (!$util.isObject(message.columnTypes))
|
|
8775
|
-
return "columnTypes: object expected";
|
|
8776
|
-
let key = Object.keys(message.columnTypes);
|
|
8720
|
+
if (message.options != null && message.hasOwnProperty("options")) {
|
|
8721
|
+
if (!$util.isObject(message.options))
|
|
8722
|
+
return "options: object expected";
|
|
8723
|
+
let key = Object.keys(message.options);
|
|
8777
8724
|
for (let i = 0; i < key.length; ++i)
|
|
8778
|
-
if (!$util.isString(message.
|
|
8779
|
-
return "
|
|
8725
|
+
if (!$util.isString(message.options[key[i]]))
|
|
8726
|
+
return "options: string{k:string} expected";
|
|
8780
8727
|
}
|
|
8781
8728
|
return null;
|
|
8782
8729
|
};
|
|
8783
8730
|
|
|
8784
8731
|
/**
|
|
8785
|
-
* Creates
|
|
8732
|
+
* Creates an ExportOptions message from a plain object. Also converts values to their respective internal types.
|
|
8786
8733
|
* @function fromObject
|
|
8787
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8734
|
+
* @memberof sqlanvil.ActionConfig.ExportOptions
|
|
8788
8735
|
* @static
|
|
8789
8736
|
* @param {Object.<string,*>} object Plain object
|
|
8790
|
-
* @returns {sqlanvil.ActionConfig.
|
|
8737
|
+
* @returns {sqlanvil.ActionConfig.ExportOptions} ExportOptions
|
|
8791
8738
|
*/
|
|
8792
|
-
|
|
8793
|
-
if (object instanceof $root.sqlanvil.ActionConfig.
|
|
8739
|
+
ExportOptions.fromObject = function fromObject(object) {
|
|
8740
|
+
if (object instanceof $root.sqlanvil.ActionConfig.ExportOptions)
|
|
8794
8741
|
return object;
|
|
8795
|
-
let message = new $root.sqlanvil.ActionConfig.
|
|
8796
|
-
if (object.
|
|
8797
|
-
message.
|
|
8798
|
-
if (object.
|
|
8799
|
-
message.
|
|
8800
|
-
if (object.
|
|
8801
|
-
message.
|
|
8802
|
-
if (object.description != null)
|
|
8803
|
-
message.description = String(object.description);
|
|
8804
|
-
if (object.columns) {
|
|
8805
|
-
if (!Array.isArray(object.columns))
|
|
8806
|
-
throw TypeError(".sqlanvil.ActionConfig.DeclarationConfig.columns: array expected");
|
|
8807
|
-
message.columns = [];
|
|
8808
|
-
for (let i = 0; i < object.columns.length; ++i) {
|
|
8809
|
-
if (typeof object.columns[i] !== "object")
|
|
8810
|
-
throw TypeError(".sqlanvil.ActionConfig.DeclarationConfig.columns: object expected");
|
|
8811
|
-
message.columns[i] = $root.sqlanvil.ActionConfig.ColumnDescriptor.fromObject(object.columns[i]);
|
|
8812
|
-
}
|
|
8813
|
-
}
|
|
8742
|
+
let message = new $root.sqlanvil.ActionConfig.ExportOptions();
|
|
8743
|
+
if (object.location != null)
|
|
8744
|
+
message.location = String(object.location);
|
|
8745
|
+
if (object.format != null)
|
|
8746
|
+
message.format = String(object.format);
|
|
8747
|
+
if (object.overwrite != null)
|
|
8748
|
+
message.overwrite = Boolean(object.overwrite);
|
|
8814
8749
|
if (object.filename != null)
|
|
8815
8750
|
message.filename = String(object.filename);
|
|
8816
|
-
if (object.
|
|
8817
|
-
if (
|
|
8818
|
-
throw TypeError(".sqlanvil.ActionConfig.
|
|
8819
|
-
message.
|
|
8820
|
-
for (let i = 0; i <
|
|
8821
|
-
message.
|
|
8822
|
-
}
|
|
8823
|
-
if (object.connection != null)
|
|
8824
|
-
message.connection = String(object.connection);
|
|
8825
|
-
if (object.columnTypes) {
|
|
8826
|
-
if (typeof object.columnTypes !== "object")
|
|
8827
|
-
throw TypeError(".sqlanvil.ActionConfig.DeclarationConfig.columnTypes: object expected");
|
|
8828
|
-
message.columnTypes = {};
|
|
8829
|
-
for (let keys = Object.keys(object.columnTypes), i = 0; i < keys.length; ++i)
|
|
8830
|
-
message.columnTypes[keys[i]] = String(object.columnTypes[keys[i]]);
|
|
8751
|
+
if (object.options) {
|
|
8752
|
+
if (typeof object.options !== "object")
|
|
8753
|
+
throw TypeError(".sqlanvil.ActionConfig.ExportOptions.options: object expected");
|
|
8754
|
+
message.options = {};
|
|
8755
|
+
for (let keys = Object.keys(object.options), i = 0; i < keys.length; ++i)
|
|
8756
|
+
message.options[keys[i]] = String(object.options[keys[i]]);
|
|
8831
8757
|
}
|
|
8832
8758
|
return message;
|
|
8833
8759
|
};
|
|
8834
8760
|
|
|
8835
8761
|
/**
|
|
8836
|
-
* Creates a plain object from
|
|
8762
|
+
* Creates a plain object from an ExportOptions message. Also converts values to other types if specified.
|
|
8837
8763
|
* @function toObject
|
|
8838
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8764
|
+
* @memberof sqlanvil.ActionConfig.ExportOptions
|
|
8839
8765
|
* @static
|
|
8840
|
-
* @param {sqlanvil.ActionConfig.
|
|
8766
|
+
* @param {sqlanvil.ActionConfig.ExportOptions} message ExportOptions
|
|
8841
8767
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
8842
8768
|
* @returns {Object.<string,*>} Plain object
|
|
8843
8769
|
*/
|
|
8844
|
-
|
|
8770
|
+
ExportOptions.toObject = function toObject(message, options) {
|
|
8845
8771
|
if (!options)
|
|
8846
8772
|
options = {};
|
|
8847
8773
|
let object = {};
|
|
8848
|
-
if (options.arrays || options.defaults) {
|
|
8849
|
-
object.columns = [];
|
|
8850
|
-
object.tags = [];
|
|
8851
|
-
}
|
|
8852
8774
|
if (options.objects || options.defaults)
|
|
8853
|
-
object.
|
|
8775
|
+
object.options = {};
|
|
8854
8776
|
if (options.defaults) {
|
|
8855
|
-
object.
|
|
8856
|
-
object.
|
|
8857
|
-
object.
|
|
8858
|
-
object.description = "";
|
|
8777
|
+
object.location = "";
|
|
8778
|
+
object.format = "";
|
|
8779
|
+
object.overwrite = false;
|
|
8859
8780
|
object.filename = "";
|
|
8860
|
-
object.connection = "";
|
|
8861
|
-
}
|
|
8862
|
-
if (message.name != null && message.hasOwnProperty("name"))
|
|
8863
|
-
object.name = message.name;
|
|
8864
|
-
if (message.dataset != null && message.hasOwnProperty("dataset"))
|
|
8865
|
-
object.dataset = message.dataset;
|
|
8866
|
-
if (message.project != null && message.hasOwnProperty("project"))
|
|
8867
|
-
object.project = message.project;
|
|
8868
|
-
if (message.description != null && message.hasOwnProperty("description"))
|
|
8869
|
-
object.description = message.description;
|
|
8870
|
-
if (message.columns && message.columns.length) {
|
|
8871
|
-
object.columns = [];
|
|
8872
|
-
for (let j = 0; j < message.columns.length; ++j)
|
|
8873
|
-
object.columns[j] = $root.sqlanvil.ActionConfig.ColumnDescriptor.toObject(message.columns[j], options);
|
|
8874
8781
|
}
|
|
8782
|
+
if (message.location != null && message.hasOwnProperty("location"))
|
|
8783
|
+
object.location = message.location;
|
|
8784
|
+
if (message.format != null && message.hasOwnProperty("format"))
|
|
8785
|
+
object.format = message.format;
|
|
8786
|
+
if (message.overwrite != null && message.hasOwnProperty("overwrite"))
|
|
8787
|
+
object.overwrite = message.overwrite;
|
|
8875
8788
|
if (message.filename != null && message.hasOwnProperty("filename"))
|
|
8876
8789
|
object.filename = message.filename;
|
|
8877
|
-
if (message.tags && message.tags.length) {
|
|
8878
|
-
object.tags = [];
|
|
8879
|
-
for (let j = 0; j < message.tags.length; ++j)
|
|
8880
|
-
object.tags[j] = message.tags[j];
|
|
8881
|
-
}
|
|
8882
|
-
if (message.connection != null && message.hasOwnProperty("connection"))
|
|
8883
|
-
object.connection = message.connection;
|
|
8884
8790
|
let keys2;
|
|
8885
|
-
if (message.
|
|
8886
|
-
object.
|
|
8791
|
+
if (message.options && (keys2 = Object.keys(message.options)).length) {
|
|
8792
|
+
object.options = {};
|
|
8887
8793
|
for (let j = 0; j < keys2.length; ++j)
|
|
8888
|
-
object.
|
|
8794
|
+
object.options[keys2[j]] = message.options[keys2[j]];
|
|
8889
8795
|
}
|
|
8890
8796
|
return object;
|
|
8891
8797
|
};
|
|
8892
8798
|
|
|
8893
8799
|
/**
|
|
8894
|
-
* Converts this
|
|
8800
|
+
* Converts this ExportOptions to JSON.
|
|
8895
8801
|
* @function toJSON
|
|
8896
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8802
|
+
* @memberof sqlanvil.ActionConfig.ExportOptions
|
|
8897
8803
|
* @instance
|
|
8898
8804
|
* @returns {Object.<string,*>} JSON object
|
|
8899
8805
|
*/
|
|
8900
|
-
|
|
8806
|
+
ExportOptions.prototype.toJSON = function toJSON() {
|
|
8901
8807
|
return this.constructor.toObject(this, $protobuf__namespace.util.toJSONOptions);
|
|
8902
8808
|
};
|
|
8903
8809
|
|
|
8904
8810
|
/**
|
|
8905
|
-
* Gets the default type url for
|
|
8811
|
+
* Gets the default type url for ExportOptions
|
|
8906
8812
|
* @function getTypeUrl
|
|
8907
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8813
|
+
* @memberof sqlanvil.ActionConfig.ExportOptions
|
|
8908
8814
|
* @static
|
|
8909
8815
|
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
8910
8816
|
* @returns {string} The default type url
|
|
8911
8817
|
*/
|
|
8912
|
-
|
|
8818
|
+
ExportOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
8913
8819
|
if (typeUrlPrefix === undefined) {
|
|
8914
8820
|
typeUrlPrefix = "type.googleapis.com";
|
|
8915
8821
|
}
|
|
8916
|
-
return typeUrlPrefix + "/sqlanvil.ActionConfig.
|
|
8822
|
+
return typeUrlPrefix + "/sqlanvil.ActionConfig.ExportOptions";
|
|
8917
8823
|
};
|
|
8918
8824
|
|
|
8919
|
-
return
|
|
8825
|
+
return ExportOptions;
|
|
8920
8826
|
})();
|
|
8921
8827
|
|
|
8922
|
-
ActionConfig.
|
|
8828
|
+
ActionConfig.ExportConfig = (function() {
|
|
8923
8829
|
|
|
8924
8830
|
/**
|
|
8925
|
-
* Properties of
|
|
8831
|
+
* Properties of an ExportConfig.
|
|
8926
8832
|
* @memberof sqlanvil.ActionConfig
|
|
8927
|
-
* @interface
|
|
8928
|
-
* @property {string|null} [name]
|
|
8929
|
-
* @property {string|null} [
|
|
8930
|
-
* @property {string|null} [project]
|
|
8931
|
-
* @property {Array.<sqlanvil.ActionConfig.ITarget>|null} [dependencyTargets]
|
|
8932
|
-
* @property {string|null} [filename]
|
|
8933
|
-
* @property {Array.<string>|null} [tags]
|
|
8934
|
-
* @property {boolean|null} [disabled]
|
|
8935
|
-
* @property {string|null} [description]
|
|
8936
|
-
* @property {boolean|null} [
|
|
8833
|
+
* @interface IExportConfig
|
|
8834
|
+
* @property {string|null} [name] ExportConfig name
|
|
8835
|
+
* @property {string|null} [dataset] ExportConfig dataset
|
|
8836
|
+
* @property {string|null} [project] ExportConfig project
|
|
8837
|
+
* @property {Array.<sqlanvil.ActionConfig.ITarget>|null} [dependencyTargets] ExportConfig dependencyTargets
|
|
8838
|
+
* @property {string|null} [filename] ExportConfig filename
|
|
8839
|
+
* @property {Array.<string>|null} [tags] ExportConfig tags
|
|
8840
|
+
* @property {boolean|null} [disabled] ExportConfig disabled
|
|
8841
|
+
* @property {string|null} [description] ExportConfig description
|
|
8842
|
+
* @property {boolean|null} [hermetic] ExportConfig hermetic
|
|
8843
|
+
* @property {sqlanvil.ActionConfig.IExportOptions|null} ["export"] ExportConfig export
|
|
8937
8844
|
*/
|
|
8938
8845
|
|
|
8939
8846
|
/**
|
|
8940
|
-
* Constructs a new
|
|
8847
|
+
* Constructs a new ExportConfig.
|
|
8941
8848
|
* @memberof sqlanvil.ActionConfig
|
|
8942
|
-
* @classdesc Represents
|
|
8943
|
-
* @implements
|
|
8849
|
+
* @classdesc Represents an ExportConfig.
|
|
8850
|
+
* @implements IExportConfig
|
|
8944
8851
|
* @constructor
|
|
8945
|
-
* @param {sqlanvil.ActionConfig.
|
|
8852
|
+
* @param {sqlanvil.ActionConfig.IExportConfig=} [properties] Properties to set
|
|
8946
8853
|
*/
|
|
8947
|
-
function
|
|
8854
|
+
function ExportConfig(properties) {
|
|
8948
8855
|
this.dependencyTargets = [];
|
|
8949
8856
|
this.tags = [];
|
|
8950
8857
|
if (properties)
|
|
@@ -8954,105 +8861,113 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
8954
8861
|
}
|
|
8955
8862
|
|
|
8956
8863
|
/**
|
|
8957
|
-
*
|
|
8864
|
+
* ExportConfig name.
|
|
8958
8865
|
* @member {string} name
|
|
8959
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8866
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
8960
8867
|
* @instance
|
|
8961
8868
|
*/
|
|
8962
|
-
|
|
8869
|
+
ExportConfig.prototype.name = "";
|
|
8963
8870
|
|
|
8964
8871
|
/**
|
|
8965
|
-
*
|
|
8966
|
-
* @member {string}
|
|
8967
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8872
|
+
* ExportConfig dataset.
|
|
8873
|
+
* @member {string} dataset
|
|
8874
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
8968
8875
|
* @instance
|
|
8969
8876
|
*/
|
|
8970
|
-
|
|
8877
|
+
ExportConfig.prototype.dataset = "";
|
|
8971
8878
|
|
|
8972
8879
|
/**
|
|
8973
|
-
*
|
|
8880
|
+
* ExportConfig project.
|
|
8974
8881
|
* @member {string} project
|
|
8975
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8882
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
8976
8883
|
* @instance
|
|
8977
8884
|
*/
|
|
8978
|
-
|
|
8885
|
+
ExportConfig.prototype.project = "";
|
|
8979
8886
|
|
|
8980
8887
|
/**
|
|
8981
|
-
*
|
|
8888
|
+
* ExportConfig dependencyTargets.
|
|
8982
8889
|
* @member {Array.<sqlanvil.ActionConfig.ITarget>} dependencyTargets
|
|
8983
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8890
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
8984
8891
|
* @instance
|
|
8985
8892
|
*/
|
|
8986
|
-
|
|
8893
|
+
ExportConfig.prototype.dependencyTargets = $util.emptyArray;
|
|
8987
8894
|
|
|
8988
8895
|
/**
|
|
8989
|
-
*
|
|
8896
|
+
* ExportConfig filename.
|
|
8990
8897
|
* @member {string} filename
|
|
8991
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8898
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
8992
8899
|
* @instance
|
|
8993
8900
|
*/
|
|
8994
|
-
|
|
8901
|
+
ExportConfig.prototype.filename = "";
|
|
8995
8902
|
|
|
8996
8903
|
/**
|
|
8997
|
-
*
|
|
8904
|
+
* ExportConfig tags.
|
|
8998
8905
|
* @member {Array.<string>} tags
|
|
8999
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8906
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
9000
8907
|
* @instance
|
|
9001
8908
|
*/
|
|
9002
|
-
|
|
8909
|
+
ExportConfig.prototype.tags = $util.emptyArray;
|
|
9003
8910
|
|
|
9004
8911
|
/**
|
|
9005
|
-
*
|
|
8912
|
+
* ExportConfig disabled.
|
|
9006
8913
|
* @member {boolean} disabled
|
|
9007
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8914
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
9008
8915
|
* @instance
|
|
9009
8916
|
*/
|
|
9010
|
-
|
|
8917
|
+
ExportConfig.prototype.disabled = false;
|
|
9011
8918
|
|
|
9012
8919
|
/**
|
|
9013
|
-
*
|
|
8920
|
+
* ExportConfig description.
|
|
9014
8921
|
* @member {string} description
|
|
9015
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8922
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
9016
8923
|
* @instance
|
|
9017
8924
|
*/
|
|
9018
|
-
|
|
8925
|
+
ExportConfig.prototype.description = "";
|
|
9019
8926
|
|
|
9020
8927
|
/**
|
|
9021
|
-
*
|
|
9022
|
-
* @member {boolean}
|
|
9023
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8928
|
+
* ExportConfig hermetic.
|
|
8929
|
+
* @member {boolean} hermetic
|
|
8930
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
9024
8931
|
* @instance
|
|
9025
8932
|
*/
|
|
9026
|
-
|
|
8933
|
+
ExportConfig.prototype.hermetic = false;
|
|
9027
8934
|
|
|
9028
8935
|
/**
|
|
9029
|
-
*
|
|
8936
|
+
* ExportConfig export.
|
|
8937
|
+
* @member {sqlanvil.ActionConfig.IExportOptions|null|undefined} export
|
|
8938
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
8939
|
+
* @instance
|
|
8940
|
+
*/
|
|
8941
|
+
ExportConfig.prototype["export"] = null;
|
|
8942
|
+
|
|
8943
|
+
/**
|
|
8944
|
+
* Creates a new ExportConfig instance using the specified properties.
|
|
9030
8945
|
* @function create
|
|
9031
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8946
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
9032
8947
|
* @static
|
|
9033
|
-
* @param {sqlanvil.ActionConfig.
|
|
9034
|
-
* @returns {sqlanvil.ActionConfig.
|
|
8948
|
+
* @param {sqlanvil.ActionConfig.IExportConfig=} [properties] Properties to set
|
|
8949
|
+
* @returns {sqlanvil.ActionConfig.ExportConfig} ExportConfig instance
|
|
9035
8950
|
*/
|
|
9036
|
-
|
|
9037
|
-
return new
|
|
8951
|
+
ExportConfig.create = function create(properties) {
|
|
8952
|
+
return new ExportConfig(properties);
|
|
9038
8953
|
};
|
|
9039
8954
|
|
|
9040
8955
|
/**
|
|
9041
|
-
* Encodes the specified
|
|
8956
|
+
* Encodes the specified ExportConfig message. Does not implicitly {@link sqlanvil.ActionConfig.ExportConfig.verify|verify} messages.
|
|
9042
8957
|
* @function encode
|
|
9043
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8958
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
9044
8959
|
* @static
|
|
9045
|
-
* @param {sqlanvil.ActionConfig.
|
|
8960
|
+
* @param {sqlanvil.ActionConfig.IExportConfig} message ExportConfig message or plain object to encode
|
|
9046
8961
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
9047
8962
|
* @returns {$protobuf.Writer} Writer
|
|
9048
8963
|
*/
|
|
9049
|
-
|
|
8964
|
+
ExportConfig.encode = function encode(message, writer) {
|
|
9050
8965
|
if (!writer)
|
|
9051
8966
|
writer = $Writer.create();
|
|
9052
8967
|
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
9053
8968
|
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
9054
|
-
if (message.
|
|
9055
|
-
writer.uint32(/* id 2, wireType 2 =*/18).string(message.
|
|
8969
|
+
if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset"))
|
|
8970
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataset);
|
|
9056
8971
|
if (message.project != null && Object.hasOwnProperty.call(message, "project"))
|
|
9057
8972
|
writer.uint32(/* id 3, wireType 2 =*/26).string(message.project);
|
|
9058
8973
|
if (message.dependencyTargets != null && message.dependencyTargets.length)
|
|
@@ -9067,39 +8982,41 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
9067
8982
|
writer.uint32(/* id 7, wireType 0 =*/56).bool(message.disabled);
|
|
9068
8983
|
if (message.description != null && Object.hasOwnProperty.call(message, "description"))
|
|
9069
8984
|
writer.uint32(/* id 8, wireType 2 =*/66).string(message.description);
|
|
9070
|
-
if (message.
|
|
9071
|
-
writer.uint32(/* id 9, wireType 0 =*/72).bool(message.
|
|
8985
|
+
if (message.hermetic != null && Object.hasOwnProperty.call(message, "hermetic"))
|
|
8986
|
+
writer.uint32(/* id 9, wireType 0 =*/72).bool(message.hermetic);
|
|
8987
|
+
if (message["export"] != null && Object.hasOwnProperty.call(message, "export"))
|
|
8988
|
+
$root.sqlanvil.ActionConfig.ExportOptions.encode(message["export"], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
|
9072
8989
|
return writer;
|
|
9073
8990
|
};
|
|
9074
8991
|
|
|
9075
8992
|
/**
|
|
9076
|
-
* Encodes the specified
|
|
8993
|
+
* Encodes the specified ExportConfig message, length delimited. Does not implicitly {@link sqlanvil.ActionConfig.ExportConfig.verify|verify} messages.
|
|
9077
8994
|
* @function encodeDelimited
|
|
9078
|
-
* @memberof sqlanvil.ActionConfig.
|
|
8995
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
9079
8996
|
* @static
|
|
9080
|
-
* @param {sqlanvil.ActionConfig.
|
|
8997
|
+
* @param {sqlanvil.ActionConfig.IExportConfig} message ExportConfig message or plain object to encode
|
|
9081
8998
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
9082
8999
|
* @returns {$protobuf.Writer} Writer
|
|
9083
9000
|
*/
|
|
9084
|
-
|
|
9001
|
+
ExportConfig.encodeDelimited = function encodeDelimited(message, writer) {
|
|
9085
9002
|
return this.encode(message, writer).ldelim();
|
|
9086
9003
|
};
|
|
9087
9004
|
|
|
9088
9005
|
/**
|
|
9089
|
-
* Decodes
|
|
9006
|
+
* Decodes an ExportConfig message from the specified reader or buffer.
|
|
9090
9007
|
* @function decode
|
|
9091
|
-
* @memberof sqlanvil.ActionConfig.
|
|
9008
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
9092
9009
|
* @static
|
|
9093
9010
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
9094
9011
|
* @param {number} [length] Message length if known beforehand
|
|
9095
|
-
* @returns {sqlanvil.ActionConfig.
|
|
9012
|
+
* @returns {sqlanvil.ActionConfig.ExportConfig} ExportConfig
|
|
9096
9013
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
9097
9014
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
9098
9015
|
*/
|
|
9099
|
-
|
|
9016
|
+
ExportConfig.decode = function decode(reader, length, error) {
|
|
9100
9017
|
if (!(reader instanceof $Reader))
|
|
9101
9018
|
reader = $Reader.create(reader);
|
|
9102
|
-
let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.ActionConfig.
|
|
9019
|
+
let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.ActionConfig.ExportConfig();
|
|
9103
9020
|
while (reader.pos < end) {
|
|
9104
9021
|
let tag = reader.uint32();
|
|
9105
9022
|
if (tag === error)
|
|
@@ -9110,7 +9027,918 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
9110
9027
|
break;
|
|
9111
9028
|
}
|
|
9112
9029
|
case 2: {
|
|
9113
|
-
message.
|
|
9030
|
+
message.dataset = reader.string();
|
|
9031
|
+
break;
|
|
9032
|
+
}
|
|
9033
|
+
case 3: {
|
|
9034
|
+
message.project = reader.string();
|
|
9035
|
+
break;
|
|
9036
|
+
}
|
|
9037
|
+
case 4: {
|
|
9038
|
+
if (!(message.dependencyTargets && message.dependencyTargets.length))
|
|
9039
|
+
message.dependencyTargets = [];
|
|
9040
|
+
message.dependencyTargets.push($root.sqlanvil.ActionConfig.Target.decode(reader, reader.uint32()));
|
|
9041
|
+
break;
|
|
9042
|
+
}
|
|
9043
|
+
case 5: {
|
|
9044
|
+
message.filename = reader.string();
|
|
9045
|
+
break;
|
|
9046
|
+
}
|
|
9047
|
+
case 6: {
|
|
9048
|
+
if (!(message.tags && message.tags.length))
|
|
9049
|
+
message.tags = [];
|
|
9050
|
+
message.tags.push(reader.string());
|
|
9051
|
+
break;
|
|
9052
|
+
}
|
|
9053
|
+
case 7: {
|
|
9054
|
+
message.disabled = reader.bool();
|
|
9055
|
+
break;
|
|
9056
|
+
}
|
|
9057
|
+
case 8: {
|
|
9058
|
+
message.description = reader.string();
|
|
9059
|
+
break;
|
|
9060
|
+
}
|
|
9061
|
+
case 9: {
|
|
9062
|
+
message.hermetic = reader.bool();
|
|
9063
|
+
break;
|
|
9064
|
+
}
|
|
9065
|
+
case 10: {
|
|
9066
|
+
message["export"] = $root.sqlanvil.ActionConfig.ExportOptions.decode(reader, reader.uint32());
|
|
9067
|
+
break;
|
|
9068
|
+
}
|
|
9069
|
+
default:
|
|
9070
|
+
reader.skipType(tag & 7);
|
|
9071
|
+
break;
|
|
9072
|
+
}
|
|
9073
|
+
}
|
|
9074
|
+
return message;
|
|
9075
|
+
};
|
|
9076
|
+
|
|
9077
|
+
/**
|
|
9078
|
+
* Decodes an ExportConfig message from the specified reader or buffer, length delimited.
|
|
9079
|
+
* @function decodeDelimited
|
|
9080
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
9081
|
+
* @static
|
|
9082
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
9083
|
+
* @returns {sqlanvil.ActionConfig.ExportConfig} ExportConfig
|
|
9084
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
9085
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
9086
|
+
*/
|
|
9087
|
+
ExportConfig.decodeDelimited = function decodeDelimited(reader) {
|
|
9088
|
+
if (!(reader instanceof $Reader))
|
|
9089
|
+
reader = new $Reader(reader);
|
|
9090
|
+
return this.decode(reader, reader.uint32());
|
|
9091
|
+
};
|
|
9092
|
+
|
|
9093
|
+
/**
|
|
9094
|
+
* Verifies an ExportConfig message.
|
|
9095
|
+
* @function verify
|
|
9096
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
9097
|
+
* @static
|
|
9098
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
9099
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
9100
|
+
*/
|
|
9101
|
+
ExportConfig.verify = function verify(message) {
|
|
9102
|
+
if (typeof message !== "object" || message === null)
|
|
9103
|
+
return "object expected";
|
|
9104
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
9105
|
+
if (!$util.isString(message.name))
|
|
9106
|
+
return "name: string expected";
|
|
9107
|
+
if (message.dataset != null && message.hasOwnProperty("dataset"))
|
|
9108
|
+
if (!$util.isString(message.dataset))
|
|
9109
|
+
return "dataset: string expected";
|
|
9110
|
+
if (message.project != null && message.hasOwnProperty("project"))
|
|
9111
|
+
if (!$util.isString(message.project))
|
|
9112
|
+
return "project: string expected";
|
|
9113
|
+
if (message.dependencyTargets != null && message.hasOwnProperty("dependencyTargets")) {
|
|
9114
|
+
if (!Array.isArray(message.dependencyTargets))
|
|
9115
|
+
return "dependencyTargets: array expected";
|
|
9116
|
+
for (let i = 0; i < message.dependencyTargets.length; ++i) {
|
|
9117
|
+
let error = $root.sqlanvil.ActionConfig.Target.verify(message.dependencyTargets[i]);
|
|
9118
|
+
if (error)
|
|
9119
|
+
return "dependencyTargets." + error;
|
|
9120
|
+
}
|
|
9121
|
+
}
|
|
9122
|
+
if (message.filename != null && message.hasOwnProperty("filename"))
|
|
9123
|
+
if (!$util.isString(message.filename))
|
|
9124
|
+
return "filename: string expected";
|
|
9125
|
+
if (message.tags != null && message.hasOwnProperty("tags")) {
|
|
9126
|
+
if (!Array.isArray(message.tags))
|
|
9127
|
+
return "tags: array expected";
|
|
9128
|
+
for (let i = 0; i < message.tags.length; ++i)
|
|
9129
|
+
if (!$util.isString(message.tags[i]))
|
|
9130
|
+
return "tags: string[] expected";
|
|
9131
|
+
}
|
|
9132
|
+
if (message.disabled != null && message.hasOwnProperty("disabled"))
|
|
9133
|
+
if (typeof message.disabled !== "boolean")
|
|
9134
|
+
return "disabled: boolean expected";
|
|
9135
|
+
if (message.description != null && message.hasOwnProperty("description"))
|
|
9136
|
+
if (!$util.isString(message.description))
|
|
9137
|
+
return "description: string expected";
|
|
9138
|
+
if (message.hermetic != null && message.hasOwnProperty("hermetic"))
|
|
9139
|
+
if (typeof message.hermetic !== "boolean")
|
|
9140
|
+
return "hermetic: boolean expected";
|
|
9141
|
+
if (message["export"] != null && message.hasOwnProperty("export")) {
|
|
9142
|
+
let error = $root.sqlanvil.ActionConfig.ExportOptions.verify(message["export"]);
|
|
9143
|
+
if (error)
|
|
9144
|
+
return "export." + error;
|
|
9145
|
+
}
|
|
9146
|
+
return null;
|
|
9147
|
+
};
|
|
9148
|
+
|
|
9149
|
+
/**
|
|
9150
|
+
* Creates an ExportConfig message from a plain object. Also converts values to their respective internal types.
|
|
9151
|
+
* @function fromObject
|
|
9152
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
9153
|
+
* @static
|
|
9154
|
+
* @param {Object.<string,*>} object Plain object
|
|
9155
|
+
* @returns {sqlanvil.ActionConfig.ExportConfig} ExportConfig
|
|
9156
|
+
*/
|
|
9157
|
+
ExportConfig.fromObject = function fromObject(object) {
|
|
9158
|
+
if (object instanceof $root.sqlanvil.ActionConfig.ExportConfig)
|
|
9159
|
+
return object;
|
|
9160
|
+
let message = new $root.sqlanvil.ActionConfig.ExportConfig();
|
|
9161
|
+
if (object.name != null)
|
|
9162
|
+
message.name = String(object.name);
|
|
9163
|
+
if (object.dataset != null)
|
|
9164
|
+
message.dataset = String(object.dataset);
|
|
9165
|
+
if (object.project != null)
|
|
9166
|
+
message.project = String(object.project);
|
|
9167
|
+
if (object.dependencyTargets) {
|
|
9168
|
+
if (!Array.isArray(object.dependencyTargets))
|
|
9169
|
+
throw TypeError(".sqlanvil.ActionConfig.ExportConfig.dependencyTargets: array expected");
|
|
9170
|
+
message.dependencyTargets = [];
|
|
9171
|
+
for (let i = 0; i < object.dependencyTargets.length; ++i) {
|
|
9172
|
+
if (typeof object.dependencyTargets[i] !== "object")
|
|
9173
|
+
throw TypeError(".sqlanvil.ActionConfig.ExportConfig.dependencyTargets: object expected");
|
|
9174
|
+
message.dependencyTargets[i] = $root.sqlanvil.ActionConfig.Target.fromObject(object.dependencyTargets[i]);
|
|
9175
|
+
}
|
|
9176
|
+
}
|
|
9177
|
+
if (object.filename != null)
|
|
9178
|
+
message.filename = String(object.filename);
|
|
9179
|
+
if (object.tags) {
|
|
9180
|
+
if (!Array.isArray(object.tags))
|
|
9181
|
+
throw TypeError(".sqlanvil.ActionConfig.ExportConfig.tags: array expected");
|
|
9182
|
+
message.tags = [];
|
|
9183
|
+
for (let i = 0; i < object.tags.length; ++i)
|
|
9184
|
+
message.tags[i] = String(object.tags[i]);
|
|
9185
|
+
}
|
|
9186
|
+
if (object.disabled != null)
|
|
9187
|
+
message.disabled = Boolean(object.disabled);
|
|
9188
|
+
if (object.description != null)
|
|
9189
|
+
message.description = String(object.description);
|
|
9190
|
+
if (object.hermetic != null)
|
|
9191
|
+
message.hermetic = Boolean(object.hermetic);
|
|
9192
|
+
if (object["export"] != null) {
|
|
9193
|
+
if (typeof object["export"] !== "object")
|
|
9194
|
+
throw TypeError(".sqlanvil.ActionConfig.ExportConfig.export: object expected");
|
|
9195
|
+
message["export"] = $root.sqlanvil.ActionConfig.ExportOptions.fromObject(object["export"]);
|
|
9196
|
+
}
|
|
9197
|
+
return message;
|
|
9198
|
+
};
|
|
9199
|
+
|
|
9200
|
+
/**
|
|
9201
|
+
* Creates a plain object from an ExportConfig message. Also converts values to other types if specified.
|
|
9202
|
+
* @function toObject
|
|
9203
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
9204
|
+
* @static
|
|
9205
|
+
* @param {sqlanvil.ActionConfig.ExportConfig} message ExportConfig
|
|
9206
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
9207
|
+
* @returns {Object.<string,*>} Plain object
|
|
9208
|
+
*/
|
|
9209
|
+
ExportConfig.toObject = function toObject(message, options) {
|
|
9210
|
+
if (!options)
|
|
9211
|
+
options = {};
|
|
9212
|
+
let object = {};
|
|
9213
|
+
if (options.arrays || options.defaults) {
|
|
9214
|
+
object.dependencyTargets = [];
|
|
9215
|
+
object.tags = [];
|
|
9216
|
+
}
|
|
9217
|
+
if (options.defaults) {
|
|
9218
|
+
object.name = "";
|
|
9219
|
+
object.dataset = "";
|
|
9220
|
+
object.project = "";
|
|
9221
|
+
object.filename = "";
|
|
9222
|
+
object.disabled = false;
|
|
9223
|
+
object.description = "";
|
|
9224
|
+
object.hermetic = false;
|
|
9225
|
+
object["export"] = null;
|
|
9226
|
+
}
|
|
9227
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
9228
|
+
object.name = message.name;
|
|
9229
|
+
if (message.dataset != null && message.hasOwnProperty("dataset"))
|
|
9230
|
+
object.dataset = message.dataset;
|
|
9231
|
+
if (message.project != null && message.hasOwnProperty("project"))
|
|
9232
|
+
object.project = message.project;
|
|
9233
|
+
if (message.dependencyTargets && message.dependencyTargets.length) {
|
|
9234
|
+
object.dependencyTargets = [];
|
|
9235
|
+
for (let j = 0; j < message.dependencyTargets.length; ++j)
|
|
9236
|
+
object.dependencyTargets[j] = $root.sqlanvil.ActionConfig.Target.toObject(message.dependencyTargets[j], options);
|
|
9237
|
+
}
|
|
9238
|
+
if (message.filename != null && message.hasOwnProperty("filename"))
|
|
9239
|
+
object.filename = message.filename;
|
|
9240
|
+
if (message.tags && message.tags.length) {
|
|
9241
|
+
object.tags = [];
|
|
9242
|
+
for (let j = 0; j < message.tags.length; ++j)
|
|
9243
|
+
object.tags[j] = message.tags[j];
|
|
9244
|
+
}
|
|
9245
|
+
if (message.disabled != null && message.hasOwnProperty("disabled"))
|
|
9246
|
+
object.disabled = message.disabled;
|
|
9247
|
+
if (message.description != null && message.hasOwnProperty("description"))
|
|
9248
|
+
object.description = message.description;
|
|
9249
|
+
if (message.hermetic != null && message.hasOwnProperty("hermetic"))
|
|
9250
|
+
object.hermetic = message.hermetic;
|
|
9251
|
+
if (message["export"] != null && message.hasOwnProperty("export"))
|
|
9252
|
+
object["export"] = $root.sqlanvil.ActionConfig.ExportOptions.toObject(message["export"], options);
|
|
9253
|
+
return object;
|
|
9254
|
+
};
|
|
9255
|
+
|
|
9256
|
+
/**
|
|
9257
|
+
* Converts this ExportConfig to JSON.
|
|
9258
|
+
* @function toJSON
|
|
9259
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
9260
|
+
* @instance
|
|
9261
|
+
* @returns {Object.<string,*>} JSON object
|
|
9262
|
+
*/
|
|
9263
|
+
ExportConfig.prototype.toJSON = function toJSON() {
|
|
9264
|
+
return this.constructor.toObject(this, $protobuf__namespace.util.toJSONOptions);
|
|
9265
|
+
};
|
|
9266
|
+
|
|
9267
|
+
/**
|
|
9268
|
+
* Gets the default type url for ExportConfig
|
|
9269
|
+
* @function getTypeUrl
|
|
9270
|
+
* @memberof sqlanvil.ActionConfig.ExportConfig
|
|
9271
|
+
* @static
|
|
9272
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
9273
|
+
* @returns {string} The default type url
|
|
9274
|
+
*/
|
|
9275
|
+
ExportConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
9276
|
+
if (typeUrlPrefix === undefined) {
|
|
9277
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
9278
|
+
}
|
|
9279
|
+
return typeUrlPrefix + "/sqlanvil.ActionConfig.ExportConfig";
|
|
9280
|
+
};
|
|
9281
|
+
|
|
9282
|
+
return ExportConfig;
|
|
9283
|
+
})();
|
|
9284
|
+
|
|
9285
|
+
ActionConfig.DeclarationConfig = (function() {
|
|
9286
|
+
|
|
9287
|
+
/**
|
|
9288
|
+
* Properties of a DeclarationConfig.
|
|
9289
|
+
* @memberof sqlanvil.ActionConfig
|
|
9290
|
+
* @interface IDeclarationConfig
|
|
9291
|
+
* @property {string|null} [name] DeclarationConfig name
|
|
9292
|
+
* @property {string|null} [dataset] DeclarationConfig dataset
|
|
9293
|
+
* @property {string|null} [project] DeclarationConfig project
|
|
9294
|
+
* @property {string|null} [description] DeclarationConfig description
|
|
9295
|
+
* @property {Array.<sqlanvil.ActionConfig.IColumnDescriptor>|null} [columns] DeclarationConfig columns
|
|
9296
|
+
* @property {string|null} [filename] DeclarationConfig filename
|
|
9297
|
+
* @property {Array.<string>|null} [tags] DeclarationConfig tags
|
|
9298
|
+
* @property {string|null} [connection] DeclarationConfig connection
|
|
9299
|
+
* @property {Object.<string,string>|null} [columnTypes] DeclarationConfig columnTypes
|
|
9300
|
+
*/
|
|
9301
|
+
|
|
9302
|
+
/**
|
|
9303
|
+
* Constructs a new DeclarationConfig.
|
|
9304
|
+
* @memberof sqlanvil.ActionConfig
|
|
9305
|
+
* @classdesc Represents a DeclarationConfig.
|
|
9306
|
+
* @implements IDeclarationConfig
|
|
9307
|
+
* @constructor
|
|
9308
|
+
* @param {sqlanvil.ActionConfig.IDeclarationConfig=} [properties] Properties to set
|
|
9309
|
+
*/
|
|
9310
|
+
function DeclarationConfig(properties) {
|
|
9311
|
+
this.columns = [];
|
|
9312
|
+
this.tags = [];
|
|
9313
|
+
this.columnTypes = {};
|
|
9314
|
+
if (properties)
|
|
9315
|
+
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
9316
|
+
if (properties[keys[i]] != null)
|
|
9317
|
+
this[keys[i]] = properties[keys[i]];
|
|
9318
|
+
}
|
|
9319
|
+
|
|
9320
|
+
/**
|
|
9321
|
+
* DeclarationConfig name.
|
|
9322
|
+
* @member {string} name
|
|
9323
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9324
|
+
* @instance
|
|
9325
|
+
*/
|
|
9326
|
+
DeclarationConfig.prototype.name = "";
|
|
9327
|
+
|
|
9328
|
+
/**
|
|
9329
|
+
* DeclarationConfig dataset.
|
|
9330
|
+
* @member {string} dataset
|
|
9331
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9332
|
+
* @instance
|
|
9333
|
+
*/
|
|
9334
|
+
DeclarationConfig.prototype.dataset = "";
|
|
9335
|
+
|
|
9336
|
+
/**
|
|
9337
|
+
* DeclarationConfig project.
|
|
9338
|
+
* @member {string} project
|
|
9339
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9340
|
+
* @instance
|
|
9341
|
+
*/
|
|
9342
|
+
DeclarationConfig.prototype.project = "";
|
|
9343
|
+
|
|
9344
|
+
/**
|
|
9345
|
+
* DeclarationConfig description.
|
|
9346
|
+
* @member {string} description
|
|
9347
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9348
|
+
* @instance
|
|
9349
|
+
*/
|
|
9350
|
+
DeclarationConfig.prototype.description = "";
|
|
9351
|
+
|
|
9352
|
+
/**
|
|
9353
|
+
* DeclarationConfig columns.
|
|
9354
|
+
* @member {Array.<sqlanvil.ActionConfig.IColumnDescriptor>} columns
|
|
9355
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9356
|
+
* @instance
|
|
9357
|
+
*/
|
|
9358
|
+
DeclarationConfig.prototype.columns = $util.emptyArray;
|
|
9359
|
+
|
|
9360
|
+
/**
|
|
9361
|
+
* DeclarationConfig filename.
|
|
9362
|
+
* @member {string} filename
|
|
9363
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9364
|
+
* @instance
|
|
9365
|
+
*/
|
|
9366
|
+
DeclarationConfig.prototype.filename = "";
|
|
9367
|
+
|
|
9368
|
+
/**
|
|
9369
|
+
* DeclarationConfig tags.
|
|
9370
|
+
* @member {Array.<string>} tags
|
|
9371
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9372
|
+
* @instance
|
|
9373
|
+
*/
|
|
9374
|
+
DeclarationConfig.prototype.tags = $util.emptyArray;
|
|
9375
|
+
|
|
9376
|
+
/**
|
|
9377
|
+
* DeclarationConfig connection.
|
|
9378
|
+
* @member {string} connection
|
|
9379
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9380
|
+
* @instance
|
|
9381
|
+
*/
|
|
9382
|
+
DeclarationConfig.prototype.connection = "";
|
|
9383
|
+
|
|
9384
|
+
/**
|
|
9385
|
+
* DeclarationConfig columnTypes.
|
|
9386
|
+
* @member {Object.<string,string>} columnTypes
|
|
9387
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9388
|
+
* @instance
|
|
9389
|
+
*/
|
|
9390
|
+
DeclarationConfig.prototype.columnTypes = $util.emptyObject;
|
|
9391
|
+
|
|
9392
|
+
/**
|
|
9393
|
+
* Creates a new DeclarationConfig instance using the specified properties.
|
|
9394
|
+
* @function create
|
|
9395
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9396
|
+
* @static
|
|
9397
|
+
* @param {sqlanvil.ActionConfig.IDeclarationConfig=} [properties] Properties to set
|
|
9398
|
+
* @returns {sqlanvil.ActionConfig.DeclarationConfig} DeclarationConfig instance
|
|
9399
|
+
*/
|
|
9400
|
+
DeclarationConfig.create = function create(properties) {
|
|
9401
|
+
return new DeclarationConfig(properties);
|
|
9402
|
+
};
|
|
9403
|
+
|
|
9404
|
+
/**
|
|
9405
|
+
* Encodes the specified DeclarationConfig message. Does not implicitly {@link sqlanvil.ActionConfig.DeclarationConfig.verify|verify} messages.
|
|
9406
|
+
* @function encode
|
|
9407
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9408
|
+
* @static
|
|
9409
|
+
* @param {sqlanvil.ActionConfig.IDeclarationConfig} message DeclarationConfig message or plain object to encode
|
|
9410
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
9411
|
+
* @returns {$protobuf.Writer} Writer
|
|
9412
|
+
*/
|
|
9413
|
+
DeclarationConfig.encode = function encode(message, writer) {
|
|
9414
|
+
if (!writer)
|
|
9415
|
+
writer = $Writer.create();
|
|
9416
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
9417
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
9418
|
+
if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset"))
|
|
9419
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataset);
|
|
9420
|
+
if (message.project != null && Object.hasOwnProperty.call(message, "project"))
|
|
9421
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.project);
|
|
9422
|
+
if (message.description != null && Object.hasOwnProperty.call(message, "description"))
|
|
9423
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.description);
|
|
9424
|
+
if (message.columns != null && message.columns.length)
|
|
9425
|
+
for (let i = 0; i < message.columns.length; ++i)
|
|
9426
|
+
$root.sqlanvil.ActionConfig.ColumnDescriptor.encode(message.columns[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
9427
|
+
if (message.filename != null && Object.hasOwnProperty.call(message, "filename"))
|
|
9428
|
+
writer.uint32(/* id 6, wireType 2 =*/50).string(message.filename);
|
|
9429
|
+
if (message.tags != null && message.tags.length)
|
|
9430
|
+
for (let i = 0; i < message.tags.length; ++i)
|
|
9431
|
+
writer.uint32(/* id 7, wireType 2 =*/58).string(message.tags[i]);
|
|
9432
|
+
if (message.connection != null && Object.hasOwnProperty.call(message, "connection"))
|
|
9433
|
+
writer.uint32(/* id 8, wireType 2 =*/66).string(message.connection);
|
|
9434
|
+
if (message.columnTypes != null && Object.hasOwnProperty.call(message, "columnTypes"))
|
|
9435
|
+
for (let keys = Object.keys(message.columnTypes), i = 0; i < keys.length; ++i)
|
|
9436
|
+
writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.columnTypes[keys[i]]).ldelim();
|
|
9437
|
+
return writer;
|
|
9438
|
+
};
|
|
9439
|
+
|
|
9440
|
+
/**
|
|
9441
|
+
* Encodes the specified DeclarationConfig message, length delimited. Does not implicitly {@link sqlanvil.ActionConfig.DeclarationConfig.verify|verify} messages.
|
|
9442
|
+
* @function encodeDelimited
|
|
9443
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9444
|
+
* @static
|
|
9445
|
+
* @param {sqlanvil.ActionConfig.IDeclarationConfig} message DeclarationConfig message or plain object to encode
|
|
9446
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
9447
|
+
* @returns {$protobuf.Writer} Writer
|
|
9448
|
+
*/
|
|
9449
|
+
DeclarationConfig.encodeDelimited = function encodeDelimited(message, writer) {
|
|
9450
|
+
return this.encode(message, writer).ldelim();
|
|
9451
|
+
};
|
|
9452
|
+
|
|
9453
|
+
/**
|
|
9454
|
+
* Decodes a DeclarationConfig message from the specified reader or buffer.
|
|
9455
|
+
* @function decode
|
|
9456
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9457
|
+
* @static
|
|
9458
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
9459
|
+
* @param {number} [length] Message length if known beforehand
|
|
9460
|
+
* @returns {sqlanvil.ActionConfig.DeclarationConfig} DeclarationConfig
|
|
9461
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
9462
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
9463
|
+
*/
|
|
9464
|
+
DeclarationConfig.decode = function decode(reader, length, error) {
|
|
9465
|
+
if (!(reader instanceof $Reader))
|
|
9466
|
+
reader = $Reader.create(reader);
|
|
9467
|
+
let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.ActionConfig.DeclarationConfig(), key, value;
|
|
9468
|
+
while (reader.pos < end) {
|
|
9469
|
+
let tag = reader.uint32();
|
|
9470
|
+
if (tag === error)
|
|
9471
|
+
break;
|
|
9472
|
+
switch (tag >>> 3) {
|
|
9473
|
+
case 1: {
|
|
9474
|
+
message.name = reader.string();
|
|
9475
|
+
break;
|
|
9476
|
+
}
|
|
9477
|
+
case 2: {
|
|
9478
|
+
message.dataset = reader.string();
|
|
9479
|
+
break;
|
|
9480
|
+
}
|
|
9481
|
+
case 3: {
|
|
9482
|
+
message.project = reader.string();
|
|
9483
|
+
break;
|
|
9484
|
+
}
|
|
9485
|
+
case 4: {
|
|
9486
|
+
message.description = reader.string();
|
|
9487
|
+
break;
|
|
9488
|
+
}
|
|
9489
|
+
case 5: {
|
|
9490
|
+
if (!(message.columns && message.columns.length))
|
|
9491
|
+
message.columns = [];
|
|
9492
|
+
message.columns.push($root.sqlanvil.ActionConfig.ColumnDescriptor.decode(reader, reader.uint32()));
|
|
9493
|
+
break;
|
|
9494
|
+
}
|
|
9495
|
+
case 6: {
|
|
9496
|
+
message.filename = reader.string();
|
|
9497
|
+
break;
|
|
9498
|
+
}
|
|
9499
|
+
case 7: {
|
|
9500
|
+
if (!(message.tags && message.tags.length))
|
|
9501
|
+
message.tags = [];
|
|
9502
|
+
message.tags.push(reader.string());
|
|
9503
|
+
break;
|
|
9504
|
+
}
|
|
9505
|
+
case 8: {
|
|
9506
|
+
message.connection = reader.string();
|
|
9507
|
+
break;
|
|
9508
|
+
}
|
|
9509
|
+
case 9: {
|
|
9510
|
+
if (message.columnTypes === $util.emptyObject)
|
|
9511
|
+
message.columnTypes = {};
|
|
9512
|
+
let end2 = reader.uint32() + reader.pos;
|
|
9513
|
+
key = "";
|
|
9514
|
+
value = "";
|
|
9515
|
+
while (reader.pos < end2) {
|
|
9516
|
+
let tag2 = reader.uint32();
|
|
9517
|
+
switch (tag2 >>> 3) {
|
|
9518
|
+
case 1:
|
|
9519
|
+
key = reader.string();
|
|
9520
|
+
break;
|
|
9521
|
+
case 2:
|
|
9522
|
+
value = reader.string();
|
|
9523
|
+
break;
|
|
9524
|
+
default:
|
|
9525
|
+
reader.skipType(tag2 & 7);
|
|
9526
|
+
break;
|
|
9527
|
+
}
|
|
9528
|
+
}
|
|
9529
|
+
message.columnTypes[key] = value;
|
|
9530
|
+
break;
|
|
9531
|
+
}
|
|
9532
|
+
default:
|
|
9533
|
+
reader.skipType(tag & 7);
|
|
9534
|
+
break;
|
|
9535
|
+
}
|
|
9536
|
+
}
|
|
9537
|
+
return message;
|
|
9538
|
+
};
|
|
9539
|
+
|
|
9540
|
+
/**
|
|
9541
|
+
* Decodes a DeclarationConfig message from the specified reader or buffer, length delimited.
|
|
9542
|
+
* @function decodeDelimited
|
|
9543
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9544
|
+
* @static
|
|
9545
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
9546
|
+
* @returns {sqlanvil.ActionConfig.DeclarationConfig} DeclarationConfig
|
|
9547
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
9548
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
9549
|
+
*/
|
|
9550
|
+
DeclarationConfig.decodeDelimited = function decodeDelimited(reader) {
|
|
9551
|
+
if (!(reader instanceof $Reader))
|
|
9552
|
+
reader = new $Reader(reader);
|
|
9553
|
+
return this.decode(reader, reader.uint32());
|
|
9554
|
+
};
|
|
9555
|
+
|
|
9556
|
+
/**
|
|
9557
|
+
* Verifies a DeclarationConfig message.
|
|
9558
|
+
* @function verify
|
|
9559
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9560
|
+
* @static
|
|
9561
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
9562
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
9563
|
+
*/
|
|
9564
|
+
DeclarationConfig.verify = function verify(message) {
|
|
9565
|
+
if (typeof message !== "object" || message === null)
|
|
9566
|
+
return "object expected";
|
|
9567
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
9568
|
+
if (!$util.isString(message.name))
|
|
9569
|
+
return "name: string expected";
|
|
9570
|
+
if (message.dataset != null && message.hasOwnProperty("dataset"))
|
|
9571
|
+
if (!$util.isString(message.dataset))
|
|
9572
|
+
return "dataset: string expected";
|
|
9573
|
+
if (message.project != null && message.hasOwnProperty("project"))
|
|
9574
|
+
if (!$util.isString(message.project))
|
|
9575
|
+
return "project: string expected";
|
|
9576
|
+
if (message.description != null && message.hasOwnProperty("description"))
|
|
9577
|
+
if (!$util.isString(message.description))
|
|
9578
|
+
return "description: string expected";
|
|
9579
|
+
if (message.columns != null && message.hasOwnProperty("columns")) {
|
|
9580
|
+
if (!Array.isArray(message.columns))
|
|
9581
|
+
return "columns: array expected";
|
|
9582
|
+
for (let i = 0; i < message.columns.length; ++i) {
|
|
9583
|
+
let error = $root.sqlanvil.ActionConfig.ColumnDescriptor.verify(message.columns[i]);
|
|
9584
|
+
if (error)
|
|
9585
|
+
return "columns." + error;
|
|
9586
|
+
}
|
|
9587
|
+
}
|
|
9588
|
+
if (message.filename != null && message.hasOwnProperty("filename"))
|
|
9589
|
+
if (!$util.isString(message.filename))
|
|
9590
|
+
return "filename: string expected";
|
|
9591
|
+
if (message.tags != null && message.hasOwnProperty("tags")) {
|
|
9592
|
+
if (!Array.isArray(message.tags))
|
|
9593
|
+
return "tags: array expected";
|
|
9594
|
+
for (let i = 0; i < message.tags.length; ++i)
|
|
9595
|
+
if (!$util.isString(message.tags[i]))
|
|
9596
|
+
return "tags: string[] expected";
|
|
9597
|
+
}
|
|
9598
|
+
if (message.connection != null && message.hasOwnProperty("connection"))
|
|
9599
|
+
if (!$util.isString(message.connection))
|
|
9600
|
+
return "connection: string expected";
|
|
9601
|
+
if (message.columnTypes != null && message.hasOwnProperty("columnTypes")) {
|
|
9602
|
+
if (!$util.isObject(message.columnTypes))
|
|
9603
|
+
return "columnTypes: object expected";
|
|
9604
|
+
let key = Object.keys(message.columnTypes);
|
|
9605
|
+
for (let i = 0; i < key.length; ++i)
|
|
9606
|
+
if (!$util.isString(message.columnTypes[key[i]]))
|
|
9607
|
+
return "columnTypes: string{k:string} expected";
|
|
9608
|
+
}
|
|
9609
|
+
return null;
|
|
9610
|
+
};
|
|
9611
|
+
|
|
9612
|
+
/**
|
|
9613
|
+
* Creates a DeclarationConfig message from a plain object. Also converts values to their respective internal types.
|
|
9614
|
+
* @function fromObject
|
|
9615
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9616
|
+
* @static
|
|
9617
|
+
* @param {Object.<string,*>} object Plain object
|
|
9618
|
+
* @returns {sqlanvil.ActionConfig.DeclarationConfig} DeclarationConfig
|
|
9619
|
+
*/
|
|
9620
|
+
DeclarationConfig.fromObject = function fromObject(object) {
|
|
9621
|
+
if (object instanceof $root.sqlanvil.ActionConfig.DeclarationConfig)
|
|
9622
|
+
return object;
|
|
9623
|
+
let message = new $root.sqlanvil.ActionConfig.DeclarationConfig();
|
|
9624
|
+
if (object.name != null)
|
|
9625
|
+
message.name = String(object.name);
|
|
9626
|
+
if (object.dataset != null)
|
|
9627
|
+
message.dataset = String(object.dataset);
|
|
9628
|
+
if (object.project != null)
|
|
9629
|
+
message.project = String(object.project);
|
|
9630
|
+
if (object.description != null)
|
|
9631
|
+
message.description = String(object.description);
|
|
9632
|
+
if (object.columns) {
|
|
9633
|
+
if (!Array.isArray(object.columns))
|
|
9634
|
+
throw TypeError(".sqlanvil.ActionConfig.DeclarationConfig.columns: array expected");
|
|
9635
|
+
message.columns = [];
|
|
9636
|
+
for (let i = 0; i < object.columns.length; ++i) {
|
|
9637
|
+
if (typeof object.columns[i] !== "object")
|
|
9638
|
+
throw TypeError(".sqlanvil.ActionConfig.DeclarationConfig.columns: object expected");
|
|
9639
|
+
message.columns[i] = $root.sqlanvil.ActionConfig.ColumnDescriptor.fromObject(object.columns[i]);
|
|
9640
|
+
}
|
|
9641
|
+
}
|
|
9642
|
+
if (object.filename != null)
|
|
9643
|
+
message.filename = String(object.filename);
|
|
9644
|
+
if (object.tags) {
|
|
9645
|
+
if (!Array.isArray(object.tags))
|
|
9646
|
+
throw TypeError(".sqlanvil.ActionConfig.DeclarationConfig.tags: array expected");
|
|
9647
|
+
message.tags = [];
|
|
9648
|
+
for (let i = 0; i < object.tags.length; ++i)
|
|
9649
|
+
message.tags[i] = String(object.tags[i]);
|
|
9650
|
+
}
|
|
9651
|
+
if (object.connection != null)
|
|
9652
|
+
message.connection = String(object.connection);
|
|
9653
|
+
if (object.columnTypes) {
|
|
9654
|
+
if (typeof object.columnTypes !== "object")
|
|
9655
|
+
throw TypeError(".sqlanvil.ActionConfig.DeclarationConfig.columnTypes: object expected");
|
|
9656
|
+
message.columnTypes = {};
|
|
9657
|
+
for (let keys = Object.keys(object.columnTypes), i = 0; i < keys.length; ++i)
|
|
9658
|
+
message.columnTypes[keys[i]] = String(object.columnTypes[keys[i]]);
|
|
9659
|
+
}
|
|
9660
|
+
return message;
|
|
9661
|
+
};
|
|
9662
|
+
|
|
9663
|
+
/**
|
|
9664
|
+
* Creates a plain object from a DeclarationConfig message. Also converts values to other types if specified.
|
|
9665
|
+
* @function toObject
|
|
9666
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9667
|
+
* @static
|
|
9668
|
+
* @param {sqlanvil.ActionConfig.DeclarationConfig} message DeclarationConfig
|
|
9669
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
9670
|
+
* @returns {Object.<string,*>} Plain object
|
|
9671
|
+
*/
|
|
9672
|
+
DeclarationConfig.toObject = function toObject(message, options) {
|
|
9673
|
+
if (!options)
|
|
9674
|
+
options = {};
|
|
9675
|
+
let object = {};
|
|
9676
|
+
if (options.arrays || options.defaults) {
|
|
9677
|
+
object.columns = [];
|
|
9678
|
+
object.tags = [];
|
|
9679
|
+
}
|
|
9680
|
+
if (options.objects || options.defaults)
|
|
9681
|
+
object.columnTypes = {};
|
|
9682
|
+
if (options.defaults) {
|
|
9683
|
+
object.name = "";
|
|
9684
|
+
object.dataset = "";
|
|
9685
|
+
object.project = "";
|
|
9686
|
+
object.description = "";
|
|
9687
|
+
object.filename = "";
|
|
9688
|
+
object.connection = "";
|
|
9689
|
+
}
|
|
9690
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
9691
|
+
object.name = message.name;
|
|
9692
|
+
if (message.dataset != null && message.hasOwnProperty("dataset"))
|
|
9693
|
+
object.dataset = message.dataset;
|
|
9694
|
+
if (message.project != null && message.hasOwnProperty("project"))
|
|
9695
|
+
object.project = message.project;
|
|
9696
|
+
if (message.description != null && message.hasOwnProperty("description"))
|
|
9697
|
+
object.description = message.description;
|
|
9698
|
+
if (message.columns && message.columns.length) {
|
|
9699
|
+
object.columns = [];
|
|
9700
|
+
for (let j = 0; j < message.columns.length; ++j)
|
|
9701
|
+
object.columns[j] = $root.sqlanvil.ActionConfig.ColumnDescriptor.toObject(message.columns[j], options);
|
|
9702
|
+
}
|
|
9703
|
+
if (message.filename != null && message.hasOwnProperty("filename"))
|
|
9704
|
+
object.filename = message.filename;
|
|
9705
|
+
if (message.tags && message.tags.length) {
|
|
9706
|
+
object.tags = [];
|
|
9707
|
+
for (let j = 0; j < message.tags.length; ++j)
|
|
9708
|
+
object.tags[j] = message.tags[j];
|
|
9709
|
+
}
|
|
9710
|
+
if (message.connection != null && message.hasOwnProperty("connection"))
|
|
9711
|
+
object.connection = message.connection;
|
|
9712
|
+
let keys2;
|
|
9713
|
+
if (message.columnTypes && (keys2 = Object.keys(message.columnTypes)).length) {
|
|
9714
|
+
object.columnTypes = {};
|
|
9715
|
+
for (let j = 0; j < keys2.length; ++j)
|
|
9716
|
+
object.columnTypes[keys2[j]] = message.columnTypes[keys2[j]];
|
|
9717
|
+
}
|
|
9718
|
+
return object;
|
|
9719
|
+
};
|
|
9720
|
+
|
|
9721
|
+
/**
|
|
9722
|
+
* Converts this DeclarationConfig to JSON.
|
|
9723
|
+
* @function toJSON
|
|
9724
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9725
|
+
* @instance
|
|
9726
|
+
* @returns {Object.<string,*>} JSON object
|
|
9727
|
+
*/
|
|
9728
|
+
DeclarationConfig.prototype.toJSON = function toJSON() {
|
|
9729
|
+
return this.constructor.toObject(this, $protobuf__namespace.util.toJSONOptions);
|
|
9730
|
+
};
|
|
9731
|
+
|
|
9732
|
+
/**
|
|
9733
|
+
* Gets the default type url for DeclarationConfig
|
|
9734
|
+
* @function getTypeUrl
|
|
9735
|
+
* @memberof sqlanvil.ActionConfig.DeclarationConfig
|
|
9736
|
+
* @static
|
|
9737
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
9738
|
+
* @returns {string} The default type url
|
|
9739
|
+
*/
|
|
9740
|
+
DeclarationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
9741
|
+
if (typeUrlPrefix === undefined) {
|
|
9742
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
9743
|
+
}
|
|
9744
|
+
return typeUrlPrefix + "/sqlanvil.ActionConfig.DeclarationConfig";
|
|
9745
|
+
};
|
|
9746
|
+
|
|
9747
|
+
return DeclarationConfig;
|
|
9748
|
+
})();
|
|
9749
|
+
|
|
9750
|
+
ActionConfig.NotebookConfig = (function() {
|
|
9751
|
+
|
|
9752
|
+
/**
|
|
9753
|
+
* Properties of a NotebookConfig.
|
|
9754
|
+
* @memberof sqlanvil.ActionConfig
|
|
9755
|
+
* @interface INotebookConfig
|
|
9756
|
+
* @property {string|null} [name] NotebookConfig name
|
|
9757
|
+
* @property {string|null} [location] NotebookConfig location
|
|
9758
|
+
* @property {string|null} [project] NotebookConfig project
|
|
9759
|
+
* @property {Array.<sqlanvil.ActionConfig.ITarget>|null} [dependencyTargets] NotebookConfig dependencyTargets
|
|
9760
|
+
* @property {string|null} [filename] NotebookConfig filename
|
|
9761
|
+
* @property {Array.<string>|null} [tags] NotebookConfig tags
|
|
9762
|
+
* @property {boolean|null} [disabled] NotebookConfig disabled
|
|
9763
|
+
* @property {string|null} [description] NotebookConfig description
|
|
9764
|
+
* @property {boolean|null} [dependOnDependencyAssertions] NotebookConfig dependOnDependencyAssertions
|
|
9765
|
+
*/
|
|
9766
|
+
|
|
9767
|
+
/**
|
|
9768
|
+
* Constructs a new NotebookConfig.
|
|
9769
|
+
* @memberof sqlanvil.ActionConfig
|
|
9770
|
+
* @classdesc Represents a NotebookConfig.
|
|
9771
|
+
* @implements INotebookConfig
|
|
9772
|
+
* @constructor
|
|
9773
|
+
* @param {sqlanvil.ActionConfig.INotebookConfig=} [properties] Properties to set
|
|
9774
|
+
*/
|
|
9775
|
+
function NotebookConfig(properties) {
|
|
9776
|
+
this.dependencyTargets = [];
|
|
9777
|
+
this.tags = [];
|
|
9778
|
+
if (properties)
|
|
9779
|
+
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
9780
|
+
if (properties[keys[i]] != null)
|
|
9781
|
+
this[keys[i]] = properties[keys[i]];
|
|
9782
|
+
}
|
|
9783
|
+
|
|
9784
|
+
/**
|
|
9785
|
+
* NotebookConfig name.
|
|
9786
|
+
* @member {string} name
|
|
9787
|
+
* @memberof sqlanvil.ActionConfig.NotebookConfig
|
|
9788
|
+
* @instance
|
|
9789
|
+
*/
|
|
9790
|
+
NotebookConfig.prototype.name = "";
|
|
9791
|
+
|
|
9792
|
+
/**
|
|
9793
|
+
* NotebookConfig location.
|
|
9794
|
+
* @member {string} location
|
|
9795
|
+
* @memberof sqlanvil.ActionConfig.NotebookConfig
|
|
9796
|
+
* @instance
|
|
9797
|
+
*/
|
|
9798
|
+
NotebookConfig.prototype.location = "";
|
|
9799
|
+
|
|
9800
|
+
/**
|
|
9801
|
+
* NotebookConfig project.
|
|
9802
|
+
* @member {string} project
|
|
9803
|
+
* @memberof sqlanvil.ActionConfig.NotebookConfig
|
|
9804
|
+
* @instance
|
|
9805
|
+
*/
|
|
9806
|
+
NotebookConfig.prototype.project = "";
|
|
9807
|
+
|
|
9808
|
+
/**
|
|
9809
|
+
* NotebookConfig dependencyTargets.
|
|
9810
|
+
* @member {Array.<sqlanvil.ActionConfig.ITarget>} dependencyTargets
|
|
9811
|
+
* @memberof sqlanvil.ActionConfig.NotebookConfig
|
|
9812
|
+
* @instance
|
|
9813
|
+
*/
|
|
9814
|
+
NotebookConfig.prototype.dependencyTargets = $util.emptyArray;
|
|
9815
|
+
|
|
9816
|
+
/**
|
|
9817
|
+
* NotebookConfig filename.
|
|
9818
|
+
* @member {string} filename
|
|
9819
|
+
* @memberof sqlanvil.ActionConfig.NotebookConfig
|
|
9820
|
+
* @instance
|
|
9821
|
+
*/
|
|
9822
|
+
NotebookConfig.prototype.filename = "";
|
|
9823
|
+
|
|
9824
|
+
/**
|
|
9825
|
+
* NotebookConfig tags.
|
|
9826
|
+
* @member {Array.<string>} tags
|
|
9827
|
+
* @memberof sqlanvil.ActionConfig.NotebookConfig
|
|
9828
|
+
* @instance
|
|
9829
|
+
*/
|
|
9830
|
+
NotebookConfig.prototype.tags = $util.emptyArray;
|
|
9831
|
+
|
|
9832
|
+
/**
|
|
9833
|
+
* NotebookConfig disabled.
|
|
9834
|
+
* @member {boolean} disabled
|
|
9835
|
+
* @memberof sqlanvil.ActionConfig.NotebookConfig
|
|
9836
|
+
* @instance
|
|
9837
|
+
*/
|
|
9838
|
+
NotebookConfig.prototype.disabled = false;
|
|
9839
|
+
|
|
9840
|
+
/**
|
|
9841
|
+
* NotebookConfig description.
|
|
9842
|
+
* @member {string} description
|
|
9843
|
+
* @memberof sqlanvil.ActionConfig.NotebookConfig
|
|
9844
|
+
* @instance
|
|
9845
|
+
*/
|
|
9846
|
+
NotebookConfig.prototype.description = "";
|
|
9847
|
+
|
|
9848
|
+
/**
|
|
9849
|
+
* NotebookConfig dependOnDependencyAssertions.
|
|
9850
|
+
* @member {boolean} dependOnDependencyAssertions
|
|
9851
|
+
* @memberof sqlanvil.ActionConfig.NotebookConfig
|
|
9852
|
+
* @instance
|
|
9853
|
+
*/
|
|
9854
|
+
NotebookConfig.prototype.dependOnDependencyAssertions = false;
|
|
9855
|
+
|
|
9856
|
+
/**
|
|
9857
|
+
* Creates a new NotebookConfig instance using the specified properties.
|
|
9858
|
+
* @function create
|
|
9859
|
+
* @memberof sqlanvil.ActionConfig.NotebookConfig
|
|
9860
|
+
* @static
|
|
9861
|
+
* @param {sqlanvil.ActionConfig.INotebookConfig=} [properties] Properties to set
|
|
9862
|
+
* @returns {sqlanvil.ActionConfig.NotebookConfig} NotebookConfig instance
|
|
9863
|
+
*/
|
|
9864
|
+
NotebookConfig.create = function create(properties) {
|
|
9865
|
+
return new NotebookConfig(properties);
|
|
9866
|
+
};
|
|
9867
|
+
|
|
9868
|
+
/**
|
|
9869
|
+
* Encodes the specified NotebookConfig message. Does not implicitly {@link sqlanvil.ActionConfig.NotebookConfig.verify|verify} messages.
|
|
9870
|
+
* @function encode
|
|
9871
|
+
* @memberof sqlanvil.ActionConfig.NotebookConfig
|
|
9872
|
+
* @static
|
|
9873
|
+
* @param {sqlanvil.ActionConfig.INotebookConfig} message NotebookConfig message or plain object to encode
|
|
9874
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
9875
|
+
* @returns {$protobuf.Writer} Writer
|
|
9876
|
+
*/
|
|
9877
|
+
NotebookConfig.encode = function encode(message, writer) {
|
|
9878
|
+
if (!writer)
|
|
9879
|
+
writer = $Writer.create();
|
|
9880
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
9881
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
9882
|
+
if (message.location != null && Object.hasOwnProperty.call(message, "location"))
|
|
9883
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.location);
|
|
9884
|
+
if (message.project != null && Object.hasOwnProperty.call(message, "project"))
|
|
9885
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.project);
|
|
9886
|
+
if (message.dependencyTargets != null && message.dependencyTargets.length)
|
|
9887
|
+
for (let i = 0; i < message.dependencyTargets.length; ++i)
|
|
9888
|
+
$root.sqlanvil.ActionConfig.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
9889
|
+
if (message.filename != null && Object.hasOwnProperty.call(message, "filename"))
|
|
9890
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.filename);
|
|
9891
|
+
if (message.tags != null && message.tags.length)
|
|
9892
|
+
for (let i = 0; i < message.tags.length; ++i)
|
|
9893
|
+
writer.uint32(/* id 6, wireType 2 =*/50).string(message.tags[i]);
|
|
9894
|
+
if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled"))
|
|
9895
|
+
writer.uint32(/* id 7, wireType 0 =*/56).bool(message.disabled);
|
|
9896
|
+
if (message.description != null && Object.hasOwnProperty.call(message, "description"))
|
|
9897
|
+
writer.uint32(/* id 8, wireType 2 =*/66).string(message.description);
|
|
9898
|
+
if (message.dependOnDependencyAssertions != null && Object.hasOwnProperty.call(message, "dependOnDependencyAssertions"))
|
|
9899
|
+
writer.uint32(/* id 9, wireType 0 =*/72).bool(message.dependOnDependencyAssertions);
|
|
9900
|
+
return writer;
|
|
9901
|
+
};
|
|
9902
|
+
|
|
9903
|
+
/**
|
|
9904
|
+
* Encodes the specified NotebookConfig message, length delimited. Does not implicitly {@link sqlanvil.ActionConfig.NotebookConfig.verify|verify} messages.
|
|
9905
|
+
* @function encodeDelimited
|
|
9906
|
+
* @memberof sqlanvil.ActionConfig.NotebookConfig
|
|
9907
|
+
* @static
|
|
9908
|
+
* @param {sqlanvil.ActionConfig.INotebookConfig} message NotebookConfig message or plain object to encode
|
|
9909
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
9910
|
+
* @returns {$protobuf.Writer} Writer
|
|
9911
|
+
*/
|
|
9912
|
+
NotebookConfig.encodeDelimited = function encodeDelimited(message, writer) {
|
|
9913
|
+
return this.encode(message, writer).ldelim();
|
|
9914
|
+
};
|
|
9915
|
+
|
|
9916
|
+
/**
|
|
9917
|
+
* Decodes a NotebookConfig message from the specified reader or buffer.
|
|
9918
|
+
* @function decode
|
|
9919
|
+
* @memberof sqlanvil.ActionConfig.NotebookConfig
|
|
9920
|
+
* @static
|
|
9921
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
9922
|
+
* @param {number} [length] Message length if known beforehand
|
|
9923
|
+
* @returns {sqlanvil.ActionConfig.NotebookConfig} NotebookConfig
|
|
9924
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
9925
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
9926
|
+
*/
|
|
9927
|
+
NotebookConfig.decode = function decode(reader, length, error) {
|
|
9928
|
+
if (!(reader instanceof $Reader))
|
|
9929
|
+
reader = $Reader.create(reader);
|
|
9930
|
+
let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.ActionConfig.NotebookConfig();
|
|
9931
|
+
while (reader.pos < end) {
|
|
9932
|
+
let tag = reader.uint32();
|
|
9933
|
+
if (tag === error)
|
|
9934
|
+
break;
|
|
9935
|
+
switch (tag >>> 3) {
|
|
9936
|
+
case 1: {
|
|
9937
|
+
message.name = reader.string();
|
|
9938
|
+
break;
|
|
9939
|
+
}
|
|
9940
|
+
case 2: {
|
|
9941
|
+
message.location = reader.string();
|
|
9114
9942
|
break;
|
|
9115
9943
|
}
|
|
9116
9944
|
case 3: {
|
|
@@ -21947,6 +22775,648 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
21947
22775
|
return Operation;
|
|
21948
22776
|
})();
|
|
21949
22777
|
|
|
22778
|
+
sqlanvil.Export = (function() {
|
|
22779
|
+
|
|
22780
|
+
/**
|
|
22781
|
+
* Properties of an Export.
|
|
22782
|
+
* @memberof sqlanvil
|
|
22783
|
+
* @interface IExport
|
|
22784
|
+
* @property {sqlanvil.ITarget|null} [target] Export target
|
|
22785
|
+
* @property {sqlanvil.ITarget|null} [canonicalTarget] Export canonicalTarget
|
|
22786
|
+
* @property {Array.<sqlanvil.ITarget>|null} [dependencyTargets] Export dependencyTargets
|
|
22787
|
+
* @property {sqlanvil.ActionHermeticity|null} [hermeticity] Export hermeticity
|
|
22788
|
+
* @property {boolean|null} [disabled] Export disabled
|
|
22789
|
+
* @property {Array.<string>|null} [tags] Export tags
|
|
22790
|
+
* @property {sqlanvil.IActionDescriptor|null} [actionDescriptor] Export actionDescriptor
|
|
22791
|
+
* @property {string|null} [query] Export query
|
|
22792
|
+
* @property {string|null} [location] Export location
|
|
22793
|
+
* @property {string|null} [format] Export format
|
|
22794
|
+
* @property {boolean|null} [overwrite] Export overwrite
|
|
22795
|
+
* @property {string|null} [filename] Export filename
|
|
22796
|
+
* @property {Object.<string,string>|null} [options] Export options
|
|
22797
|
+
* @property {string|null} [fileName] Export fileName
|
|
22798
|
+
* @property {string|null} [jitCode] Export jitCode
|
|
22799
|
+
*/
|
|
22800
|
+
|
|
22801
|
+
/**
|
|
22802
|
+
* Constructs a new Export.
|
|
22803
|
+
* @memberof sqlanvil
|
|
22804
|
+
* @classdesc Represents an Export.
|
|
22805
|
+
* @implements IExport
|
|
22806
|
+
* @constructor
|
|
22807
|
+
* @param {sqlanvil.IExport=} [properties] Properties to set
|
|
22808
|
+
*/
|
|
22809
|
+
function Export(properties) {
|
|
22810
|
+
this.dependencyTargets = [];
|
|
22811
|
+
this.tags = [];
|
|
22812
|
+
this.options = {};
|
|
22813
|
+
if (properties)
|
|
22814
|
+
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
22815
|
+
if (properties[keys[i]] != null)
|
|
22816
|
+
this[keys[i]] = properties[keys[i]];
|
|
22817
|
+
}
|
|
22818
|
+
|
|
22819
|
+
/**
|
|
22820
|
+
* Export target.
|
|
22821
|
+
* @member {sqlanvil.ITarget|null|undefined} target
|
|
22822
|
+
* @memberof sqlanvil.Export
|
|
22823
|
+
* @instance
|
|
22824
|
+
*/
|
|
22825
|
+
Export.prototype.target = null;
|
|
22826
|
+
|
|
22827
|
+
/**
|
|
22828
|
+
* Export canonicalTarget.
|
|
22829
|
+
* @member {sqlanvil.ITarget|null|undefined} canonicalTarget
|
|
22830
|
+
* @memberof sqlanvil.Export
|
|
22831
|
+
* @instance
|
|
22832
|
+
*/
|
|
22833
|
+
Export.prototype.canonicalTarget = null;
|
|
22834
|
+
|
|
22835
|
+
/**
|
|
22836
|
+
* Export dependencyTargets.
|
|
22837
|
+
* @member {Array.<sqlanvil.ITarget>} dependencyTargets
|
|
22838
|
+
* @memberof sqlanvil.Export
|
|
22839
|
+
* @instance
|
|
22840
|
+
*/
|
|
22841
|
+
Export.prototype.dependencyTargets = $util.emptyArray;
|
|
22842
|
+
|
|
22843
|
+
/**
|
|
22844
|
+
* Export hermeticity.
|
|
22845
|
+
* @member {sqlanvil.ActionHermeticity} hermeticity
|
|
22846
|
+
* @memberof sqlanvil.Export
|
|
22847
|
+
* @instance
|
|
22848
|
+
*/
|
|
22849
|
+
Export.prototype.hermeticity = 0;
|
|
22850
|
+
|
|
22851
|
+
/**
|
|
22852
|
+
* Export disabled.
|
|
22853
|
+
* @member {boolean} disabled
|
|
22854
|
+
* @memberof sqlanvil.Export
|
|
22855
|
+
* @instance
|
|
22856
|
+
*/
|
|
22857
|
+
Export.prototype.disabled = false;
|
|
22858
|
+
|
|
22859
|
+
/**
|
|
22860
|
+
* Export tags.
|
|
22861
|
+
* @member {Array.<string>} tags
|
|
22862
|
+
* @memberof sqlanvil.Export
|
|
22863
|
+
* @instance
|
|
22864
|
+
*/
|
|
22865
|
+
Export.prototype.tags = $util.emptyArray;
|
|
22866
|
+
|
|
22867
|
+
/**
|
|
22868
|
+
* Export actionDescriptor.
|
|
22869
|
+
* @member {sqlanvil.IActionDescriptor|null|undefined} actionDescriptor
|
|
22870
|
+
* @memberof sqlanvil.Export
|
|
22871
|
+
* @instance
|
|
22872
|
+
*/
|
|
22873
|
+
Export.prototype.actionDescriptor = null;
|
|
22874
|
+
|
|
22875
|
+
/**
|
|
22876
|
+
* Export query.
|
|
22877
|
+
* @member {string} query
|
|
22878
|
+
* @memberof sqlanvil.Export
|
|
22879
|
+
* @instance
|
|
22880
|
+
*/
|
|
22881
|
+
Export.prototype.query = "";
|
|
22882
|
+
|
|
22883
|
+
/**
|
|
22884
|
+
* Export location.
|
|
22885
|
+
* @member {string} location
|
|
22886
|
+
* @memberof sqlanvil.Export
|
|
22887
|
+
* @instance
|
|
22888
|
+
*/
|
|
22889
|
+
Export.prototype.location = "";
|
|
22890
|
+
|
|
22891
|
+
/**
|
|
22892
|
+
* Export format.
|
|
22893
|
+
* @member {string} format
|
|
22894
|
+
* @memberof sqlanvil.Export
|
|
22895
|
+
* @instance
|
|
22896
|
+
*/
|
|
22897
|
+
Export.prototype.format = "";
|
|
22898
|
+
|
|
22899
|
+
/**
|
|
22900
|
+
* Export overwrite.
|
|
22901
|
+
* @member {boolean} overwrite
|
|
22902
|
+
* @memberof sqlanvil.Export
|
|
22903
|
+
* @instance
|
|
22904
|
+
*/
|
|
22905
|
+
Export.prototype.overwrite = false;
|
|
22906
|
+
|
|
22907
|
+
/**
|
|
22908
|
+
* Export filename.
|
|
22909
|
+
* @member {string} filename
|
|
22910
|
+
* @memberof sqlanvil.Export
|
|
22911
|
+
* @instance
|
|
22912
|
+
*/
|
|
22913
|
+
Export.prototype.filename = "";
|
|
22914
|
+
|
|
22915
|
+
/**
|
|
22916
|
+
* Export options.
|
|
22917
|
+
* @member {Object.<string,string>} options
|
|
22918
|
+
* @memberof sqlanvil.Export
|
|
22919
|
+
* @instance
|
|
22920
|
+
*/
|
|
22921
|
+
Export.prototype.options = $util.emptyObject;
|
|
22922
|
+
|
|
22923
|
+
/**
|
|
22924
|
+
* Export fileName.
|
|
22925
|
+
* @member {string} fileName
|
|
22926
|
+
* @memberof sqlanvil.Export
|
|
22927
|
+
* @instance
|
|
22928
|
+
*/
|
|
22929
|
+
Export.prototype.fileName = "";
|
|
22930
|
+
|
|
22931
|
+
/**
|
|
22932
|
+
* Export jitCode.
|
|
22933
|
+
* @member {string} jitCode
|
|
22934
|
+
* @memberof sqlanvil.Export
|
|
22935
|
+
* @instance
|
|
22936
|
+
*/
|
|
22937
|
+
Export.prototype.jitCode = "";
|
|
22938
|
+
|
|
22939
|
+
/**
|
|
22940
|
+
* Creates a new Export instance using the specified properties.
|
|
22941
|
+
* @function create
|
|
22942
|
+
* @memberof sqlanvil.Export
|
|
22943
|
+
* @static
|
|
22944
|
+
* @param {sqlanvil.IExport=} [properties] Properties to set
|
|
22945
|
+
* @returns {sqlanvil.Export} Export instance
|
|
22946
|
+
*/
|
|
22947
|
+
Export.create = function create(properties) {
|
|
22948
|
+
return new Export(properties);
|
|
22949
|
+
};
|
|
22950
|
+
|
|
22951
|
+
/**
|
|
22952
|
+
* Encodes the specified Export message. Does not implicitly {@link sqlanvil.Export.verify|verify} messages.
|
|
22953
|
+
* @function encode
|
|
22954
|
+
* @memberof sqlanvil.Export
|
|
22955
|
+
* @static
|
|
22956
|
+
* @param {sqlanvil.IExport} message Export message or plain object to encode
|
|
22957
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
22958
|
+
* @returns {$protobuf.Writer} Writer
|
|
22959
|
+
*/
|
|
22960
|
+
Export.encode = function encode(message, writer) {
|
|
22961
|
+
if (!writer)
|
|
22962
|
+
writer = $Writer.create();
|
|
22963
|
+
if (message.target != null && Object.hasOwnProperty.call(message, "target"))
|
|
22964
|
+
$root.sqlanvil.Target.encode(message.target, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
22965
|
+
if (message.canonicalTarget != null && Object.hasOwnProperty.call(message, "canonicalTarget"))
|
|
22966
|
+
$root.sqlanvil.Target.encode(message.canonicalTarget, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
22967
|
+
if (message.dependencyTargets != null && message.dependencyTargets.length)
|
|
22968
|
+
for (let i = 0; i < message.dependencyTargets.length; ++i)
|
|
22969
|
+
$root.sqlanvil.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
22970
|
+
if (message.hermeticity != null && Object.hasOwnProperty.call(message, "hermeticity"))
|
|
22971
|
+
writer.uint32(/* id 4, wireType 0 =*/32).int32(message.hermeticity);
|
|
22972
|
+
if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled"))
|
|
22973
|
+
writer.uint32(/* id 5, wireType 0 =*/40).bool(message.disabled);
|
|
22974
|
+
if (message.tags != null && message.tags.length)
|
|
22975
|
+
for (let i = 0; i < message.tags.length; ++i)
|
|
22976
|
+
writer.uint32(/* id 6, wireType 2 =*/50).string(message.tags[i]);
|
|
22977
|
+
if (message.actionDescriptor != null && Object.hasOwnProperty.call(message, "actionDescriptor"))
|
|
22978
|
+
$root.sqlanvil.ActionDescriptor.encode(message.actionDescriptor, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
|
22979
|
+
if (message.query != null && Object.hasOwnProperty.call(message, "query"))
|
|
22980
|
+
writer.uint32(/* id 8, wireType 2 =*/66).string(message.query);
|
|
22981
|
+
if (message.location != null && Object.hasOwnProperty.call(message, "location"))
|
|
22982
|
+
writer.uint32(/* id 9, wireType 2 =*/74).string(message.location);
|
|
22983
|
+
if (message.format != null && Object.hasOwnProperty.call(message, "format"))
|
|
22984
|
+
writer.uint32(/* id 10, wireType 2 =*/82).string(message.format);
|
|
22985
|
+
if (message.overwrite != null && Object.hasOwnProperty.call(message, "overwrite"))
|
|
22986
|
+
writer.uint32(/* id 11, wireType 0 =*/88).bool(message.overwrite);
|
|
22987
|
+
if (message.filename != null && Object.hasOwnProperty.call(message, "filename"))
|
|
22988
|
+
writer.uint32(/* id 12, wireType 2 =*/98).string(message.filename);
|
|
22989
|
+
if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
|
22990
|
+
for (let keys = Object.keys(message.options), i = 0; i < keys.length; ++i)
|
|
22991
|
+
writer.uint32(/* id 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.options[keys[i]]).ldelim();
|
|
22992
|
+
if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName"))
|
|
22993
|
+
writer.uint32(/* id 14, wireType 2 =*/114).string(message.fileName);
|
|
22994
|
+
if (message.jitCode != null && Object.hasOwnProperty.call(message, "jitCode"))
|
|
22995
|
+
writer.uint32(/* id 15, wireType 2 =*/122).string(message.jitCode);
|
|
22996
|
+
return writer;
|
|
22997
|
+
};
|
|
22998
|
+
|
|
22999
|
+
/**
|
|
23000
|
+
* Encodes the specified Export message, length delimited. Does not implicitly {@link sqlanvil.Export.verify|verify} messages.
|
|
23001
|
+
* @function encodeDelimited
|
|
23002
|
+
* @memberof sqlanvil.Export
|
|
23003
|
+
* @static
|
|
23004
|
+
* @param {sqlanvil.IExport} message Export message or plain object to encode
|
|
23005
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23006
|
+
* @returns {$protobuf.Writer} Writer
|
|
23007
|
+
*/
|
|
23008
|
+
Export.encodeDelimited = function encodeDelimited(message, writer) {
|
|
23009
|
+
return this.encode(message, writer).ldelim();
|
|
23010
|
+
};
|
|
23011
|
+
|
|
23012
|
+
/**
|
|
23013
|
+
* Decodes an Export message from the specified reader or buffer.
|
|
23014
|
+
* @function decode
|
|
23015
|
+
* @memberof sqlanvil.Export
|
|
23016
|
+
* @static
|
|
23017
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23018
|
+
* @param {number} [length] Message length if known beforehand
|
|
23019
|
+
* @returns {sqlanvil.Export} Export
|
|
23020
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23021
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23022
|
+
*/
|
|
23023
|
+
Export.decode = function decode(reader, length, error) {
|
|
23024
|
+
if (!(reader instanceof $Reader))
|
|
23025
|
+
reader = $Reader.create(reader);
|
|
23026
|
+
let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.Export(), key, value;
|
|
23027
|
+
while (reader.pos < end) {
|
|
23028
|
+
let tag = reader.uint32();
|
|
23029
|
+
if (tag === error)
|
|
23030
|
+
break;
|
|
23031
|
+
switch (tag >>> 3) {
|
|
23032
|
+
case 1: {
|
|
23033
|
+
message.target = $root.sqlanvil.Target.decode(reader, reader.uint32());
|
|
23034
|
+
break;
|
|
23035
|
+
}
|
|
23036
|
+
case 2: {
|
|
23037
|
+
message.canonicalTarget = $root.sqlanvil.Target.decode(reader, reader.uint32());
|
|
23038
|
+
break;
|
|
23039
|
+
}
|
|
23040
|
+
case 3: {
|
|
23041
|
+
if (!(message.dependencyTargets && message.dependencyTargets.length))
|
|
23042
|
+
message.dependencyTargets = [];
|
|
23043
|
+
message.dependencyTargets.push($root.sqlanvil.Target.decode(reader, reader.uint32()));
|
|
23044
|
+
break;
|
|
23045
|
+
}
|
|
23046
|
+
case 4: {
|
|
23047
|
+
message.hermeticity = reader.int32();
|
|
23048
|
+
break;
|
|
23049
|
+
}
|
|
23050
|
+
case 5: {
|
|
23051
|
+
message.disabled = reader.bool();
|
|
23052
|
+
break;
|
|
23053
|
+
}
|
|
23054
|
+
case 6: {
|
|
23055
|
+
if (!(message.tags && message.tags.length))
|
|
23056
|
+
message.tags = [];
|
|
23057
|
+
message.tags.push(reader.string());
|
|
23058
|
+
break;
|
|
23059
|
+
}
|
|
23060
|
+
case 7: {
|
|
23061
|
+
message.actionDescriptor = $root.sqlanvil.ActionDescriptor.decode(reader, reader.uint32());
|
|
23062
|
+
break;
|
|
23063
|
+
}
|
|
23064
|
+
case 8: {
|
|
23065
|
+
message.query = reader.string();
|
|
23066
|
+
break;
|
|
23067
|
+
}
|
|
23068
|
+
case 9: {
|
|
23069
|
+
message.location = reader.string();
|
|
23070
|
+
break;
|
|
23071
|
+
}
|
|
23072
|
+
case 10: {
|
|
23073
|
+
message.format = reader.string();
|
|
23074
|
+
break;
|
|
23075
|
+
}
|
|
23076
|
+
case 11: {
|
|
23077
|
+
message.overwrite = reader.bool();
|
|
23078
|
+
break;
|
|
23079
|
+
}
|
|
23080
|
+
case 12: {
|
|
23081
|
+
message.filename = reader.string();
|
|
23082
|
+
break;
|
|
23083
|
+
}
|
|
23084
|
+
case 13: {
|
|
23085
|
+
if (message.options === $util.emptyObject)
|
|
23086
|
+
message.options = {};
|
|
23087
|
+
let end2 = reader.uint32() + reader.pos;
|
|
23088
|
+
key = "";
|
|
23089
|
+
value = "";
|
|
23090
|
+
while (reader.pos < end2) {
|
|
23091
|
+
let tag2 = reader.uint32();
|
|
23092
|
+
switch (tag2 >>> 3) {
|
|
23093
|
+
case 1:
|
|
23094
|
+
key = reader.string();
|
|
23095
|
+
break;
|
|
23096
|
+
case 2:
|
|
23097
|
+
value = reader.string();
|
|
23098
|
+
break;
|
|
23099
|
+
default:
|
|
23100
|
+
reader.skipType(tag2 & 7);
|
|
23101
|
+
break;
|
|
23102
|
+
}
|
|
23103
|
+
}
|
|
23104
|
+
message.options[key] = value;
|
|
23105
|
+
break;
|
|
23106
|
+
}
|
|
23107
|
+
case 14: {
|
|
23108
|
+
message.fileName = reader.string();
|
|
23109
|
+
break;
|
|
23110
|
+
}
|
|
23111
|
+
case 15: {
|
|
23112
|
+
message.jitCode = reader.string();
|
|
23113
|
+
break;
|
|
23114
|
+
}
|
|
23115
|
+
default:
|
|
23116
|
+
reader.skipType(tag & 7);
|
|
23117
|
+
break;
|
|
23118
|
+
}
|
|
23119
|
+
}
|
|
23120
|
+
return message;
|
|
23121
|
+
};
|
|
23122
|
+
|
|
23123
|
+
/**
|
|
23124
|
+
* Decodes an Export message from the specified reader or buffer, length delimited.
|
|
23125
|
+
* @function decodeDelimited
|
|
23126
|
+
* @memberof sqlanvil.Export
|
|
23127
|
+
* @static
|
|
23128
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23129
|
+
* @returns {sqlanvil.Export} Export
|
|
23130
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23131
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23132
|
+
*/
|
|
23133
|
+
Export.decodeDelimited = function decodeDelimited(reader) {
|
|
23134
|
+
if (!(reader instanceof $Reader))
|
|
23135
|
+
reader = new $Reader(reader);
|
|
23136
|
+
return this.decode(reader, reader.uint32());
|
|
23137
|
+
};
|
|
23138
|
+
|
|
23139
|
+
/**
|
|
23140
|
+
* Verifies an Export message.
|
|
23141
|
+
* @function verify
|
|
23142
|
+
* @memberof sqlanvil.Export
|
|
23143
|
+
* @static
|
|
23144
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
23145
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
23146
|
+
*/
|
|
23147
|
+
Export.verify = function verify(message) {
|
|
23148
|
+
if (typeof message !== "object" || message === null)
|
|
23149
|
+
return "object expected";
|
|
23150
|
+
if (message.target != null && message.hasOwnProperty("target")) {
|
|
23151
|
+
let error = $root.sqlanvil.Target.verify(message.target);
|
|
23152
|
+
if (error)
|
|
23153
|
+
return "target." + error;
|
|
23154
|
+
}
|
|
23155
|
+
if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget")) {
|
|
23156
|
+
let error = $root.sqlanvil.Target.verify(message.canonicalTarget);
|
|
23157
|
+
if (error)
|
|
23158
|
+
return "canonicalTarget." + error;
|
|
23159
|
+
}
|
|
23160
|
+
if (message.dependencyTargets != null && message.hasOwnProperty("dependencyTargets")) {
|
|
23161
|
+
if (!Array.isArray(message.dependencyTargets))
|
|
23162
|
+
return "dependencyTargets: array expected";
|
|
23163
|
+
for (let i = 0; i < message.dependencyTargets.length; ++i) {
|
|
23164
|
+
let error = $root.sqlanvil.Target.verify(message.dependencyTargets[i]);
|
|
23165
|
+
if (error)
|
|
23166
|
+
return "dependencyTargets." + error;
|
|
23167
|
+
}
|
|
23168
|
+
}
|
|
23169
|
+
if (message.hermeticity != null && message.hasOwnProperty("hermeticity"))
|
|
23170
|
+
switch (message.hermeticity) {
|
|
23171
|
+
default:
|
|
23172
|
+
return "hermeticity: enum value expected";
|
|
23173
|
+
case 0:
|
|
23174
|
+
case 1:
|
|
23175
|
+
case 2:
|
|
23176
|
+
break;
|
|
23177
|
+
}
|
|
23178
|
+
if (message.disabled != null && message.hasOwnProperty("disabled"))
|
|
23179
|
+
if (typeof message.disabled !== "boolean")
|
|
23180
|
+
return "disabled: boolean expected";
|
|
23181
|
+
if (message.tags != null && message.hasOwnProperty("tags")) {
|
|
23182
|
+
if (!Array.isArray(message.tags))
|
|
23183
|
+
return "tags: array expected";
|
|
23184
|
+
for (let i = 0; i < message.tags.length; ++i)
|
|
23185
|
+
if (!$util.isString(message.tags[i]))
|
|
23186
|
+
return "tags: string[] expected";
|
|
23187
|
+
}
|
|
23188
|
+
if (message.actionDescriptor != null && message.hasOwnProperty("actionDescriptor")) {
|
|
23189
|
+
let error = $root.sqlanvil.ActionDescriptor.verify(message.actionDescriptor);
|
|
23190
|
+
if (error)
|
|
23191
|
+
return "actionDescriptor." + error;
|
|
23192
|
+
}
|
|
23193
|
+
if (message.query != null && message.hasOwnProperty("query"))
|
|
23194
|
+
if (!$util.isString(message.query))
|
|
23195
|
+
return "query: string expected";
|
|
23196
|
+
if (message.location != null && message.hasOwnProperty("location"))
|
|
23197
|
+
if (!$util.isString(message.location))
|
|
23198
|
+
return "location: string expected";
|
|
23199
|
+
if (message.format != null && message.hasOwnProperty("format"))
|
|
23200
|
+
if (!$util.isString(message.format))
|
|
23201
|
+
return "format: string expected";
|
|
23202
|
+
if (message.overwrite != null && message.hasOwnProperty("overwrite"))
|
|
23203
|
+
if (typeof message.overwrite !== "boolean")
|
|
23204
|
+
return "overwrite: boolean expected";
|
|
23205
|
+
if (message.filename != null && message.hasOwnProperty("filename"))
|
|
23206
|
+
if (!$util.isString(message.filename))
|
|
23207
|
+
return "filename: string expected";
|
|
23208
|
+
if (message.options != null && message.hasOwnProperty("options")) {
|
|
23209
|
+
if (!$util.isObject(message.options))
|
|
23210
|
+
return "options: object expected";
|
|
23211
|
+
let key = Object.keys(message.options);
|
|
23212
|
+
for (let i = 0; i < key.length; ++i)
|
|
23213
|
+
if (!$util.isString(message.options[key[i]]))
|
|
23214
|
+
return "options: string{k:string} expected";
|
|
23215
|
+
}
|
|
23216
|
+
if (message.fileName != null && message.hasOwnProperty("fileName"))
|
|
23217
|
+
if (!$util.isString(message.fileName))
|
|
23218
|
+
return "fileName: string expected";
|
|
23219
|
+
if (message.jitCode != null && message.hasOwnProperty("jitCode"))
|
|
23220
|
+
if (!$util.isString(message.jitCode))
|
|
23221
|
+
return "jitCode: string expected";
|
|
23222
|
+
return null;
|
|
23223
|
+
};
|
|
23224
|
+
|
|
23225
|
+
/**
|
|
23226
|
+
* Creates an Export message from a plain object. Also converts values to their respective internal types.
|
|
23227
|
+
* @function fromObject
|
|
23228
|
+
* @memberof sqlanvil.Export
|
|
23229
|
+
* @static
|
|
23230
|
+
* @param {Object.<string,*>} object Plain object
|
|
23231
|
+
* @returns {sqlanvil.Export} Export
|
|
23232
|
+
*/
|
|
23233
|
+
Export.fromObject = function fromObject(object) {
|
|
23234
|
+
if (object instanceof $root.sqlanvil.Export)
|
|
23235
|
+
return object;
|
|
23236
|
+
let message = new $root.sqlanvil.Export();
|
|
23237
|
+
if (object.target != null) {
|
|
23238
|
+
if (typeof object.target !== "object")
|
|
23239
|
+
throw TypeError(".sqlanvil.Export.target: object expected");
|
|
23240
|
+
message.target = $root.sqlanvil.Target.fromObject(object.target);
|
|
23241
|
+
}
|
|
23242
|
+
if (object.canonicalTarget != null) {
|
|
23243
|
+
if (typeof object.canonicalTarget !== "object")
|
|
23244
|
+
throw TypeError(".sqlanvil.Export.canonicalTarget: object expected");
|
|
23245
|
+
message.canonicalTarget = $root.sqlanvil.Target.fromObject(object.canonicalTarget);
|
|
23246
|
+
}
|
|
23247
|
+
if (object.dependencyTargets) {
|
|
23248
|
+
if (!Array.isArray(object.dependencyTargets))
|
|
23249
|
+
throw TypeError(".sqlanvil.Export.dependencyTargets: array expected");
|
|
23250
|
+
message.dependencyTargets = [];
|
|
23251
|
+
for (let i = 0; i < object.dependencyTargets.length; ++i) {
|
|
23252
|
+
if (typeof object.dependencyTargets[i] !== "object")
|
|
23253
|
+
throw TypeError(".sqlanvil.Export.dependencyTargets: object expected");
|
|
23254
|
+
message.dependencyTargets[i] = $root.sqlanvil.Target.fromObject(object.dependencyTargets[i]);
|
|
23255
|
+
}
|
|
23256
|
+
}
|
|
23257
|
+
switch (object.hermeticity) {
|
|
23258
|
+
default:
|
|
23259
|
+
if (typeof object.hermeticity === "number") {
|
|
23260
|
+
message.hermeticity = object.hermeticity;
|
|
23261
|
+
break;
|
|
23262
|
+
}
|
|
23263
|
+
break;
|
|
23264
|
+
case "UNKNOWN":
|
|
23265
|
+
case 0:
|
|
23266
|
+
message.hermeticity = 0;
|
|
23267
|
+
break;
|
|
23268
|
+
case "HERMETIC":
|
|
23269
|
+
case 1:
|
|
23270
|
+
message.hermeticity = 1;
|
|
23271
|
+
break;
|
|
23272
|
+
case "NON_HERMETIC":
|
|
23273
|
+
case 2:
|
|
23274
|
+
message.hermeticity = 2;
|
|
23275
|
+
break;
|
|
23276
|
+
}
|
|
23277
|
+
if (object.disabled != null)
|
|
23278
|
+
message.disabled = Boolean(object.disabled);
|
|
23279
|
+
if (object.tags) {
|
|
23280
|
+
if (!Array.isArray(object.tags))
|
|
23281
|
+
throw TypeError(".sqlanvil.Export.tags: array expected");
|
|
23282
|
+
message.tags = [];
|
|
23283
|
+
for (let i = 0; i < object.tags.length; ++i)
|
|
23284
|
+
message.tags[i] = String(object.tags[i]);
|
|
23285
|
+
}
|
|
23286
|
+
if (object.actionDescriptor != null) {
|
|
23287
|
+
if (typeof object.actionDescriptor !== "object")
|
|
23288
|
+
throw TypeError(".sqlanvil.Export.actionDescriptor: object expected");
|
|
23289
|
+
message.actionDescriptor = $root.sqlanvil.ActionDescriptor.fromObject(object.actionDescriptor);
|
|
23290
|
+
}
|
|
23291
|
+
if (object.query != null)
|
|
23292
|
+
message.query = String(object.query);
|
|
23293
|
+
if (object.location != null)
|
|
23294
|
+
message.location = String(object.location);
|
|
23295
|
+
if (object.format != null)
|
|
23296
|
+
message.format = String(object.format);
|
|
23297
|
+
if (object.overwrite != null)
|
|
23298
|
+
message.overwrite = Boolean(object.overwrite);
|
|
23299
|
+
if (object.filename != null)
|
|
23300
|
+
message.filename = String(object.filename);
|
|
23301
|
+
if (object.options) {
|
|
23302
|
+
if (typeof object.options !== "object")
|
|
23303
|
+
throw TypeError(".sqlanvil.Export.options: object expected");
|
|
23304
|
+
message.options = {};
|
|
23305
|
+
for (let keys = Object.keys(object.options), i = 0; i < keys.length; ++i)
|
|
23306
|
+
message.options[keys[i]] = String(object.options[keys[i]]);
|
|
23307
|
+
}
|
|
23308
|
+
if (object.fileName != null)
|
|
23309
|
+
message.fileName = String(object.fileName);
|
|
23310
|
+
if (object.jitCode != null)
|
|
23311
|
+
message.jitCode = String(object.jitCode);
|
|
23312
|
+
return message;
|
|
23313
|
+
};
|
|
23314
|
+
|
|
23315
|
+
/**
|
|
23316
|
+
* Creates a plain object from an Export message. Also converts values to other types if specified.
|
|
23317
|
+
* @function toObject
|
|
23318
|
+
* @memberof sqlanvil.Export
|
|
23319
|
+
* @static
|
|
23320
|
+
* @param {sqlanvil.Export} message Export
|
|
23321
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
23322
|
+
* @returns {Object.<string,*>} Plain object
|
|
23323
|
+
*/
|
|
23324
|
+
Export.toObject = function toObject(message, options) {
|
|
23325
|
+
if (!options)
|
|
23326
|
+
options = {};
|
|
23327
|
+
let object = {};
|
|
23328
|
+
if (options.arrays || options.defaults) {
|
|
23329
|
+
object.dependencyTargets = [];
|
|
23330
|
+
object.tags = [];
|
|
23331
|
+
}
|
|
23332
|
+
if (options.objects || options.defaults)
|
|
23333
|
+
object.options = {};
|
|
23334
|
+
if (options.defaults) {
|
|
23335
|
+
object.target = null;
|
|
23336
|
+
object.canonicalTarget = null;
|
|
23337
|
+
object.hermeticity = options.enums === String ? "UNKNOWN" : 0;
|
|
23338
|
+
object.disabled = false;
|
|
23339
|
+
object.actionDescriptor = null;
|
|
23340
|
+
object.query = "";
|
|
23341
|
+
object.location = "";
|
|
23342
|
+
object.format = "";
|
|
23343
|
+
object.overwrite = false;
|
|
23344
|
+
object.filename = "";
|
|
23345
|
+
object.fileName = "";
|
|
23346
|
+
object.jitCode = "";
|
|
23347
|
+
}
|
|
23348
|
+
if (message.target != null && message.hasOwnProperty("target"))
|
|
23349
|
+
object.target = $root.sqlanvil.Target.toObject(message.target, options);
|
|
23350
|
+
if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget"))
|
|
23351
|
+
object.canonicalTarget = $root.sqlanvil.Target.toObject(message.canonicalTarget, options);
|
|
23352
|
+
if (message.dependencyTargets && message.dependencyTargets.length) {
|
|
23353
|
+
object.dependencyTargets = [];
|
|
23354
|
+
for (let j = 0; j < message.dependencyTargets.length; ++j)
|
|
23355
|
+
object.dependencyTargets[j] = $root.sqlanvil.Target.toObject(message.dependencyTargets[j], options);
|
|
23356
|
+
}
|
|
23357
|
+
if (message.hermeticity != null && message.hasOwnProperty("hermeticity"))
|
|
23358
|
+
object.hermeticity = options.enums === String ? $root.sqlanvil.ActionHermeticity[message.hermeticity] === undefined ? message.hermeticity : $root.sqlanvil.ActionHermeticity[message.hermeticity] : message.hermeticity;
|
|
23359
|
+
if (message.disabled != null && message.hasOwnProperty("disabled"))
|
|
23360
|
+
object.disabled = message.disabled;
|
|
23361
|
+
if (message.tags && message.tags.length) {
|
|
23362
|
+
object.tags = [];
|
|
23363
|
+
for (let j = 0; j < message.tags.length; ++j)
|
|
23364
|
+
object.tags[j] = message.tags[j];
|
|
23365
|
+
}
|
|
23366
|
+
if (message.actionDescriptor != null && message.hasOwnProperty("actionDescriptor"))
|
|
23367
|
+
object.actionDescriptor = $root.sqlanvil.ActionDescriptor.toObject(message.actionDescriptor, options);
|
|
23368
|
+
if (message.query != null && message.hasOwnProperty("query"))
|
|
23369
|
+
object.query = message.query;
|
|
23370
|
+
if (message.location != null && message.hasOwnProperty("location"))
|
|
23371
|
+
object.location = message.location;
|
|
23372
|
+
if (message.format != null && message.hasOwnProperty("format"))
|
|
23373
|
+
object.format = message.format;
|
|
23374
|
+
if (message.overwrite != null && message.hasOwnProperty("overwrite"))
|
|
23375
|
+
object.overwrite = message.overwrite;
|
|
23376
|
+
if (message.filename != null && message.hasOwnProperty("filename"))
|
|
23377
|
+
object.filename = message.filename;
|
|
23378
|
+
let keys2;
|
|
23379
|
+
if (message.options && (keys2 = Object.keys(message.options)).length) {
|
|
23380
|
+
object.options = {};
|
|
23381
|
+
for (let j = 0; j < keys2.length; ++j)
|
|
23382
|
+
object.options[keys2[j]] = message.options[keys2[j]];
|
|
23383
|
+
}
|
|
23384
|
+
if (message.fileName != null && message.hasOwnProperty("fileName"))
|
|
23385
|
+
object.fileName = message.fileName;
|
|
23386
|
+
if (message.jitCode != null && message.hasOwnProperty("jitCode"))
|
|
23387
|
+
object.jitCode = message.jitCode;
|
|
23388
|
+
return object;
|
|
23389
|
+
};
|
|
23390
|
+
|
|
23391
|
+
/**
|
|
23392
|
+
* Converts this Export to JSON.
|
|
23393
|
+
* @function toJSON
|
|
23394
|
+
* @memberof sqlanvil.Export
|
|
23395
|
+
* @instance
|
|
23396
|
+
* @returns {Object.<string,*>} JSON object
|
|
23397
|
+
*/
|
|
23398
|
+
Export.prototype.toJSON = function toJSON() {
|
|
23399
|
+
return this.constructor.toObject(this, $protobuf__namespace.util.toJSONOptions);
|
|
23400
|
+
};
|
|
23401
|
+
|
|
23402
|
+
/**
|
|
23403
|
+
* Gets the default type url for Export
|
|
23404
|
+
* @function getTypeUrl
|
|
23405
|
+
* @memberof sqlanvil.Export
|
|
23406
|
+
* @static
|
|
23407
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
23408
|
+
* @returns {string} The default type url
|
|
23409
|
+
*/
|
|
23410
|
+
Export.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
23411
|
+
if (typeUrlPrefix === undefined) {
|
|
23412
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
23413
|
+
}
|
|
23414
|
+
return typeUrlPrefix + "/sqlanvil.Export";
|
|
23415
|
+
};
|
|
23416
|
+
|
|
23417
|
+
return Export;
|
|
23418
|
+
})();
|
|
23419
|
+
|
|
21950
23420
|
sqlanvil.Assertion = (function() {
|
|
21951
23421
|
|
|
21952
23422
|
/**
|
|
@@ -25789,6 +27259,7 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
25789
27259
|
* @property {Array.<sqlanvil.ITest>|null} [tests] CompiledGraph tests
|
|
25790
27260
|
* @property {Array.<sqlanvil.INotebook>|null} [notebooks] CompiledGraph notebooks
|
|
25791
27261
|
* @property {Array.<sqlanvil.IDataPreparation>|null} [dataPreparations] CompiledGraph dataPreparations
|
|
27262
|
+
* @property {Array.<sqlanvil.IExport>|null} [exports] CompiledGraph exports
|
|
25792
27263
|
* @property {sqlanvil.IGraphErrors|null} [graphErrors] CompiledGraph graphErrors
|
|
25793
27264
|
* @property {string|null} [sqlanvilCoreVersion] CompiledGraph sqlanvilCoreVersion
|
|
25794
27265
|
* @property {Array.<sqlanvil.ITarget>|null} [targets] CompiledGraph targets
|
|
@@ -25811,6 +27282,7 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
25811
27282
|
this.tests = [];
|
|
25812
27283
|
this.notebooks = [];
|
|
25813
27284
|
this.dataPreparations = [];
|
|
27285
|
+
this.exports = [];
|
|
25814
27286
|
this.targets = [];
|
|
25815
27287
|
if (properties)
|
|
25816
27288
|
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
@@ -25882,6 +27354,14 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
25882
27354
|
*/
|
|
25883
27355
|
CompiledGraph.prototype.dataPreparations = $util.emptyArray;
|
|
25884
27356
|
|
|
27357
|
+
/**
|
|
27358
|
+
* CompiledGraph exports.
|
|
27359
|
+
* @member {Array.<sqlanvil.IExport>} exports
|
|
27360
|
+
* @memberof sqlanvil.CompiledGraph
|
|
27361
|
+
* @instance
|
|
27362
|
+
*/
|
|
27363
|
+
CompiledGraph.prototype.exports = $util.emptyArray;
|
|
27364
|
+
|
|
25885
27365
|
/**
|
|
25886
27366
|
* CompiledGraph graphErrors.
|
|
25887
27367
|
* @member {sqlanvil.IGraphErrors|null|undefined} graphErrors
|
|
@@ -25968,6 +27448,9 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
25968
27448
|
if (message.dataPreparations != null && message.dataPreparations.length)
|
|
25969
27449
|
for (let i = 0; i < message.dataPreparations.length; ++i)
|
|
25970
27450
|
$root.sqlanvil.DataPreparation.encode(message.dataPreparations[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
|
|
27451
|
+
if (message.exports != null && message.exports.length)
|
|
27452
|
+
for (let i = 0; i < message.exports.length; ++i)
|
|
27453
|
+
$root.sqlanvil.Export.encode(message.exports[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
|
|
25971
27454
|
if (message.jitData != null && Object.hasOwnProperty.call(message, "jitData"))
|
|
25972
27455
|
$root.google.protobuf.Struct.encode(message.jitData, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
|
|
25973
27456
|
return writer;
|
|
@@ -26052,6 +27535,12 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
26052
27535
|
message.dataPreparations.push($root.sqlanvil.DataPreparation.decode(reader, reader.uint32()));
|
|
26053
27536
|
break;
|
|
26054
27537
|
}
|
|
27538
|
+
case 14: {
|
|
27539
|
+
if (!(message.exports && message.exports.length))
|
|
27540
|
+
message.exports = [];
|
|
27541
|
+
message.exports.push($root.sqlanvil.Export.decode(reader, reader.uint32()));
|
|
27542
|
+
break;
|
|
27543
|
+
}
|
|
26055
27544
|
case 7: {
|
|
26056
27545
|
message.graphErrors = $root.sqlanvil.GraphErrors.decode(reader, reader.uint32());
|
|
26057
27546
|
break;
|
|
@@ -26173,6 +27662,15 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
26173
27662
|
return "dataPreparations." + error;
|
|
26174
27663
|
}
|
|
26175
27664
|
}
|
|
27665
|
+
if (message.exports != null && message.hasOwnProperty("exports")) {
|
|
27666
|
+
if (!Array.isArray(message.exports))
|
|
27667
|
+
return "exports: array expected";
|
|
27668
|
+
for (let i = 0; i < message.exports.length; ++i) {
|
|
27669
|
+
let error = $root.sqlanvil.Export.verify(message.exports[i]);
|
|
27670
|
+
if (error)
|
|
27671
|
+
return "exports." + error;
|
|
27672
|
+
}
|
|
27673
|
+
}
|
|
26176
27674
|
if (message.graphErrors != null && message.hasOwnProperty("graphErrors")) {
|
|
26177
27675
|
let error = $root.sqlanvil.GraphErrors.verify(message.graphErrors);
|
|
26178
27676
|
if (error)
|
|
@@ -26285,6 +27783,16 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
26285
27783
|
message.dataPreparations[i] = $root.sqlanvil.DataPreparation.fromObject(object.dataPreparations[i]);
|
|
26286
27784
|
}
|
|
26287
27785
|
}
|
|
27786
|
+
if (object.exports) {
|
|
27787
|
+
if (!Array.isArray(object.exports))
|
|
27788
|
+
throw TypeError(".sqlanvil.CompiledGraph.exports: array expected");
|
|
27789
|
+
message.exports = [];
|
|
27790
|
+
for (let i = 0; i < object.exports.length; ++i) {
|
|
27791
|
+
if (typeof object.exports[i] !== "object")
|
|
27792
|
+
throw TypeError(".sqlanvil.CompiledGraph.exports: object expected");
|
|
27793
|
+
message.exports[i] = $root.sqlanvil.Export.fromObject(object.exports[i]);
|
|
27794
|
+
}
|
|
27795
|
+
}
|
|
26288
27796
|
if (object.graphErrors != null) {
|
|
26289
27797
|
if (typeof object.graphErrors !== "object")
|
|
26290
27798
|
throw TypeError(".sqlanvil.CompiledGraph.graphErrors: object expected");
|
|
@@ -26332,6 +27840,7 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
26332
27840
|
object.targets = [];
|
|
26333
27841
|
object.notebooks = [];
|
|
26334
27842
|
object.dataPreparations = [];
|
|
27843
|
+
object.exports = [];
|
|
26335
27844
|
}
|
|
26336
27845
|
if (options.defaults) {
|
|
26337
27846
|
object.projectConfig = null;
|
|
@@ -26385,6 +27894,11 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
26385
27894
|
for (let j = 0; j < message.dataPreparations.length; ++j)
|
|
26386
27895
|
object.dataPreparations[j] = $root.sqlanvil.DataPreparation.toObject(message.dataPreparations[j], options);
|
|
26387
27896
|
}
|
|
27897
|
+
if (message.exports && message.exports.length) {
|
|
27898
|
+
object.exports = [];
|
|
27899
|
+
for (let j = 0; j < message.exports.length; ++j)
|
|
27900
|
+
object.exports[j] = $root.sqlanvil.Export.toObject(message.exports[j], options);
|
|
27901
|
+
}
|
|
26388
27902
|
if (message.jitData != null && message.hasOwnProperty("jitData"))
|
|
26389
27903
|
object.jitData = $root.google.protobuf.Struct.toObject(message.jitData, options);
|
|
26390
27904
|
return object;
|
|
@@ -30613,6 +32127,363 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
30613
32127
|
return ExecutionTask;
|
|
30614
32128
|
})();
|
|
30615
32129
|
|
|
32130
|
+
sqlanvil.ExportSpec = (function() {
|
|
32131
|
+
|
|
32132
|
+
/**
|
|
32133
|
+
* Properties of an ExportSpec.
|
|
32134
|
+
* @memberof sqlanvil
|
|
32135
|
+
* @interface IExportSpec
|
|
32136
|
+
* @property {string|null} [query] ExportSpec query
|
|
32137
|
+
* @property {string|null} [location] ExportSpec location
|
|
32138
|
+
* @property {string|null} [format] ExportSpec format
|
|
32139
|
+
* @property {boolean|null} [overwrite] ExportSpec overwrite
|
|
32140
|
+
* @property {string|null} [filename] ExportSpec filename
|
|
32141
|
+
* @property {Object.<string,string>|null} [options] ExportSpec options
|
|
32142
|
+
*/
|
|
32143
|
+
|
|
32144
|
+
/**
|
|
32145
|
+
* Constructs a new ExportSpec.
|
|
32146
|
+
* @memberof sqlanvil
|
|
32147
|
+
* @classdesc Represents an ExportSpec.
|
|
32148
|
+
* @implements IExportSpec
|
|
32149
|
+
* @constructor
|
|
32150
|
+
* @param {sqlanvil.IExportSpec=} [properties] Properties to set
|
|
32151
|
+
*/
|
|
32152
|
+
function ExportSpec(properties) {
|
|
32153
|
+
this.options = {};
|
|
32154
|
+
if (properties)
|
|
32155
|
+
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
32156
|
+
if (properties[keys[i]] != null)
|
|
32157
|
+
this[keys[i]] = properties[keys[i]];
|
|
32158
|
+
}
|
|
32159
|
+
|
|
32160
|
+
/**
|
|
32161
|
+
* ExportSpec query.
|
|
32162
|
+
* @member {string} query
|
|
32163
|
+
* @memberof sqlanvil.ExportSpec
|
|
32164
|
+
* @instance
|
|
32165
|
+
*/
|
|
32166
|
+
ExportSpec.prototype.query = "";
|
|
32167
|
+
|
|
32168
|
+
/**
|
|
32169
|
+
* ExportSpec location.
|
|
32170
|
+
* @member {string} location
|
|
32171
|
+
* @memberof sqlanvil.ExportSpec
|
|
32172
|
+
* @instance
|
|
32173
|
+
*/
|
|
32174
|
+
ExportSpec.prototype.location = "";
|
|
32175
|
+
|
|
32176
|
+
/**
|
|
32177
|
+
* ExportSpec format.
|
|
32178
|
+
* @member {string} format
|
|
32179
|
+
* @memberof sqlanvil.ExportSpec
|
|
32180
|
+
* @instance
|
|
32181
|
+
*/
|
|
32182
|
+
ExportSpec.prototype.format = "";
|
|
32183
|
+
|
|
32184
|
+
/**
|
|
32185
|
+
* ExportSpec overwrite.
|
|
32186
|
+
* @member {boolean} overwrite
|
|
32187
|
+
* @memberof sqlanvil.ExportSpec
|
|
32188
|
+
* @instance
|
|
32189
|
+
*/
|
|
32190
|
+
ExportSpec.prototype.overwrite = false;
|
|
32191
|
+
|
|
32192
|
+
/**
|
|
32193
|
+
* ExportSpec filename.
|
|
32194
|
+
* @member {string} filename
|
|
32195
|
+
* @memberof sqlanvil.ExportSpec
|
|
32196
|
+
* @instance
|
|
32197
|
+
*/
|
|
32198
|
+
ExportSpec.prototype.filename = "";
|
|
32199
|
+
|
|
32200
|
+
/**
|
|
32201
|
+
* ExportSpec options.
|
|
32202
|
+
* @member {Object.<string,string>} options
|
|
32203
|
+
* @memberof sqlanvil.ExportSpec
|
|
32204
|
+
* @instance
|
|
32205
|
+
*/
|
|
32206
|
+
ExportSpec.prototype.options = $util.emptyObject;
|
|
32207
|
+
|
|
32208
|
+
/**
|
|
32209
|
+
* Creates a new ExportSpec instance using the specified properties.
|
|
32210
|
+
* @function create
|
|
32211
|
+
* @memberof sqlanvil.ExportSpec
|
|
32212
|
+
* @static
|
|
32213
|
+
* @param {sqlanvil.IExportSpec=} [properties] Properties to set
|
|
32214
|
+
* @returns {sqlanvil.ExportSpec} ExportSpec instance
|
|
32215
|
+
*/
|
|
32216
|
+
ExportSpec.create = function create(properties) {
|
|
32217
|
+
return new ExportSpec(properties);
|
|
32218
|
+
};
|
|
32219
|
+
|
|
32220
|
+
/**
|
|
32221
|
+
* Encodes the specified ExportSpec message. Does not implicitly {@link sqlanvil.ExportSpec.verify|verify} messages.
|
|
32222
|
+
* @function encode
|
|
32223
|
+
* @memberof sqlanvil.ExportSpec
|
|
32224
|
+
* @static
|
|
32225
|
+
* @param {sqlanvil.IExportSpec} message ExportSpec message or plain object to encode
|
|
32226
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
32227
|
+
* @returns {$protobuf.Writer} Writer
|
|
32228
|
+
*/
|
|
32229
|
+
ExportSpec.encode = function encode(message, writer) {
|
|
32230
|
+
if (!writer)
|
|
32231
|
+
writer = $Writer.create();
|
|
32232
|
+
if (message.query != null && Object.hasOwnProperty.call(message, "query"))
|
|
32233
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.query);
|
|
32234
|
+
if (message.location != null && Object.hasOwnProperty.call(message, "location"))
|
|
32235
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.location);
|
|
32236
|
+
if (message.format != null && Object.hasOwnProperty.call(message, "format"))
|
|
32237
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.format);
|
|
32238
|
+
if (message.overwrite != null && Object.hasOwnProperty.call(message, "overwrite"))
|
|
32239
|
+
writer.uint32(/* id 4, wireType 0 =*/32).bool(message.overwrite);
|
|
32240
|
+
if (message.filename != null && Object.hasOwnProperty.call(message, "filename"))
|
|
32241
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.filename);
|
|
32242
|
+
if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
|
32243
|
+
for (let keys = Object.keys(message.options), i = 0; i < keys.length; ++i)
|
|
32244
|
+
writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.options[keys[i]]).ldelim();
|
|
32245
|
+
return writer;
|
|
32246
|
+
};
|
|
32247
|
+
|
|
32248
|
+
/**
|
|
32249
|
+
* Encodes the specified ExportSpec message, length delimited. Does not implicitly {@link sqlanvil.ExportSpec.verify|verify} messages.
|
|
32250
|
+
* @function encodeDelimited
|
|
32251
|
+
* @memberof sqlanvil.ExportSpec
|
|
32252
|
+
* @static
|
|
32253
|
+
* @param {sqlanvil.IExportSpec} message ExportSpec message or plain object to encode
|
|
32254
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
32255
|
+
* @returns {$protobuf.Writer} Writer
|
|
32256
|
+
*/
|
|
32257
|
+
ExportSpec.encodeDelimited = function encodeDelimited(message, writer) {
|
|
32258
|
+
return this.encode(message, writer).ldelim();
|
|
32259
|
+
};
|
|
32260
|
+
|
|
32261
|
+
/**
|
|
32262
|
+
* Decodes an ExportSpec message from the specified reader or buffer.
|
|
32263
|
+
* @function decode
|
|
32264
|
+
* @memberof sqlanvil.ExportSpec
|
|
32265
|
+
* @static
|
|
32266
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
32267
|
+
* @param {number} [length] Message length if known beforehand
|
|
32268
|
+
* @returns {sqlanvil.ExportSpec} ExportSpec
|
|
32269
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
32270
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
32271
|
+
*/
|
|
32272
|
+
ExportSpec.decode = function decode(reader, length, error) {
|
|
32273
|
+
if (!(reader instanceof $Reader))
|
|
32274
|
+
reader = $Reader.create(reader);
|
|
32275
|
+
let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sqlanvil.ExportSpec(), key, value;
|
|
32276
|
+
while (reader.pos < end) {
|
|
32277
|
+
let tag = reader.uint32();
|
|
32278
|
+
if (tag === error)
|
|
32279
|
+
break;
|
|
32280
|
+
switch (tag >>> 3) {
|
|
32281
|
+
case 1: {
|
|
32282
|
+
message.query = reader.string();
|
|
32283
|
+
break;
|
|
32284
|
+
}
|
|
32285
|
+
case 2: {
|
|
32286
|
+
message.location = reader.string();
|
|
32287
|
+
break;
|
|
32288
|
+
}
|
|
32289
|
+
case 3: {
|
|
32290
|
+
message.format = reader.string();
|
|
32291
|
+
break;
|
|
32292
|
+
}
|
|
32293
|
+
case 4: {
|
|
32294
|
+
message.overwrite = reader.bool();
|
|
32295
|
+
break;
|
|
32296
|
+
}
|
|
32297
|
+
case 5: {
|
|
32298
|
+
message.filename = reader.string();
|
|
32299
|
+
break;
|
|
32300
|
+
}
|
|
32301
|
+
case 6: {
|
|
32302
|
+
if (message.options === $util.emptyObject)
|
|
32303
|
+
message.options = {};
|
|
32304
|
+
let end2 = reader.uint32() + reader.pos;
|
|
32305
|
+
key = "";
|
|
32306
|
+
value = "";
|
|
32307
|
+
while (reader.pos < end2) {
|
|
32308
|
+
let tag2 = reader.uint32();
|
|
32309
|
+
switch (tag2 >>> 3) {
|
|
32310
|
+
case 1:
|
|
32311
|
+
key = reader.string();
|
|
32312
|
+
break;
|
|
32313
|
+
case 2:
|
|
32314
|
+
value = reader.string();
|
|
32315
|
+
break;
|
|
32316
|
+
default:
|
|
32317
|
+
reader.skipType(tag2 & 7);
|
|
32318
|
+
break;
|
|
32319
|
+
}
|
|
32320
|
+
}
|
|
32321
|
+
message.options[key] = value;
|
|
32322
|
+
break;
|
|
32323
|
+
}
|
|
32324
|
+
default:
|
|
32325
|
+
reader.skipType(tag & 7);
|
|
32326
|
+
break;
|
|
32327
|
+
}
|
|
32328
|
+
}
|
|
32329
|
+
return message;
|
|
32330
|
+
};
|
|
32331
|
+
|
|
32332
|
+
/**
|
|
32333
|
+
* Decodes an ExportSpec message from the specified reader or buffer, length delimited.
|
|
32334
|
+
* @function decodeDelimited
|
|
32335
|
+
* @memberof sqlanvil.ExportSpec
|
|
32336
|
+
* @static
|
|
32337
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
32338
|
+
* @returns {sqlanvil.ExportSpec} ExportSpec
|
|
32339
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
32340
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
32341
|
+
*/
|
|
32342
|
+
ExportSpec.decodeDelimited = function decodeDelimited(reader) {
|
|
32343
|
+
if (!(reader instanceof $Reader))
|
|
32344
|
+
reader = new $Reader(reader);
|
|
32345
|
+
return this.decode(reader, reader.uint32());
|
|
32346
|
+
};
|
|
32347
|
+
|
|
32348
|
+
/**
|
|
32349
|
+
* Verifies an ExportSpec message.
|
|
32350
|
+
* @function verify
|
|
32351
|
+
* @memberof sqlanvil.ExportSpec
|
|
32352
|
+
* @static
|
|
32353
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
32354
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
32355
|
+
*/
|
|
32356
|
+
ExportSpec.verify = function verify(message) {
|
|
32357
|
+
if (typeof message !== "object" || message === null)
|
|
32358
|
+
return "object expected";
|
|
32359
|
+
if (message.query != null && message.hasOwnProperty("query"))
|
|
32360
|
+
if (!$util.isString(message.query))
|
|
32361
|
+
return "query: string expected";
|
|
32362
|
+
if (message.location != null && message.hasOwnProperty("location"))
|
|
32363
|
+
if (!$util.isString(message.location))
|
|
32364
|
+
return "location: string expected";
|
|
32365
|
+
if (message.format != null && message.hasOwnProperty("format"))
|
|
32366
|
+
if (!$util.isString(message.format))
|
|
32367
|
+
return "format: string expected";
|
|
32368
|
+
if (message.overwrite != null && message.hasOwnProperty("overwrite"))
|
|
32369
|
+
if (typeof message.overwrite !== "boolean")
|
|
32370
|
+
return "overwrite: boolean expected";
|
|
32371
|
+
if (message.filename != null && message.hasOwnProperty("filename"))
|
|
32372
|
+
if (!$util.isString(message.filename))
|
|
32373
|
+
return "filename: string expected";
|
|
32374
|
+
if (message.options != null && message.hasOwnProperty("options")) {
|
|
32375
|
+
if (!$util.isObject(message.options))
|
|
32376
|
+
return "options: object expected";
|
|
32377
|
+
let key = Object.keys(message.options);
|
|
32378
|
+
for (let i = 0; i < key.length; ++i)
|
|
32379
|
+
if (!$util.isString(message.options[key[i]]))
|
|
32380
|
+
return "options: string{k:string} expected";
|
|
32381
|
+
}
|
|
32382
|
+
return null;
|
|
32383
|
+
};
|
|
32384
|
+
|
|
32385
|
+
/**
|
|
32386
|
+
* Creates an ExportSpec message from a plain object. Also converts values to their respective internal types.
|
|
32387
|
+
* @function fromObject
|
|
32388
|
+
* @memberof sqlanvil.ExportSpec
|
|
32389
|
+
* @static
|
|
32390
|
+
* @param {Object.<string,*>} object Plain object
|
|
32391
|
+
* @returns {sqlanvil.ExportSpec} ExportSpec
|
|
32392
|
+
*/
|
|
32393
|
+
ExportSpec.fromObject = function fromObject(object) {
|
|
32394
|
+
if (object instanceof $root.sqlanvil.ExportSpec)
|
|
32395
|
+
return object;
|
|
32396
|
+
let message = new $root.sqlanvil.ExportSpec();
|
|
32397
|
+
if (object.query != null)
|
|
32398
|
+
message.query = String(object.query);
|
|
32399
|
+
if (object.location != null)
|
|
32400
|
+
message.location = String(object.location);
|
|
32401
|
+
if (object.format != null)
|
|
32402
|
+
message.format = String(object.format);
|
|
32403
|
+
if (object.overwrite != null)
|
|
32404
|
+
message.overwrite = Boolean(object.overwrite);
|
|
32405
|
+
if (object.filename != null)
|
|
32406
|
+
message.filename = String(object.filename);
|
|
32407
|
+
if (object.options) {
|
|
32408
|
+
if (typeof object.options !== "object")
|
|
32409
|
+
throw TypeError(".sqlanvil.ExportSpec.options: object expected");
|
|
32410
|
+
message.options = {};
|
|
32411
|
+
for (let keys = Object.keys(object.options), i = 0; i < keys.length; ++i)
|
|
32412
|
+
message.options[keys[i]] = String(object.options[keys[i]]);
|
|
32413
|
+
}
|
|
32414
|
+
return message;
|
|
32415
|
+
};
|
|
32416
|
+
|
|
32417
|
+
/**
|
|
32418
|
+
* Creates a plain object from an ExportSpec message. Also converts values to other types if specified.
|
|
32419
|
+
* @function toObject
|
|
32420
|
+
* @memberof sqlanvil.ExportSpec
|
|
32421
|
+
* @static
|
|
32422
|
+
* @param {sqlanvil.ExportSpec} message ExportSpec
|
|
32423
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
32424
|
+
* @returns {Object.<string,*>} Plain object
|
|
32425
|
+
*/
|
|
32426
|
+
ExportSpec.toObject = function toObject(message, options) {
|
|
32427
|
+
if (!options)
|
|
32428
|
+
options = {};
|
|
32429
|
+
let object = {};
|
|
32430
|
+
if (options.objects || options.defaults)
|
|
32431
|
+
object.options = {};
|
|
32432
|
+
if (options.defaults) {
|
|
32433
|
+
object.query = "";
|
|
32434
|
+
object.location = "";
|
|
32435
|
+
object.format = "";
|
|
32436
|
+
object.overwrite = false;
|
|
32437
|
+
object.filename = "";
|
|
32438
|
+
}
|
|
32439
|
+
if (message.query != null && message.hasOwnProperty("query"))
|
|
32440
|
+
object.query = message.query;
|
|
32441
|
+
if (message.location != null && message.hasOwnProperty("location"))
|
|
32442
|
+
object.location = message.location;
|
|
32443
|
+
if (message.format != null && message.hasOwnProperty("format"))
|
|
32444
|
+
object.format = message.format;
|
|
32445
|
+
if (message.overwrite != null && message.hasOwnProperty("overwrite"))
|
|
32446
|
+
object.overwrite = message.overwrite;
|
|
32447
|
+
if (message.filename != null && message.hasOwnProperty("filename"))
|
|
32448
|
+
object.filename = message.filename;
|
|
32449
|
+
let keys2;
|
|
32450
|
+
if (message.options && (keys2 = Object.keys(message.options)).length) {
|
|
32451
|
+
object.options = {};
|
|
32452
|
+
for (let j = 0; j < keys2.length; ++j)
|
|
32453
|
+
object.options[keys2[j]] = message.options[keys2[j]];
|
|
32454
|
+
}
|
|
32455
|
+
return object;
|
|
32456
|
+
};
|
|
32457
|
+
|
|
32458
|
+
/**
|
|
32459
|
+
* Converts this ExportSpec to JSON.
|
|
32460
|
+
* @function toJSON
|
|
32461
|
+
* @memberof sqlanvil.ExportSpec
|
|
32462
|
+
* @instance
|
|
32463
|
+
* @returns {Object.<string,*>} JSON object
|
|
32464
|
+
*/
|
|
32465
|
+
ExportSpec.prototype.toJSON = function toJSON() {
|
|
32466
|
+
return this.constructor.toObject(this, $protobuf__namespace.util.toJSONOptions);
|
|
32467
|
+
};
|
|
32468
|
+
|
|
32469
|
+
/**
|
|
32470
|
+
* Gets the default type url for ExportSpec
|
|
32471
|
+
* @function getTypeUrl
|
|
32472
|
+
* @memberof sqlanvil.ExportSpec
|
|
32473
|
+
* @static
|
|
32474
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
32475
|
+
* @returns {string} The default type url
|
|
32476
|
+
*/
|
|
32477
|
+
ExportSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
32478
|
+
if (typeUrlPrefix === undefined) {
|
|
32479
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
32480
|
+
}
|
|
32481
|
+
return typeUrlPrefix + "/sqlanvil.ExportSpec";
|
|
32482
|
+
};
|
|
32483
|
+
|
|
32484
|
+
return ExportSpec;
|
|
32485
|
+
})();
|
|
32486
|
+
|
|
30616
32487
|
sqlanvil.ExecutionAction = (function() {
|
|
30617
32488
|
|
|
30618
32489
|
/**
|
|
@@ -30628,6 +32499,7 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
30628
32499
|
* @property {Array.<sqlanvil.IExecutionTask>|null} [tasks] ExecutionAction tasks
|
|
30629
32500
|
* @property {sqlanvil.IActionDescriptor|null} [actionDescriptor] ExecutionAction actionDescriptor
|
|
30630
32501
|
* @property {string|null} [jitCode] ExecutionAction jitCode
|
|
32502
|
+
* @property {sqlanvil.IExportSpec|null} ["export"] ExecutionAction export
|
|
30631
32503
|
*/
|
|
30632
32504
|
|
|
30633
32505
|
/**
|
|
@@ -30719,6 +32591,14 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
30719
32591
|
*/
|
|
30720
32592
|
ExecutionAction.prototype.jitCode = "";
|
|
30721
32593
|
|
|
32594
|
+
/**
|
|
32595
|
+
* ExecutionAction export.
|
|
32596
|
+
* @member {sqlanvil.IExportSpec|null|undefined} export
|
|
32597
|
+
* @memberof sqlanvil.ExecutionAction
|
|
32598
|
+
* @instance
|
|
32599
|
+
*/
|
|
32600
|
+
ExecutionAction.prototype["export"] = null;
|
|
32601
|
+
|
|
30722
32602
|
/**
|
|
30723
32603
|
* Creates a new ExecutionAction instance using the specified properties.
|
|
30724
32604
|
* @function create
|
|
@@ -30763,6 +32643,8 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
30763
32643
|
$root.sqlanvil.Target.encode(message.dependencyTargets[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
|
|
30764
32644
|
if (message.jitCode != null && Object.hasOwnProperty.call(message, "jitCode"))
|
|
30765
32645
|
writer.uint32(/* id 12, wireType 2 =*/98).string(message.jitCode);
|
|
32646
|
+
if (message["export"] != null && Object.hasOwnProperty.call(message, "export"))
|
|
32647
|
+
$root.sqlanvil.ExportSpec.encode(message["export"], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
|
|
30766
32648
|
return writer;
|
|
30767
32649
|
};
|
|
30768
32650
|
|
|
@@ -30839,6 +32721,10 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
30839
32721
|
message.jitCode = reader.string();
|
|
30840
32722
|
break;
|
|
30841
32723
|
}
|
|
32724
|
+
case 13: {
|
|
32725
|
+
message["export"] = $root.sqlanvil.ExportSpec.decode(reader, reader.uint32());
|
|
32726
|
+
break;
|
|
32727
|
+
}
|
|
30842
32728
|
default:
|
|
30843
32729
|
reader.skipType(tag & 7);
|
|
30844
32730
|
break;
|
|
@@ -30923,6 +32809,11 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
30923
32809
|
if (message.jitCode != null && message.hasOwnProperty("jitCode"))
|
|
30924
32810
|
if (!$util.isString(message.jitCode))
|
|
30925
32811
|
return "jitCode: string expected";
|
|
32812
|
+
if (message["export"] != null && message.hasOwnProperty("export")) {
|
|
32813
|
+
let error = $root.sqlanvil.ExportSpec.verify(message["export"]);
|
|
32814
|
+
if (error)
|
|
32815
|
+
return "export." + error;
|
|
32816
|
+
}
|
|
30926
32817
|
return null;
|
|
30927
32818
|
};
|
|
30928
32819
|
|
|
@@ -30996,6 +32887,11 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
30996
32887
|
}
|
|
30997
32888
|
if (object.jitCode != null)
|
|
30998
32889
|
message.jitCode = String(object.jitCode);
|
|
32890
|
+
if (object["export"] != null) {
|
|
32891
|
+
if (typeof object["export"] !== "object")
|
|
32892
|
+
throw TypeError(".sqlanvil.ExecutionAction.export: object expected");
|
|
32893
|
+
message["export"] = $root.sqlanvil.ExportSpec.fromObject(object["export"]);
|
|
32894
|
+
}
|
|
30999
32895
|
return message;
|
|
31000
32896
|
};
|
|
31001
32897
|
|
|
@@ -31024,6 +32920,7 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
31024
32920
|
object.actionDescriptor = null;
|
|
31025
32921
|
object.hermeticity = options.enums === String ? "UNKNOWN" : 0;
|
|
31026
32922
|
object.jitCode = "";
|
|
32923
|
+
object["export"] = null;
|
|
31027
32924
|
}
|
|
31028
32925
|
if (message.tasks && message.tasks.length) {
|
|
31029
32926
|
object.tasks = [];
|
|
@@ -31049,6 +32946,8 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
31049
32946
|
}
|
|
31050
32947
|
if (message.jitCode != null && message.hasOwnProperty("jitCode"))
|
|
31051
32948
|
object.jitCode = message.jitCode;
|
|
32949
|
+
if (message["export"] != null && message.hasOwnProperty("export"))
|
|
32950
|
+
object["export"] = $root.sqlanvil.ExportSpec.toObject(message["export"], options);
|
|
31052
32951
|
return object;
|
|
31053
32952
|
};
|
|
31054
32953
|
|
|
@@ -39092,7 +40991,7 @@ function unknownToValueShallow(raw) {
|
|
|
39092
40991
|
return "/";
|
|
39093
40992
|
})();
|
|
39094
40993
|
|
|
39095
|
-
typeof __webpack_require__ === "function" ? __non_webpack_require__ : require;
|
|
40994
|
+
const nativeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : require;
|
|
39096
40995
|
function matchPatterns(patterns, values) {
|
|
39097
40996
|
const fullyQualifiedActions = [];
|
|
39098
40997
|
patterns.forEach(pattern => {
|
|
@@ -39170,11 +41069,11 @@ function setOrValidateTableEnumType(table) {
|
|
|
39170
41069
|
function prune(compiledGraph, runConfig) {
|
|
39171
41070
|
compiledGraph.tables.forEach(setOrValidateTableEnumType);
|
|
39172
41071
|
const includedActionNames = computeIncludedActionNames(compiledGraph, runConfig);
|
|
39173
|
-
return Object.assign(Object.assign({}, compiledGraph), { tables: compiledGraph.tables.filter(action => includedActionNames.has(targetAsReadableString(action.target))), assertions: compiledGraph.assertions.filter(action => includedActionNames.has(targetAsReadableString(action.target))), operations: compiledGraph.operations.filter(action => includedActionNames.has(targetAsReadableString(action.target))) });
|
|
41072
|
+
return Object.assign(Object.assign({}, compiledGraph), { tables: compiledGraph.tables.filter(action => includedActionNames.has(targetAsReadableString(action.target))), assertions: compiledGraph.assertions.filter(action => includedActionNames.has(targetAsReadableString(action.target))), operations: compiledGraph.operations.filter(action => includedActionNames.has(targetAsReadableString(action.target))), exports: compiledGraph.exports.filter(action => includedActionNames.has(targetAsReadableString(action.target))) });
|
|
39174
41073
|
}
|
|
39175
41074
|
function computeIncludedActionNames(compiledGraph, runConfig) {
|
|
39176
41075
|
var _a, _b, _c;
|
|
39177
|
-
const allActions = [].concat(compiledGraph.tables, compiledGraph.operations, compiledGraph.assertions);
|
|
41076
|
+
const allActions = [].concat(compiledGraph.tables, compiledGraph.operations, compiledGraph.assertions, compiledGraph.exports);
|
|
39178
41077
|
const allActionNames = new Set(allActions.map(action => targetAsReadableString(action.target)));
|
|
39179
41078
|
const allActionsByName = new Map(allActions.map(action => [targetAsReadableString(action.target), action]));
|
|
39180
41079
|
const hasActionSelector = ((_a = runConfig.actions) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
@@ -39237,6 +41136,26 @@ async function state(dbadapter, targets) {
|
|
|
39237
41136
|
return { tables: tablesWithValues };
|
|
39238
41137
|
}
|
|
39239
41138
|
|
|
41139
|
+
function extensionForFormat(format) {
|
|
41140
|
+
switch ((format || "").toLowerCase()) {
|
|
41141
|
+
case "parquet":
|
|
41142
|
+
return ".parquet";
|
|
41143
|
+
case "csv":
|
|
41144
|
+
return ".csv";
|
|
41145
|
+
case "json":
|
|
41146
|
+
return ".jsonl";
|
|
41147
|
+
default:
|
|
41148
|
+
return "";
|
|
41149
|
+
}
|
|
41150
|
+
}
|
|
41151
|
+
function resolveExportUri(spec, actionName, opts) {
|
|
41152
|
+
const prefix = (spec.location || "").replace(/\/+$/, "");
|
|
41153
|
+
const base = spec.filename || actionName;
|
|
41154
|
+
const ext = extensionForFormat(spec.format || "");
|
|
41155
|
+
const name = opts.wildcard ? `${base}_*${ext}` : `${base}${ext}`;
|
|
41156
|
+
return `${prefix}/${name}`;
|
|
41157
|
+
}
|
|
41158
|
+
|
|
39240
41159
|
function concatenateQueries(statements, modifier) {
|
|
39241
41160
|
return statements
|
|
39242
41161
|
.filter(statement => !!statement)
|
|
@@ -39486,6 +41405,17 @@ from (${query}) as insertions`;
|
|
|
39486
41405
|
dropIfExists(target, type) {
|
|
39487
41406
|
return `drop ${this.tableTypeAsSql(type)} if exists ${this.resolveTarget(target)}`;
|
|
39488
41407
|
}
|
|
41408
|
+
createExportTasks(exp) {
|
|
41409
|
+
var _a;
|
|
41410
|
+
const uri = resolveExportUri(exp, ((_a = exp.target) === null || _a === void 0 ? void 0 : _a.name) || exp.filename, { wildcard: true });
|
|
41411
|
+
const format = (exp.format || "").toUpperCase();
|
|
41412
|
+
const statement = `EXPORT DATA OPTIONS(\n` +
|
|
41413
|
+
` uri='${uri}',\n` +
|
|
41414
|
+
` format='${format}',\n` +
|
|
41415
|
+
` overwrite=${exp.overwrite ? "true" : "false"}\n` +
|
|
41416
|
+
`) AS\n${exp.query}`;
|
|
41417
|
+
return [sqlanvil.ExecutionTask.create({ type: "statement", statement })];
|
|
41418
|
+
}
|
|
39489
41419
|
buildIncrementalSchemaChangeTasks(tasks, table) {
|
|
39490
41420
|
const uniqueId = this.uniqueIdGenerator();
|
|
39491
41421
|
const emptyTempTableTarget = Object.assign(Object.assign({}, table.target), { name: `${table.target.name}_sa_temp_${uniqueId}_empty` });
|
|
@@ -39693,6 +41623,9 @@ class MysqlExecutionSql {
|
|
|
39693
41623
|
}
|
|
39694
41624
|
return `drop table if exists ${this.resolveTarget(target)}`;
|
|
39695
41625
|
}
|
|
41626
|
+
createExportTasks(exp) {
|
|
41627
|
+
throw new Error("type: \"export\" is not supported on MySQL/MariaDB yet.");
|
|
41628
|
+
}
|
|
39696
41629
|
publishTasks(table, runConfig, tableMetadata) {
|
|
39697
41630
|
const tasks = new Tasks();
|
|
39698
41631
|
const target = this.resolveTarget(table.target);
|
|
@@ -39836,6 +41769,9 @@ class PostgresExecutionSql {
|
|
|
39836
41769
|
const kind = type === sqlanvil.TableMetadata.Type.VIEW ? "view" : "table";
|
|
39837
41770
|
return `drop ${kind} if exists ${this.resolveTarget(target)} cascade`;
|
|
39838
41771
|
}
|
|
41772
|
+
createExportTasks(exp) {
|
|
41773
|
+
return [sqlanvil.ExecutionTask.create({ type: "export", statement: exp.query })];
|
|
41774
|
+
}
|
|
39839
41775
|
shouldWriteIncrementally(table, runConfig, tableMetadata) {
|
|
39840
41776
|
return ((!runConfig.fullRefresh || table.protected) &&
|
|
39841
41777
|
tableMetadata &&
|
|
@@ -40133,6 +42069,9 @@ class ExecutionSql {
|
|
|
40133
42069
|
? []
|
|
40134
42070
|
: operation.queries.map(statement => sqlanvil.ExecutionTask.create({ type: "statement", statement }));
|
|
40135
42071
|
}
|
|
42072
|
+
createExportTasks(exp) {
|
|
42073
|
+
return exp.disabled ? [] : this.delegate.createExportTasks(exp);
|
|
42074
|
+
}
|
|
40136
42075
|
createAssertionTasks(assertion) {
|
|
40137
42076
|
return assertion.disabled ? [] : this.assertTasks(assertion, this.project).build();
|
|
40138
42077
|
}
|
|
@@ -40199,7 +42138,7 @@ function collectEvaluationQueries(queryOrAction, concatenate, queryModifier = (q
|
|
|
40199
42138
|
.filter(validationQuery => !!validationQuery.query);
|
|
40200
42139
|
}
|
|
40201
42140
|
|
|
40202
|
-
const version = "1.
|
|
42141
|
+
const version = "1.8.0";
|
|
40203
42142
|
const dataformVersion = "3.0.59";
|
|
40204
42143
|
|
|
40205
42144
|
async function build(compiledGraph, runConfig, dbadapter) {
|
|
@@ -40223,7 +42162,7 @@ class Builder {
|
|
|
40223
42162
|
this.warehouseState.tables.forEach(tableState => {
|
|
40224
42163
|
tableMetadataByTarget.set(targetStringifier.stringify(tableState.target), tableState);
|
|
40225
42164
|
});
|
|
40226
|
-
const actions = [].concat(this.prunedGraph.tables.map(t => this.buildTable(t, tableMetadataByTarget.get(targetStringifier.stringify(t.target)), this.runConfig)), this.prunedGraph.operations.map(o => this.buildOperation(o)), this.prunedGraph.assertions.map(a => this.buildAssertion(a)));
|
|
42165
|
+
const actions = [].concat(this.prunedGraph.tables.map(t => this.buildTable(t, tableMetadataByTarget.get(targetStringifier.stringify(t.target)), this.runConfig)), this.prunedGraph.operations.map(o => this.buildOperation(o)), this.prunedGraph.assertions.map(a => this.buildAssertion(a)), this.prunedGraph.exports.map(e => this.buildExport(e)));
|
|
40227
42166
|
return sqlanvil.ExecutionGraph.create({
|
|
40228
42167
|
projectConfig: this.prunedGraph.projectConfig,
|
|
40229
42168
|
runConfig: this.runConfig,
|
|
@@ -40241,6 +42180,16 @@ class Builder {
|
|
|
40241
42180
|
buildAssertion(assertion) {
|
|
40242
42181
|
return Object.assign(Object.assign({}, this.toPartialExecutionAction(assertion)), { type: "assertion", tasks: this.executionSql.createAssertionTasks(assertion), hermeticity: assertion.hermeticity || sqlanvil.ActionHermeticity.HERMETIC });
|
|
40243
42182
|
}
|
|
42183
|
+
buildExport(exp) {
|
|
42184
|
+
return Object.assign(Object.assign({}, this.toPartialExecutionAction(exp)), { type: "export", tasks: this.executionSql.createExportTasks(exp), hermeticity: exp.hermeticity || sqlanvil.ActionHermeticity.NON_HERMETIC, export: sqlanvil.ExportSpec.create({
|
|
42185
|
+
query: exp.query,
|
|
42186
|
+
location: exp.location,
|
|
42187
|
+
format: exp.format,
|
|
42188
|
+
overwrite: exp.overwrite,
|
|
42189
|
+
filename: exp.filename,
|
|
42190
|
+
options: exp.options
|
|
42191
|
+
}) });
|
|
42192
|
+
}
|
|
40244
42193
|
toPartialExecutionAction(action) {
|
|
40245
42194
|
return sqlanvil.ExecutionAction.create({
|
|
40246
42195
|
target: action.target,
|
|
@@ -40459,7 +42408,7 @@ function read(credentialsPath, warehouse = "bigquery") {
|
|
|
40459
42408
|
catch (e) {
|
|
40460
42409
|
throw new Error(`Error reading credentials file: ${e.message}`);
|
|
40461
42410
|
}
|
|
40462
|
-
const warehouseCredentials = __rest(credentialsAsJson, ["connections"]);
|
|
42411
|
+
const warehouseCredentials = __rest(credentialsAsJson, ["connections", "storage"]);
|
|
40463
42412
|
if (warehouse.toLowerCase() === "mysql") {
|
|
40464
42413
|
const credentials = verifyObjectMatchesProto(sqlanvil.MysqlConnection, warehouseCredentials);
|
|
40465
42414
|
if (!credentials.host) {
|
|
@@ -40496,6 +42445,19 @@ function readConnections(credentialsPath) {
|
|
|
40496
42445
|
}
|
|
40497
42446
|
return credentialsAsJson.connections || {};
|
|
40498
42447
|
}
|
|
42448
|
+
function readStorageCredentials(credentialsPath) {
|
|
42449
|
+
if (!fs__namespace$1.existsSync(credentialsPath)) {
|
|
42450
|
+
return undefined;
|
|
42451
|
+
}
|
|
42452
|
+
let credentialsAsJson;
|
|
42453
|
+
try {
|
|
42454
|
+
credentialsAsJson = JSON.parse(fs__namespace$1.readFileSync(credentialsPath, "utf8"));
|
|
42455
|
+
}
|
|
42456
|
+
catch (e) {
|
|
42457
|
+
throw new Error(`Error reading credentials file: ${e.message}`);
|
|
42458
|
+
}
|
|
42459
|
+
return credentialsAsJson.storage || undefined;
|
|
42460
|
+
}
|
|
40499
42461
|
var TestResultStatus;
|
|
40500
42462
|
(function (TestResultStatus) {
|
|
40501
42463
|
TestResultStatus[TestResultStatus["SUCCESSFUL"] = 0] = "SUCCESSFUL";
|
|
@@ -40843,6 +42805,135 @@ function assertConnectionCredentialsAvailable(graph, connections) {
|
|
|
40843
42805
|
}));
|
|
40844
42806
|
}
|
|
40845
42807
|
|
|
42808
|
+
const PG_ATTACH_ALIAS = "pg";
|
|
42809
|
+
const SECRET_NAME = "sa_export";
|
|
42810
|
+
function buildAttachSql(pg) {
|
|
42811
|
+
const dsn = [
|
|
42812
|
+
pg.host && `host=${pg.host}`,
|
|
42813
|
+
pg.port && `port=${pg.port}`,
|
|
42814
|
+
pg.database && `dbname=${pg.database}`,
|
|
42815
|
+
pg.user && `user=${pg.user}`,
|
|
42816
|
+
pg.password && `password=${pg.password}`
|
|
42817
|
+
]
|
|
42818
|
+
.filter(Boolean)
|
|
42819
|
+
.join(" ");
|
|
42820
|
+
return `ATTACH '${dsn}' AS ${PG_ATTACH_ALIAS} (TYPE postgres, READ_ONLY)`;
|
|
42821
|
+
}
|
|
42822
|
+
function buildSecretSql(scheme, creds) {
|
|
42823
|
+
if (scheme === "s3") {
|
|
42824
|
+
const fields = [
|
|
42825
|
+
"TYPE s3",
|
|
42826
|
+
creds.accessKeyId && `KEY_ID '${creds.accessKeyId}'`,
|
|
42827
|
+
creds.secretAccessKey && `SECRET '${creds.secretAccessKey}'`,
|
|
42828
|
+
creds.region && `REGION '${creds.region}'`,
|
|
42829
|
+
creds.endpoint && `ENDPOINT '${creds.endpoint}'`,
|
|
42830
|
+
creds.endpoint && `URL_STYLE 'path'`,
|
|
42831
|
+
creds.endpoint && `USE_SSL true`
|
|
42832
|
+
]
|
|
42833
|
+
.filter(Boolean)
|
|
42834
|
+
.join(", ");
|
|
42835
|
+
return `CREATE OR REPLACE SECRET ${SECRET_NAME} (${fields})`;
|
|
42836
|
+
}
|
|
42837
|
+
if (scheme === "gcs") {
|
|
42838
|
+
const fields = [
|
|
42839
|
+
"TYPE gcs",
|
|
42840
|
+
creds.keyId && `KEY_ID '${creds.keyId}'`,
|
|
42841
|
+
creds.secret && `SECRET '${creds.secret}'`
|
|
42842
|
+
]
|
|
42843
|
+
.filter(Boolean)
|
|
42844
|
+
.join(", ");
|
|
42845
|
+
return `CREATE OR REPLACE SECRET ${SECRET_NAME} (${fields})`;
|
|
42846
|
+
}
|
|
42847
|
+
return null;
|
|
42848
|
+
}
|
|
42849
|
+
function toCopyTarget(uri) {
|
|
42850
|
+
if (uri.startsWith("local://")) {
|
|
42851
|
+
return uri.slice("local://".length);
|
|
42852
|
+
}
|
|
42853
|
+
return uri;
|
|
42854
|
+
}
|
|
42855
|
+
function schemeOf(uri) {
|
|
42856
|
+
if (uri.startsWith("s3://")) {
|
|
42857
|
+
return "s3";
|
|
42858
|
+
}
|
|
42859
|
+
if (uri.startsWith("gs://") || uri.startsWith("gcs://")) {
|
|
42860
|
+
return "gcs";
|
|
42861
|
+
}
|
|
42862
|
+
return "local";
|
|
42863
|
+
}
|
|
42864
|
+
function buildCopySql(selectSql, uri, format, options = {}) {
|
|
42865
|
+
const target = toCopyTarget(uri);
|
|
42866
|
+
const fmt = (format || "").toLowerCase();
|
|
42867
|
+
const extraOptions = Object.entries(options || {}).map(([key, value]) => `${key.toUpperCase()} ${value}`);
|
|
42868
|
+
const optionList = [`FORMAT ${fmt}`, ...extraOptions].join(", ");
|
|
42869
|
+
return `COPY (SELECT * FROM postgres_query('${PG_ATTACH_ALIAS}', $sa$${selectSql}$sa$)) TO '${target}' (${optionList})`;
|
|
42870
|
+
}
|
|
42871
|
+
function loadDuckdb() {
|
|
42872
|
+
try {
|
|
42873
|
+
return nativeRequire("duckdb");
|
|
42874
|
+
}
|
|
42875
|
+
catch (e) {
|
|
42876
|
+
throw new Error(`Exporting on Postgres/Supabase requires the optional "duckdb" dependency, which failed to ` +
|
|
42877
|
+
`load: ${e.message}`);
|
|
42878
|
+
}
|
|
42879
|
+
}
|
|
42880
|
+
function allAsync(conn, sql) {
|
|
42881
|
+
return new Promise((resolve, reject) => {
|
|
42882
|
+
conn.all(sql, (err, rows) => (err ? reject(err) : resolve(rows || [])));
|
|
42883
|
+
});
|
|
42884
|
+
}
|
|
42885
|
+
function withConnection(fn) {
|
|
42886
|
+
const duckdb = loadDuckdb();
|
|
42887
|
+
const db = new duckdb.Database(":memory:");
|
|
42888
|
+
const conn = db.connect();
|
|
42889
|
+
const done = () => {
|
|
42890
|
+
var _a, _b;
|
|
42891
|
+
try {
|
|
42892
|
+
(_a = conn.close) === null || _a === void 0 ? void 0 : _a.call(conn);
|
|
42893
|
+
}
|
|
42894
|
+
catch (e) {
|
|
42895
|
+
}
|
|
42896
|
+
try {
|
|
42897
|
+
(_b = db.close) === null || _b === void 0 ? void 0 : _b.call(db);
|
|
42898
|
+
}
|
|
42899
|
+
catch (e) {
|
|
42900
|
+
}
|
|
42901
|
+
};
|
|
42902
|
+
const setup = !process.env.HOME
|
|
42903
|
+
? allAsync(conn, `SET home_directory='${os__namespace.tmpdir()}'`)
|
|
42904
|
+
: Promise.resolve([]);
|
|
42905
|
+
return setup
|
|
42906
|
+
.then(() => fn(conn))
|
|
42907
|
+
.then(result => {
|
|
42908
|
+
done();
|
|
42909
|
+
return result;
|
|
42910
|
+
}, err => {
|
|
42911
|
+
done();
|
|
42912
|
+
throw err;
|
|
42913
|
+
});
|
|
42914
|
+
}
|
|
42915
|
+
async function runDuckdbExport(args) {
|
|
42916
|
+
const { spec, selectSql, pg, storage, actionName } = args;
|
|
42917
|
+
const uri = resolveExportUri(spec, actionName, { wildcard: false });
|
|
42918
|
+
const scheme = schemeOf(uri);
|
|
42919
|
+
if (scheme !== "local" && !(storage === null || storage === void 0 ? void 0 : storage[scheme])) {
|
|
42920
|
+
throw new Error(`No "${scheme}" storage credentials found in .df-credentials.json (storage.${scheme}) for ` +
|
|
42921
|
+
`export to ${uri}.`);
|
|
42922
|
+
}
|
|
42923
|
+
return withConnection(async (conn) => {
|
|
42924
|
+
await allAsync(conn, "INSTALL postgres; LOAD postgres; INSTALL httpfs; LOAD httpfs;");
|
|
42925
|
+
await allAsync(conn, buildAttachSql(pg));
|
|
42926
|
+
if (scheme !== "local") {
|
|
42927
|
+
const secret = buildSecretSql(scheme, storage[scheme]);
|
|
42928
|
+
if (secret) {
|
|
42929
|
+
await allAsync(conn, secret);
|
|
42930
|
+
}
|
|
42931
|
+
}
|
|
42932
|
+
await allAsync(conn, buildCopySql(selectSql, uri, spec.format, spec.options || {}));
|
|
42933
|
+
return { destination: toCopyTarget(uri) };
|
|
42934
|
+
});
|
|
42935
|
+
}
|
|
42936
|
+
|
|
40846
42937
|
function parseArgvFlags(argv) {
|
|
40847
42938
|
const parsedArgv = {};
|
|
40848
42939
|
const splitArgv = [];
|
|
@@ -41185,7 +43276,7 @@ class Runner {
|
|
|
41185
43276
|
dryRun: (_j = (_h = this.executionOptions) === null || _h === void 0 ? void 0 : _h.bigquery) === null || _j === void 0 ? void 0 : _j.dryRun,
|
|
41186
43277
|
reservation: ((_k = action.actionDescriptor) === null || _k === void 0 ? void 0 : _k.reservation) || ((_l = this.graph.projectConfig) === null || _l === void 0 ? void 0 : _l.defaultReservation)
|
|
41187
43278
|
}
|
|
41188
|
-
});
|
|
43279
|
+
}, action);
|
|
41189
43280
|
if (taskStatus === sqlanvil.TaskResult.ExecutionStatus.FAILED) {
|
|
41190
43281
|
actionResult.status = sqlanvil.ActionResult.ExecutionStatus.FAILED;
|
|
41191
43282
|
}
|
|
@@ -41228,8 +43319,8 @@ class Runner {
|
|
|
41228
43319
|
this.notifyListeners();
|
|
41229
43320
|
return actionResult;
|
|
41230
43321
|
}
|
|
41231
|
-
async executeTask(client, task, parentAction, options) {
|
|
41232
|
-
var _a, _b, _c, _d;
|
|
43322
|
+
async executeTask(client, task, parentAction, options, action) {
|
|
43323
|
+
var _a, _b, _c, _d, _e;
|
|
41233
43324
|
const timer = Timer.start();
|
|
41234
43325
|
const taskResult = {
|
|
41235
43326
|
status: sqlanvil.TaskResult.ExecutionStatus.RUNNING,
|
|
@@ -41241,6 +43332,25 @@ class Runner {
|
|
|
41241
43332
|
if (((_a = options.bigquery) === null || _a === void 0 ? void 0 : _a.dryRun) && task.type === "assertion") {
|
|
41242
43333
|
taskResult.status = sqlanvil.TaskResult.ExecutionStatus.SUCCESSFUL;
|
|
41243
43334
|
}
|
|
43335
|
+
else if (task.type === "export") {
|
|
43336
|
+
try {
|
|
43337
|
+
const exporter = this.executionOptions.duckdbExport || runDuckdbExport;
|
|
43338
|
+
await exporter({
|
|
43339
|
+
spec: action === null || action === void 0 ? void 0 : action.export,
|
|
43340
|
+
selectSql: task.statement,
|
|
43341
|
+
pg: this.executionOptions.warehouseConnection,
|
|
43342
|
+
storage: this.executionOptions.storageCredentials,
|
|
43343
|
+
actionName: (_b = action === null || action === void 0 ? void 0 : action.target) === null || _b === void 0 ? void 0 : _b.name
|
|
43344
|
+
});
|
|
43345
|
+
taskResult.status = sqlanvil.TaskResult.ExecutionStatus.SUCCESSFUL;
|
|
43346
|
+
}
|
|
43347
|
+
catch (e) {
|
|
43348
|
+
taskResult.status = this.cancelled
|
|
43349
|
+
? sqlanvil.TaskResult.ExecutionStatus.CANCELLED
|
|
43350
|
+
: sqlanvil.TaskResult.ExecutionStatus.FAILED;
|
|
43351
|
+
taskResult.errorMessage = `${this.graph.projectConfig.warehouse} export error: ${e.message}`;
|
|
43352
|
+
}
|
|
43353
|
+
}
|
|
41244
43354
|
else {
|
|
41245
43355
|
try {
|
|
41246
43356
|
const statement = this.executionOptions.connectionCredentials
|
|
@@ -41253,7 +43363,7 @@ class Runner {
|
|
|
41253
43363
|
}), task.type === "operation" ? 1 : options.bigquery.actionRetryLimit + 1 || 1);
|
|
41254
43364
|
taskResult.metadata = metadata;
|
|
41255
43365
|
if (task.type === "assertion") {
|
|
41256
|
-
const rowCount = (
|
|
43366
|
+
const rowCount = (_c = rows[0]) === null || _c === void 0 ? void 0 : _c[Object.keys(rows[0])[0]];
|
|
41257
43367
|
if (rowCount > 0) {
|
|
41258
43368
|
throw new Error(`Assertion failed: query returned ${rowCount} row(s).`);
|
|
41259
43369
|
}
|
|
@@ -41265,7 +43375,7 @@ class Runner {
|
|
|
41265
43375
|
? sqlanvil.TaskResult.ExecutionStatus.CANCELLED
|
|
41266
43376
|
: sqlanvil.TaskResult.ExecutionStatus.FAILED;
|
|
41267
43377
|
taskResult.errorMessage = `${this.graph.projectConfig.warehouse} error: ${e.message}`;
|
|
41268
|
-
if ((
|
|
43378
|
+
if ((_e = (_d = e.metadata) === null || _d === void 0 ? void 0 : _d.bigquery) === null || _e === void 0 ? void 0 : _e.jobId) {
|
|
41269
43379
|
taskResult.metadata = {
|
|
41270
43380
|
bigquery: {
|
|
41271
43381
|
jobId: e.metadata.bigquery.jobId
|
|
@@ -44475,6 +46585,8 @@ function runCli() {
|
|
|
44475
46585
|
}
|
|
44476
46586
|
const connectionCredentials = readConnections(credentialsPathWithEnvironment(argv[projectDirOption.name], argv));
|
|
44477
46587
|
assertConnectionCredentialsAvailable(executionGraph, connectionCredentials);
|
|
46588
|
+
const storageCredentials = readStorageCredentials(credentialsPathWithEnvironment(argv[projectDirOption.name], argv));
|
|
46589
|
+
const isPostgresLike = warehouse.toLowerCase() === "postgres" || warehouse.toLowerCase() === "supabase";
|
|
44478
46590
|
if (argv[dryRunOptionName]) {
|
|
44479
46591
|
print("Dry running (no changes to the warehouse will be applied)...");
|
|
44480
46592
|
}
|
|
@@ -44483,7 +46595,9 @@ function runCli() {
|
|
|
44483
46595
|
}
|
|
44484
46596
|
const runner = run(dbadapter, executionGraph, {
|
|
44485
46597
|
bigquery: bigqueryOptions,
|
|
44486
|
-
connectionCredentials
|
|
46598
|
+
connectionCredentials,
|
|
46599
|
+
warehouseConnection: isPostgresLike ? readCredentials : undefined,
|
|
46600
|
+
storageCredentials
|
|
44487
46601
|
});
|
|
44488
46602
|
process.on("SIGINT", () => {
|
|
44489
46603
|
runner.cancel();
|