relq 1.0.121 → 1.0.122
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/dist/cjs/cli/commands/generate.cjs +5 -0
- package/dist/cjs/cli/commands/import.cjs +1 -0
- package/dist/cjs/cli/commands/pull.cjs +2 -0
- package/dist/cjs/cli/commands/push.cjs +5 -0
- package/dist/cjs/cli/utils/ast-codegen.cjs +57 -0
- package/dist/cjs/cli/utils/ast-transformer.cjs +3 -0
- package/dist/cjs/cli/utils/schema-diff.cjs +2 -0
- package/dist/cjs/cli/utils/schema-to-ast.cjs +44 -9
- package/dist/cjs/cli/utils/source-id-validator.cjs +2 -1
- package/dist/cjs/cockroachdb-builder.cjs +9 -2
- package/dist/cjs/insert/conflict-builder.cjs +44 -29
- package/dist/cjs/insert/insert-builder.cjs +5 -2
- package/dist/cjs/schema-definition/pg-schema/index.cjs +13 -2
- package/dist/cjs/schema-definition/pg-schema/pg-policy.cjs +103 -0
- package/dist/cjs/schema-definition/pg-schema/pg-view.cjs +79 -10
- package/dist/cjs/update/update-builder.cjs +1 -1
- package/dist/cockroachdb-builder.d.ts +191 -4
- package/dist/config.d.ts +5 -0
- package/dist/dsql-builder.d.ts +35 -3
- package/dist/esm/cli/commands/generate.js +5 -0
- package/dist/esm/cli/commands/import.js +1 -0
- package/dist/esm/cli/commands/pull.js +2 -0
- package/dist/esm/cli/commands/push.js +5 -0
- package/dist/esm/cli/utils/ast-codegen.js +57 -0
- package/dist/esm/cli/utils/ast-transformer.js +3 -0
- package/dist/esm/cli/utils/schema-diff.js +2 -0
- package/dist/esm/cli/utils/schema-to-ast.js +42 -9
- package/dist/esm/cli/utils/source-id-validator.js +2 -1
- package/dist/esm/cockroachdb-builder.js +1 -0
- package/dist/esm/insert/conflict-builder.js +44 -29
- package/dist/esm/insert/insert-builder.js +5 -2
- package/dist/esm/schema-definition/pg-schema/index.js +2 -1
- package/dist/esm/schema-definition/pg-schema/pg-policy.js +95 -0
- package/dist/esm/schema-definition/pg-schema/pg-view.js +75 -10
- package/dist/esm/update/update-builder.js +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/nile-builder.d.ts +207 -4
- package/dist/pg-builder.d.ts +207 -4
- package/package.json +6 -6
|
@@ -206,6 +206,7 @@ exports.default = (0, citty_1.defineCommand)({
|
|
|
206
206
|
const format = config.migrations?.format || 'sequential';
|
|
207
207
|
const includeFunctions = config.includeFunctions ?? false;
|
|
208
208
|
const includeTriggers = config.includeTriggers ?? false;
|
|
209
|
+
const includePolicies = config.includePolicies ?? false;
|
|
209
210
|
const isEmpty = args.empty === true;
|
|
210
211
|
const noDown = args['no-down'] === true;
|
|
211
212
|
const dryRun = args['dry-run'] === true;
|
|
@@ -277,6 +278,10 @@ exports.default = (0, citty_1.defineCommand)({
|
|
|
277
278
|
dbParsedSchema.triggers = [];
|
|
278
279
|
desiredASTCopy.triggers = [];
|
|
279
280
|
}
|
|
281
|
+
if (!includePolicies) {
|
|
282
|
+
dbParsedSchema.policies = [];
|
|
283
|
+
desiredASTCopy.policies = [];
|
|
284
|
+
}
|
|
280
285
|
const comparison = (0, schema_diff_1.compareSchemas)(dbParsedSchema, desiredASTCopy);
|
|
281
286
|
applyIgnorePatterns(comparison, rawPatterns);
|
|
282
287
|
spin.stop('Diff computed');
|
|
@@ -210,6 +210,7 @@ async function runImport(sqlFilePath, options, projectRoot, config) {
|
|
|
210
210
|
views: parsedSchema.views,
|
|
211
211
|
functions: parsedSchema.functions,
|
|
212
212
|
triggers: parsedSchema.triggers,
|
|
213
|
+
policies: parsedSchema.policies || [],
|
|
213
214
|
extensions: parsedSchema.extensions,
|
|
214
215
|
};
|
|
215
216
|
if (ignoredCount > 0) {
|
|
@@ -174,6 +174,7 @@ function parseSchemaFileForSnapshot(schemaPath) {
|
|
|
174
174
|
collations: [],
|
|
175
175
|
functions: [],
|
|
176
176
|
triggers: [],
|
|
177
|
+
policies: [],
|
|
177
178
|
extensions: [],
|
|
178
179
|
};
|
|
179
180
|
}
|
|
@@ -919,6 +920,7 @@ async function runPull(config, projectRoot, opts = {}) {
|
|
|
919
920
|
tables: [],
|
|
920
921
|
functions: [],
|
|
921
922
|
triggers: [],
|
|
923
|
+
policies: [],
|
|
922
924
|
};
|
|
923
925
|
const afterSchema = {
|
|
924
926
|
extensions: dbSchema.extensions || [],
|
|
@@ -265,6 +265,7 @@ async function runPush(config, projectRoot, opts = {}) {
|
|
|
265
265
|
const connection = config.connection;
|
|
266
266
|
const includeFunctions = config.includeFunctions ?? false;
|
|
267
267
|
const includeTriggers = config.includeTriggers ?? false;
|
|
268
|
+
const includePolicies = config.includePolicies ?? false;
|
|
268
269
|
const spin = p.spinner();
|
|
269
270
|
const startTime = Date.now();
|
|
270
271
|
console.log('');
|
|
@@ -358,6 +359,10 @@ async function runPush(config, projectRoot, opts = {}) {
|
|
|
358
359
|
dbParsedSchema.triggers = [];
|
|
359
360
|
desiredASTCopy.triggers = [];
|
|
360
361
|
}
|
|
362
|
+
if (!includePolicies || desiredASTCopy.policies.length === 0) {
|
|
363
|
+
dbParsedSchema.policies = [];
|
|
364
|
+
desiredASTCopy.policies = [];
|
|
365
|
+
}
|
|
361
366
|
if (desiredASTCopy.sequences.length === 0) {
|
|
362
367
|
dbParsedSchema.sequences = [];
|
|
363
368
|
}
|
|
@@ -128,6 +128,11 @@ function assignTrackingIds(schema) {
|
|
|
128
128
|
tr.trackingId = generateTrackingId('r');
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
+
for (const pol of schema.policies) {
|
|
132
|
+
if (!pol.trackingId) {
|
|
133
|
+
pol.trackingId = generateTrackingId('y');
|
|
134
|
+
}
|
|
135
|
+
}
|
|
131
136
|
return schema;
|
|
132
137
|
}
|
|
133
138
|
function mergeTrackingIdsFromParsed(target, source) {
|
|
@@ -900,6 +905,44 @@ function generateTriggerCode(trigger, useCamelCase, functionNames) {
|
|
|
900
905
|
}
|
|
901
906
|
return parts.join('\n');
|
|
902
907
|
}
|
|
908
|
+
function generatePolicyCode(policy, useCamelCase, tableNames) {
|
|
909
|
+
const policyName = useCamelCase ? (0, utils_1.toCamelCase)(policy.name) : policy.name;
|
|
910
|
+
const tableName = useCamelCase ? (0, utils_1.toCamelCase)(policy.table) : policy.table;
|
|
911
|
+
const parts = [];
|
|
912
|
+
parts.push(`export const ${policyName} = pgPolicy('${policy.name}', {`);
|
|
913
|
+
if (tableNames.has(policy.table)) {
|
|
914
|
+
parts.push(` on: ${tableName},`);
|
|
915
|
+
}
|
|
916
|
+
else {
|
|
917
|
+
parts.push(` on: '${policy.table}',`);
|
|
918
|
+
}
|
|
919
|
+
if (policy.command !== 'ALL') {
|
|
920
|
+
parts.push(` for: '${policy.command}',`);
|
|
921
|
+
}
|
|
922
|
+
if (!policy.permissive) {
|
|
923
|
+
parts.push(` permissive: false,`);
|
|
924
|
+
}
|
|
925
|
+
if (policy.roles.length > 0) {
|
|
926
|
+
parts.push(` to: [${policy.roles.map(r => `'${r}'`).join(', ')}],`);
|
|
927
|
+
}
|
|
928
|
+
if (policy.using) {
|
|
929
|
+
const escapedUsing = policy.using.replace(/\\/g, '\\\\').replace(/'/g, "\\'");
|
|
930
|
+
parts.push(` using: '${escapedUsing}',`);
|
|
931
|
+
}
|
|
932
|
+
if (policy.withCheck) {
|
|
933
|
+
const escapedCheck = policy.withCheck.replace(/\\/g, '\\\\').replace(/'/g, "\\'");
|
|
934
|
+
parts.push(` withCheck: '${escapedCheck}',`);
|
|
935
|
+
}
|
|
936
|
+
if (policy.comment) {
|
|
937
|
+
const escapedComment = policy.comment.replace(/\\/g, '\\\\').replace(/'/g, "\\'");
|
|
938
|
+
parts.push(` comment: '${escapedComment}',`);
|
|
939
|
+
}
|
|
940
|
+
parts.push(`})`);
|
|
941
|
+
if (policy.trackingId) {
|
|
942
|
+
parts[parts.length - 1] = parts[parts.length - 1].replace('})', `}).$id('${policy.trackingId}')`);
|
|
943
|
+
}
|
|
944
|
+
return parts.join('\n');
|
|
945
|
+
}
|
|
903
946
|
function generateTypeScriptFromAST(schema, options) {
|
|
904
947
|
const { camelCase = true, importPath, includeEnums = true, includeDomains = true, includeTables = true, includeFunctions = true, includeTriggers = true, columnTypeMap = {}, typesImportPath, } = options;
|
|
905
948
|
const parts = [];
|
|
@@ -917,6 +960,7 @@ function generateTypeScriptFromAST(schema, options) {
|
|
|
917
960
|
const needsPgSequence = schema.sequences.length > 0;
|
|
918
961
|
const needsPgFunction = includeFunctions && schema.functions.length > 0;
|
|
919
962
|
const needsPgTrigger = includeTriggers && schema.triggers.length > 0;
|
|
963
|
+
const needsPgPolicy = options.includePolicies !== false && schema.policies.length > 0;
|
|
920
964
|
const needsPgEnum = includeEnums && schema.enums.length > 0;
|
|
921
965
|
const needsPgView = options.includeViews !== false && schema.views.filter(v => !v.isMaterialized).length > 0;
|
|
922
966
|
const needsPgMaterializedView = options.includeViews !== false && schema.views.filter(v => v.isMaterialized).length > 0;
|
|
@@ -969,6 +1013,8 @@ function generateTypeScriptFromAST(schema, options) {
|
|
|
969
1013
|
imports.push('pgFunction');
|
|
970
1014
|
if (needsPgTrigger)
|
|
971
1015
|
imports.push('pgTrigger');
|
|
1016
|
+
if (needsPgPolicy)
|
|
1017
|
+
imports.push('pgPolicy');
|
|
972
1018
|
const finalNeedsDefaultImport = needsDefaultImport || (0, defaults_1.getDefaultImportNeeded)();
|
|
973
1019
|
const finalNeedsSqlImport = needsSqlImport || (0, constraints_1.getSqlImportNeeded)() || (0, defaults_1.getDefaultSqlImportNeeded)();
|
|
974
1020
|
if (finalNeedsDefaultImport)
|
|
@@ -1079,6 +1125,17 @@ function generateTypeScriptFromAST(schema, options) {
|
|
|
1079
1125
|
parts.push('');
|
|
1080
1126
|
}
|
|
1081
1127
|
}
|
|
1128
|
+
if (needsPgPolicy) {
|
|
1129
|
+
parts.push('// =============================================================================');
|
|
1130
|
+
parts.push('// POLICIES');
|
|
1131
|
+
parts.push('// =============================================================================');
|
|
1132
|
+
parts.push('');
|
|
1133
|
+
const definedTableNames = new Set(schema.tables.map(t => t.name));
|
|
1134
|
+
for (const policy of schema.policies) {
|
|
1135
|
+
parts.push(generatePolicyCode(policy, camelCase, definedTableNames));
|
|
1136
|
+
parts.push('');
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1082
1139
|
parts.push('// =============================================================================');
|
|
1083
1140
|
parts.push('// SCHEMA EXPORT');
|
|
1084
1141
|
parts.push('// =============================================================================');
|
|
@@ -515,6 +515,7 @@ async function parseSQL(sql) {
|
|
|
515
515
|
views: [],
|
|
516
516
|
functions: [],
|
|
517
517
|
triggers: [],
|
|
518
|
+
policies: [],
|
|
518
519
|
extensions: [],
|
|
519
520
|
};
|
|
520
521
|
for (const stmtWrapper of result.stmts || []) {
|
|
@@ -589,6 +590,7 @@ async function introspectedToParsedSchema(schema) {
|
|
|
589
590
|
views: [],
|
|
590
591
|
functions: [],
|
|
591
592
|
triggers: [],
|
|
593
|
+
policies: [],
|
|
592
594
|
extensions: schema.extensions || [],
|
|
593
595
|
};
|
|
594
596
|
for (const e of schema.enums || []) {
|
|
@@ -1053,5 +1055,6 @@ function normalizedToParsedSchema(schema) {
|
|
|
1053
1055
|
comment: t.comment,
|
|
1054
1056
|
trackingId: t.trackingId,
|
|
1055
1057
|
})),
|
|
1058
|
+
policies: [],
|
|
1056
1059
|
};
|
|
1057
1060
|
}
|
|
@@ -214,6 +214,7 @@ function compareSchemas(oldSchema, newSchema) {
|
|
|
214
214
|
views: [],
|
|
215
215
|
functions: [],
|
|
216
216
|
triggers: [],
|
|
217
|
+
policies: [],
|
|
217
218
|
extensions: [],
|
|
218
219
|
},
|
|
219
220
|
removed: {
|
|
@@ -228,6 +229,7 @@ function compareSchemas(oldSchema, newSchema) {
|
|
|
228
229
|
views: [],
|
|
229
230
|
functions: [],
|
|
230
231
|
triggers: [],
|
|
232
|
+
policies: [],
|
|
231
233
|
extensions: [],
|
|
232
234
|
},
|
|
233
235
|
renamed: {
|
|
@@ -7,6 +7,7 @@ exports.isCompositeConfig = isCompositeConfig;
|
|
|
7
7
|
exports.isSequenceConfig = isSequenceConfig;
|
|
8
8
|
exports.isViewConfig = isViewConfig;
|
|
9
9
|
exports.isMaterializedViewConfig = isMaterializedViewConfig;
|
|
10
|
+
exports.isPolicyConfig = isPolicyConfig;
|
|
10
11
|
exports.isFunctionConfig = isFunctionConfig;
|
|
11
12
|
exports.isTriggerConfig = isTriggerConfig;
|
|
12
13
|
exports.isExtensionsConfig = isExtensionsConfig;
|
|
@@ -26,6 +27,7 @@ exports.compositeToAST = compositeToAST;
|
|
|
26
27
|
exports.sequenceToAST = sequenceToAST;
|
|
27
28
|
exports.viewToAST = viewToAST;
|
|
28
29
|
exports.materializedViewToAST = materializedViewToAST;
|
|
30
|
+
exports.policyToAST = policyToAST;
|
|
29
31
|
exports.functionToAST = functionToAST;
|
|
30
32
|
exports.triggerToAST = triggerToAST;
|
|
31
33
|
exports.parsedColumnToColumnInfo = parsedColumnToColumnInfo;
|
|
@@ -61,14 +63,19 @@ function isSequenceConfig(value) {
|
|
|
61
63
|
function isViewConfig(value) {
|
|
62
64
|
return value && typeof value === 'object' &&
|
|
63
65
|
value.$type === 'view' &&
|
|
64
|
-
typeof value.name === 'string' &&
|
|
65
|
-
typeof value.definition === 'string';
|
|
66
|
+
(typeof value.$viewName === 'string' || typeof value.name === 'string') &&
|
|
67
|
+
(typeof value.$definition === 'string' || typeof value.definition === 'string');
|
|
66
68
|
}
|
|
67
69
|
function isMaterializedViewConfig(value) {
|
|
68
70
|
return value && typeof value === 'object' &&
|
|
69
71
|
value.$type === 'materialized_view' &&
|
|
70
|
-
typeof value.name === 'string' &&
|
|
71
|
-
typeof value.definition === 'string';
|
|
72
|
+
(typeof value.$viewName === 'string' || typeof value.name === 'string') &&
|
|
73
|
+
(typeof value.$definition === 'string' || typeof value.definition === 'string');
|
|
74
|
+
}
|
|
75
|
+
function isPolicyConfig(value) {
|
|
76
|
+
return value && typeof value === 'object' &&
|
|
77
|
+
value.$type === 'policy' &&
|
|
78
|
+
(typeof value.$policyName === 'string' || typeof value.name === 'string');
|
|
72
79
|
}
|
|
73
80
|
function isFunctionConfig(value) {
|
|
74
81
|
return value && typeof value === 'object' &&
|
|
@@ -198,6 +205,7 @@ function schemaToAST(schema) {
|
|
|
198
205
|
views: [],
|
|
199
206
|
functions: [],
|
|
200
207
|
triggers: [],
|
|
208
|
+
policies: [],
|
|
201
209
|
extensions: [],
|
|
202
210
|
};
|
|
203
211
|
const pendingRelations = [];
|
|
@@ -258,6 +266,12 @@ function schemaToAST(schema) {
|
|
|
258
266
|
result.triggers.push(trigger);
|
|
259
267
|
continue;
|
|
260
268
|
}
|
|
269
|
+
if (isPolicyConfig(value)) {
|
|
270
|
+
const policy = policyToAST(value);
|
|
271
|
+
if (policy)
|
|
272
|
+
result.policies.push(policy);
|
|
273
|
+
continue;
|
|
274
|
+
}
|
|
261
275
|
if (isExtensionsConfig(value)) {
|
|
262
276
|
result.extensions.push(...value.extensions);
|
|
263
277
|
continue;
|
|
@@ -723,10 +737,11 @@ function viewToAST(view) {
|
|
|
723
737
|
if (!isViewConfig(view))
|
|
724
738
|
return null;
|
|
725
739
|
return {
|
|
726
|
-
name: view.name,
|
|
740
|
+
name: view.$viewName || view.name,
|
|
727
741
|
schema: view.schema || 'public',
|
|
728
|
-
definition: view.definition,
|
|
742
|
+
definition: view.$definition || view.definition,
|
|
729
743
|
isMaterialized: false,
|
|
744
|
+
comment: view.$commentText,
|
|
730
745
|
trackingId: extractTrackingId(view),
|
|
731
746
|
};
|
|
732
747
|
}
|
|
@@ -734,14 +749,34 @@ function materializedViewToAST(matView) {
|
|
|
734
749
|
if (!isMaterializedViewConfig(matView))
|
|
735
750
|
return null;
|
|
736
751
|
return {
|
|
737
|
-
name: matView.name,
|
|
752
|
+
name: matView.$viewName || matView.name,
|
|
738
753
|
schema: matView.schema || 'public',
|
|
739
|
-
definition: matView.definition,
|
|
754
|
+
definition: matView.$definition || matView.definition,
|
|
740
755
|
isMaterialized: true,
|
|
741
|
-
withData: matView.withData,
|
|
756
|
+
withData: matView.$withData ?? matView.withData,
|
|
757
|
+
comment: matView.$commentText,
|
|
742
758
|
trackingId: extractTrackingId(matView),
|
|
743
759
|
};
|
|
744
760
|
}
|
|
761
|
+
function policyToAST(policy) {
|
|
762
|
+
if (!isPolicyConfig(policy))
|
|
763
|
+
return null;
|
|
764
|
+
const opts = policy.$options || {};
|
|
765
|
+
const tableName = typeof opts.on === 'string'
|
|
766
|
+
? opts.on
|
|
767
|
+
: (opts.on?.$name || opts.on?.$tableName || opts.on?.name || '');
|
|
768
|
+
return {
|
|
769
|
+
name: policy.$policyName || policy.name,
|
|
770
|
+
table: tableName,
|
|
771
|
+
command: opts.for || 'ALL',
|
|
772
|
+
permissive: opts.permissive !== false,
|
|
773
|
+
roles: opts.to || [],
|
|
774
|
+
using: opts.using,
|
|
775
|
+
withCheck: opts.withCheck,
|
|
776
|
+
comment: policy.$commentText || opts.comment,
|
|
777
|
+
trackingId: extractTrackingId(policy),
|
|
778
|
+
};
|
|
779
|
+
}
|
|
745
780
|
function functionToAST(func) {
|
|
746
781
|
if (!isFunctionConfig(func))
|
|
747
782
|
return null;
|
|
@@ -175,7 +175,7 @@ function validateCallbackArray(optionsObj, callbackName, entityType, tableName,
|
|
|
175
175
|
}
|
|
176
176
|
const TOP_LEVEL_BUILDERS = new Set([
|
|
177
177
|
'pgEnum', 'pgDomain', 'pgFunction', 'pgTrigger',
|
|
178
|
-
'pgView', 'pgMaterializedView',
|
|
178
|
+
'pgView', 'pgMaterializedView', 'pgPolicy',
|
|
179
179
|
]);
|
|
180
180
|
const SEQUENCE_BUILDER = 'pgSequence';
|
|
181
181
|
function getBuilderName(init) {
|
|
@@ -232,6 +232,7 @@ function validateTopLevelExport(init, exportName, builderName, issues) {
|
|
|
232
232
|
pgTrigger: 'trigger',
|
|
233
233
|
pgView: 'view',
|
|
234
234
|
pgMaterializedView: 'materialized view',
|
|
235
|
+
pgPolicy: 'policy',
|
|
235
236
|
};
|
|
236
237
|
const entityType = entityMap[builderName] || builderName;
|
|
237
238
|
issues.push({
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.customType = exports.jsonb = exports.json = exports.uuid = exports.tsquery = exports.tsvector = exports.varbit = exports.bitVarying = exports.bit = exports.macaddr8 = exports.macaddr = exports.cidr = exports.inet = exports.bool = exports.boolean = exports.interval = exports.timeWithTimeZone = exports.timetz = exports.time = exports.date = exports.timestampWithTimeZone = exports.timestamptz = exports.timestamp = exports.bytea = exports.text = exports.character = exports.char = exports.characterVarying = exports.varchar = exports.float8 = exports.doublePrecision = exports.float4 = exports.real = exports.numeric = exports.decimal = exports.epoch = exports.serial8 = exports.bigserial = exports.serial2 = exports.smallserial = exports.serial4 = exports.serial = exports.int8 = exports.bigint = exports.int2 = exports.smallint = exports.int4 = exports.int = exports.integer = exports.DIALECT = void 0;
|
|
4
4
|
exports.pgView = exports.isSequenceConfig = exports.dropSequenceSQL = exports.generateSequenceSQL = exports.pgSequence = exports.isFunctionConfig = exports.dropFunctionSQL = exports.generateFunctionSQL = exports.pgFunction = exports.addEnumValueSQL = exports.dropEnumSQL = exports.generateEnumSQL = exports.pgEnum = exports.matchCodeToString = exports.stringToActionCode = exports.actionCodeToString = exports.generateReferencesSQL = exports.defineSchema = exports.defineRelations = exports.pgRelations = exports.introspectMultiple = exports.introspectSQL = exports.generateSchemaCode = exports.parseCreateTable = exports.createExpressionBuilder = exports.expressionBuilder = exports.createTableColumnRefs = exports.createGeneratedExprBuilder = exports.createWhereBuilder = exports.getSql = exports.pgExtensions = exports.sqlFunctions = exports.defineTable = exports.createFluentGenExpr = exports.SQL_BRAND = exports.EMPTY_ARRAY = exports.EMPTY_OBJECT = exports.index = exports.raw = exports.sql = exports.emptyArray = exports.emptyObject = exports.currentDate = exports.currentTimestamp = exports.now = exports.genRandomUuid = exports.generateCompositeTypeSQL = exports.pgComposite = exports.generateDomainSQL = exports.pgDomain = void 0;
|
|
5
|
-
exports.
|
|
6
|
-
exports.validateTTL = exports.generateRemoveTTL = exports.generateAlterTableTTL = exports.generateTTLStorageParams = exports.validateZoneConfig = exports.generateDatabaseZoneSQL = exports.generateIndexZoneSQL = exports.generateTableZoneSQL = exports.validateDatabaseConfig = exports.validateLocality = exports.generateDatabaseConfigSQL = exports.generateLocalitySQL = exports.SUPPORTED_INDEX_METHODS = exports.BLOCKED_INDEX_METHODS = exports.isCrdbIndexMethodSupported = exports.generateHashShardedSQL = exports.transformIncludeToStoring = exports.validateHashSharded = exports.validateCrdbIndex = exports.BLOCKED_PLPGSQL_CONSTRUCTS = exports.scanFunctionBody = exports.validateCrdbFunctions = exports.validateCrdbFunction = exports.BLOCKED_TRIGGER_FEATURES = void 0;
|
|
5
|
+
exports.getWarningTypes = exports.getBlockedTypes = exports.getCrdbAlternative = exports.checkTypeSupport = exports.validateCrdbColumnTypes = exports.validateCrdbColumnType = exports.getTypesWithDifferences = exports.getUnsupportedTypesByCategory = exports.isCrdbTypeSupported = exports.getCrdbTypeMapping = exports.CRDB_TYPE_MAP = exports.createCrdbValidationResult = exports.formatCrdbValidationResult = exports.formatCrdbMessage = exports.createCrdbMessage = exports.lookupErrorCode = exports.CRDB_INFO = exports.CRDB_WARNINGS = exports.CRDB_ERRORS = exports.UNSUPPORTED_FEATURES = exports.createFunction = exports.formatValidationReport = exports.getSchemaUnsupportedFeatures = exports.isColumnTypeSupported = exports.validateTableForDialect = exports.validateSchemaForDialect = exports.DIALECT_FEATURES = exports.COCKROACHDB_FEATURES = exports.getPortableFeatureSet = exports.compareDialectFeatures = exports.getUnsupportedFeatures = exports.isFeatureSupported = exports.getSupportedIndexMethods = exports.isIndexMethodSupported = exports.validateColumnTypes = exports.validateColumnType = exports.getDialectFeatures = exports.DEFAULT = exports.generateChildPartitionSQL = exports.generatePartitionBySQL = exports.partitionStrategyFactory = exports.isPolicyConfig = exports.forceRlsSQL = exports.enableRlsSQL = exports.dropPolicySQL = exports.generatePolicySQL = exports.pgPolicy = exports.materializedViewToSQL = exports.viewToSQL = exports.pgMaterializedView = void 0;
|
|
6
|
+
exports.validateTTL = exports.generateRemoveTTL = exports.generateAlterTableTTL = exports.generateTTLStorageParams = exports.validateZoneConfig = exports.generateDatabaseZoneSQL = exports.generateIndexZoneSQL = exports.generateTableZoneSQL = exports.validateDatabaseConfig = exports.validateLocality = exports.generateDatabaseConfigSQL = exports.generateLocalitySQL = exports.SUPPORTED_INDEX_METHODS = exports.BLOCKED_INDEX_METHODS = exports.isCrdbIndexMethodSupported = exports.generateHashShardedSQL = exports.transformIncludeToStoring = exports.validateHashSharded = exports.validateCrdbIndex = exports.BLOCKED_PLPGSQL_CONSTRUCTS = exports.scanFunctionBody = exports.validateCrdbFunctions = exports.validateCrdbFunction = exports.BLOCKED_TRIGGER_FEATURES = exports.validateCrdbTriggers = exports.validateCrdbTrigger = exports.BLOCKED_CONSTRAINT_FEATURES = exports.isConstraintTypeSupported = exports.validateCrdbConstraints = exports.validateCrdbConstraint = void 0;
|
|
7
7
|
exports.validateForCockroachDB = validateForCockroachDB;
|
|
8
8
|
exports.isSupportedType = isSupportedType;
|
|
9
9
|
exports.DIALECT = 'cockroachdb';
|
|
@@ -132,6 +132,13 @@ Object.defineProperty(exports, "pgView", { enumerable: true, get: function () {
|
|
|
132
132
|
Object.defineProperty(exports, "pgMaterializedView", { enumerable: true, get: function () { return pg_view_1.pgMaterializedView; } });
|
|
133
133
|
Object.defineProperty(exports, "viewToSQL", { enumerable: true, get: function () { return pg_view_1.viewToSQL; } });
|
|
134
134
|
Object.defineProperty(exports, "materializedViewToSQL", { enumerable: true, get: function () { return pg_view_1.materializedViewToSQL; } });
|
|
135
|
+
var pg_policy_1 = require("./schema-definition/pg-schema/pg-policy.cjs");
|
|
136
|
+
Object.defineProperty(exports, "pgPolicy", { enumerable: true, get: function () { return pg_policy_1.pgPolicy; } });
|
|
137
|
+
Object.defineProperty(exports, "generatePolicySQL", { enumerable: true, get: function () { return pg_policy_1.generatePolicySQL; } });
|
|
138
|
+
Object.defineProperty(exports, "dropPolicySQL", { enumerable: true, get: function () { return pg_policy_1.dropPolicySQL; } });
|
|
139
|
+
Object.defineProperty(exports, "enableRlsSQL", { enumerable: true, get: function () { return pg_policy_1.enableRlsSQL; } });
|
|
140
|
+
Object.defineProperty(exports, "forceRlsSQL", { enumerable: true, get: function () { return pg_policy_1.forceRlsSQL; } });
|
|
141
|
+
Object.defineProperty(exports, "isPolicyConfig", { enumerable: true, get: function () { return pg_policy_1.isPolicyConfig; } });
|
|
135
142
|
var partitions_1 = require("./schema-definition/pg-schema/partitions.cjs");
|
|
136
143
|
Object.defineProperty(exports, "partitionStrategyFactory", { enumerable: true, get: function () { return partitions_1.partitionStrategyFactory; } });
|
|
137
144
|
Object.defineProperty(exports, "generatePartitionBySQL", { enumerable: true, get: function () { return partitions_1.generatePartitionBySQL; } });
|
|
@@ -32,9 +32,14 @@ function createRowProxy(tableName) {
|
|
|
32
32
|
function columnRefToSql(ref) {
|
|
33
33
|
return (0, pg_format_1.default)('%I.%I', ref.table, ref.column);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function resolveColumnRef(ref, columnResolver) {
|
|
36
|
+
if (!columnResolver)
|
|
37
|
+
return ref;
|
|
38
|
+
return { ...ref, column: columnResolver(ref.column) };
|
|
39
|
+
}
|
|
40
|
+
function valueToSql(value, columnResolver) {
|
|
36
41
|
if (isColumnRef(value)) {
|
|
37
|
-
return columnRefToSql(value);
|
|
42
|
+
return columnRefToSql(resolveColumnRef(value, columnResolver));
|
|
38
43
|
}
|
|
39
44
|
if (isSqlExpression(value)) {
|
|
40
45
|
return value.sql;
|
|
@@ -44,65 +49,67 @@ function valueToSql(value) {
|
|
|
44
49
|
}
|
|
45
50
|
return (0, pg_format_1.default)('%L', value);
|
|
46
51
|
}
|
|
47
|
-
function createSqlHelpers(currentColumn, tableName) {
|
|
52
|
+
function createSqlHelpers(currentColumn, tableName, columnResolver) {
|
|
53
|
+
const resolve = (col) => columnResolver ? columnResolver(col) : col;
|
|
54
|
+
const resolvedColumn = resolve(currentColumn);
|
|
48
55
|
const expr = (sql) => ({ __type: 'sql_expression', sql });
|
|
49
56
|
return {
|
|
50
57
|
increment(amount) {
|
|
51
|
-
return expr(`${(0, pg_format_1.default)('%I.%I', tableName,
|
|
58
|
+
return expr(`${(0, pg_format_1.default)('%I.%I', tableName, resolvedColumn)} + ${amount}`);
|
|
52
59
|
},
|
|
53
60
|
add(a, b) {
|
|
54
|
-
return expr(`${valueToSql(a)} + ${valueToSql(b)}`);
|
|
61
|
+
return expr(`${valueToSql(a, columnResolver)} + ${valueToSql(b, columnResolver)}`);
|
|
55
62
|
},
|
|
56
63
|
subtract(a, b) {
|
|
57
|
-
return expr(`${valueToSql(a)} - ${valueToSql(b)}`);
|
|
64
|
+
return expr(`${valueToSql(a, columnResolver)} - ${valueToSql(b, columnResolver)}`);
|
|
58
65
|
},
|
|
59
66
|
multiply(a, b) {
|
|
60
|
-
return expr(`${valueToSql(a)} * ${valueToSql(b)}`);
|
|
67
|
+
return expr(`${valueToSql(a, columnResolver)} * ${valueToSql(b, columnResolver)}`);
|
|
61
68
|
},
|
|
62
69
|
divide(a, b) {
|
|
63
|
-
return expr(`${valueToSql(a)} / ${valueToSql(b)}`);
|
|
70
|
+
return expr(`${valueToSql(a, columnResolver)} / ${valueToSql(b, columnResolver)}`);
|
|
64
71
|
},
|
|
65
72
|
modulo(a, b) {
|
|
66
|
-
return expr(`${valueToSql(a)} % ${valueToSql(b)}`);
|
|
73
|
+
return expr(`${valueToSql(a, columnResolver)} % ${valueToSql(b, columnResolver)}`);
|
|
67
74
|
},
|
|
68
75
|
coalesce(...values) {
|
|
69
|
-
return expr(`COALESCE(${values.map(v => valueToSql(v)).join(', ')})`);
|
|
76
|
+
return expr(`COALESCE(${values.map(v => valueToSql(v, columnResolver)).join(', ')})`);
|
|
70
77
|
},
|
|
71
78
|
greatest(...values) {
|
|
72
|
-
return expr(`GREATEST(${values.map(v => valueToSql(v)).join(', ')})`);
|
|
79
|
+
return expr(`GREATEST(${values.map(v => valueToSql(v, columnResolver)).join(', ')})`);
|
|
73
80
|
},
|
|
74
81
|
least(...values) {
|
|
75
|
-
return expr(`LEAST(${values.map(v => valueToSql(v)).join(', ')})`);
|
|
82
|
+
return expr(`LEAST(${values.map(v => valueToSql(v, columnResolver)).join(', ')})`);
|
|
76
83
|
},
|
|
77
84
|
nullif(a, b) {
|
|
78
|
-
return expr(`NULLIF(${valueToSql(a)}, ${valueToSql(b)})`);
|
|
85
|
+
return expr(`NULLIF(${valueToSql(a, columnResolver)}, ${valueToSql(b, columnResolver)})`);
|
|
79
86
|
},
|
|
80
87
|
abs(value) {
|
|
81
|
-
return expr(`ABS(${valueToSql(value)})`);
|
|
88
|
+
return expr(`ABS(${valueToSql(value, columnResolver)})`);
|
|
82
89
|
},
|
|
83
90
|
ceil(value) {
|
|
84
|
-
return expr(`CEIL(${valueToSql(value)})`);
|
|
91
|
+
return expr(`CEIL(${valueToSql(value, columnResolver)})`);
|
|
85
92
|
},
|
|
86
93
|
floor(value) {
|
|
87
|
-
return expr(`FLOOR(${valueToSql(value)})`);
|
|
94
|
+
return expr(`FLOOR(${valueToSql(value, columnResolver)})`);
|
|
88
95
|
},
|
|
89
96
|
round(value, decimals) {
|
|
90
97
|
if (decimals !== undefined) {
|
|
91
|
-
return expr(`ROUND(${valueToSql(value)}, ${decimals})`);
|
|
98
|
+
return expr(`ROUND(${valueToSql(value, columnResolver)}, ${decimals})`);
|
|
92
99
|
}
|
|
93
|
-
return expr(`ROUND(${valueToSql(value)})`);
|
|
100
|
+
return expr(`ROUND(${valueToSql(value, columnResolver)})`);
|
|
94
101
|
},
|
|
95
102
|
concat(...values) {
|
|
96
|
-
return expr(`CONCAT(${values.map(v => valueToSql(v)).join(', ')})`);
|
|
103
|
+
return expr(`CONCAT(${values.map(v => valueToSql(v, columnResolver)).join(', ')})`);
|
|
97
104
|
},
|
|
98
105
|
lower(value) {
|
|
99
|
-
return expr(`LOWER(${valueToSql(value)})`);
|
|
106
|
+
return expr(`LOWER(${valueToSql(value, columnResolver)})`);
|
|
100
107
|
},
|
|
101
108
|
upper(value) {
|
|
102
|
-
return expr(`UPPER(${valueToSql(value)})`);
|
|
109
|
+
return expr(`UPPER(${valueToSql(value, columnResolver)})`);
|
|
103
110
|
},
|
|
104
111
|
trim(value) {
|
|
105
|
-
return expr(`TRIM(${valueToSql(value)})`);
|
|
112
|
+
return expr(`TRIM(${valueToSql(value, columnResolver)})`);
|
|
106
113
|
},
|
|
107
114
|
now() {
|
|
108
115
|
return expr('NOW()');
|
|
@@ -120,9 +127,14 @@ class ConflictBuilder {
|
|
|
120
127
|
_updateData = {};
|
|
121
128
|
_whereClause;
|
|
122
129
|
_tableName;
|
|
130
|
+
_columnResolver;
|
|
123
131
|
constructor(tableName) {
|
|
124
132
|
this._tableName = tableName;
|
|
125
133
|
}
|
|
134
|
+
setColumnResolver(resolver) {
|
|
135
|
+
this._columnResolver = resolver;
|
|
136
|
+
return this;
|
|
137
|
+
}
|
|
126
138
|
doNothing() {
|
|
127
139
|
this._action = 'nothing';
|
|
128
140
|
this._updateData = {};
|
|
@@ -135,7 +147,7 @@ class ConflictBuilder {
|
|
|
135
147
|
for (const [column, value] of Object.entries(values)) {
|
|
136
148
|
if (typeof value === 'function') {
|
|
137
149
|
const fn = value;
|
|
138
|
-
const sqlHelpers = createSqlHelpers(column, this._tableName);
|
|
150
|
+
const sqlHelpers = createSqlHelpers(column, this._tableName, this._columnResolver);
|
|
139
151
|
let result;
|
|
140
152
|
if (fn.length === 1) {
|
|
141
153
|
result = fn(excludedProxy);
|
|
@@ -172,26 +184,29 @@ class ConflictBuilder {
|
|
|
172
184
|
}
|
|
173
185
|
}
|
|
174
186
|
exports.ConflictBuilder = ConflictBuilder;
|
|
175
|
-
function buildConflictUpdateSql(updateData, tableName) {
|
|
187
|
+
function buildConflictUpdateSql(updateData, tableName, columnResolver) {
|
|
188
|
+
const resolve = (col) => columnResolver ? columnResolver(col) : col;
|
|
176
189
|
const setClauses = [];
|
|
177
190
|
for (const [column, value] of Object.entries(updateData)) {
|
|
191
|
+
const resolvedCol = resolve(column);
|
|
178
192
|
if (isColumnRef(value)) {
|
|
179
|
-
|
|
193
|
+
const resolvedRef = resolveColumnRef(value, columnResolver);
|
|
194
|
+
setClauses.push(`${(0, pg_format_1.default)('%I', resolvedCol)} = ${columnRefToSql(resolvedRef)}`);
|
|
180
195
|
}
|
|
181
196
|
else if (isSqlExpression(value)) {
|
|
182
|
-
setClauses.push(`${(0, pg_format_1.default)('%I',
|
|
197
|
+
setClauses.push(`${(0, pg_format_1.default)('%I', resolvedCol)} = ${value.sql}`);
|
|
183
198
|
}
|
|
184
199
|
else if (Array.isArray(value)) {
|
|
185
200
|
if (value.length === 0) {
|
|
186
|
-
setClauses.push(`${(0, pg_format_1.default)('%I',
|
|
201
|
+
setClauses.push(`${(0, pg_format_1.default)('%I', resolvedCol)} = ARRAY[]::jsonb[]`);
|
|
187
202
|
}
|
|
188
203
|
else {
|
|
189
204
|
const jsonValues = value.map(v => (0, pg_format_1.default)('%L', JSON.stringify(v))).join(',');
|
|
190
|
-
setClauses.push(`${(0, pg_format_1.default)('%I',
|
|
205
|
+
setClauses.push(`${(0, pg_format_1.default)('%I', resolvedCol)} = ARRAY[${jsonValues}]::jsonb[]`);
|
|
191
206
|
}
|
|
192
207
|
}
|
|
193
208
|
else {
|
|
194
|
-
setClauses.push((0, pg_format_1.default)('%I = %L',
|
|
209
|
+
setClauses.push((0, pg_format_1.default)('%I = %L', resolvedCol, value));
|
|
195
210
|
}
|
|
196
211
|
}
|
|
197
212
|
return setClauses.join(', ');
|
|
@@ -99,6 +99,9 @@ class InsertBuilder {
|
|
|
99
99
|
_onConflict(columns, callback) {
|
|
100
100
|
this.conflictColumns = columns === null ? [] : Array.isArray(columns) ? columns : [columns];
|
|
101
101
|
this.conflictBuilder = new conflict_builder_1.ConflictBuilder(this.tableName);
|
|
102
|
+
if (this.columnResolver) {
|
|
103
|
+
this.conflictBuilder.setColumnResolver(this.columnResolver);
|
|
104
|
+
}
|
|
102
105
|
if (callback) {
|
|
103
106
|
callback(this.conflictBuilder);
|
|
104
107
|
}
|
|
@@ -218,10 +221,10 @@ class InsertBuilder {
|
|
|
218
221
|
if (!this.conflictBuilder)
|
|
219
222
|
return '';
|
|
220
223
|
let clause = this.conflictColumns && this.conflictColumns.length > 0
|
|
221
|
-
? (0, pg_format_1.default)(' ON CONFLICT (%I)', this.conflictColumns)
|
|
224
|
+
? (0, pg_format_1.default)(' ON CONFLICT (%I)', this.conflictColumns.map(c => this.resolveColumnName(c)))
|
|
222
225
|
: ' ON CONFLICT';
|
|
223
226
|
if (this.conflictBuilder.action === 'update') {
|
|
224
|
-
const updateSql = (0, conflict_builder_1.buildConflictUpdateSql)(this.conflictBuilder.updateData, this.tableName);
|
|
227
|
+
const updateSql = (0, conflict_builder_1.buildConflictUpdateSql)(this.conflictBuilder.updateData, this.tableName, (col) => this.resolveColumnName(col));
|
|
225
228
|
clause += ` DO UPDATE SET ${updateSql}`;
|
|
226
229
|
if (this.conflictBuilder.whereClause) {
|
|
227
230
|
clause += ` WHERE ${this.conflictBuilder.whereClause}`;
|
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
exports.formatValidationReport = exports.getSchemaUnsupportedFeatures = exports.isColumnTypeSupported = exports.validateTableForDialect = exports.validateSchemaForDialect = exports.DIALECT_FEATURES = exports.DSQL_FEATURES = exports.NILE_FEATURES = exports.COCKROACHDB_FEATURES = exports.POSTGRES_FEATURES = exports.getPortableFeatureSet = exports.compareDialectFeatures = exports.getUnsupportedFeatures = exports.isFeatureSupported = exports.getSupportedIndexMethods = exports.isIndexMethodSupported = void 0;
|
|
17
|
+
exports.dropPolicySQL = exports.generatePolicySQL = exports.pgPolicy = exports.isMaterializedViewConfig = exports.isViewConfig = exports.dropMaterializedViewSQL = exports.dropViewSQL = exports.materializedViewToSQL = exports.viewToSQL = exports.pgMaterializedView = exports.pgView = exports.isSequenceConfig = exports.dropSequenceSQL = exports.generateSequenceSQL = exports.pgSequence = exports.isTriggerConfig = exports.dropTriggerSQL = exports.generateTriggerSQL = exports.pgTrigger = exports.isFunctionConfig = exports.dropFunctionSQL = exports.generateFunctionSQL = exports.pgFunction = exports.addEnumValueSQL = exports.dropEnumSQL = exports.generateEnumSQL = exports.pgEnum = exports.matchCodeToString = exports.stringToActionCode = exports.actionCodeToString = exports.generateReferencesSQL = exports.defineSchema = exports.defineRelations = exports.pgRelations = exports.manyToMany = exports.many = exports.one = exports.introspectMultiple = exports.introspectSQL = exports.generateSchemaCode = exports.parseCreateTable = exports.createExpressionBuilder = exports.expressionBuilder = exports.createTableColumnRefs = exports.createGeneratedExprBuilder = exports.createWhereBuilder = exports.getSql = exports.pgExtensions = exports.sqlFunctions = exports.defineTable = void 0;
|
|
18
|
+
exports.formatValidationReport = exports.getSchemaUnsupportedFeatures = exports.isColumnTypeSupported = exports.validateTableForDialect = exports.validateSchemaForDialect = exports.DIALECT_FEATURES = exports.DSQL_FEATURES = exports.NILE_FEATURES = exports.COCKROACHDB_FEATURES = exports.POSTGRES_FEATURES = exports.getPortableFeatureSet = exports.compareDialectFeatures = exports.getUnsupportedFeatures = exports.isFeatureSupported = exports.getSupportedIndexMethods = exports.isIndexMethodSupported = exports.validateColumnTypes = exports.validateColumnType = exports.getDialectFeatures = exports.DEFAULT = exports.generateChildPartitionSQL = exports.generatePartitionBySQL = exports.partitionStrategyFactory = exports.isPolicyConfig = exports.forceRlsSQL = exports.enableRlsSQL = void 0;
|
|
19
19
|
__exportStar(require("./column-types/index.cjs"), exports);
|
|
20
20
|
var table_definition_1 = require("./table-definition/index.cjs");
|
|
21
21
|
Object.defineProperty(exports, "defineTable", { enumerable: true, get: function () { return table_definition_1.defineTable; } });
|
|
@@ -70,6 +70,17 @@ Object.defineProperty(exports, "pgView", { enumerable: true, get: function () {
|
|
|
70
70
|
Object.defineProperty(exports, "pgMaterializedView", { enumerable: true, get: function () { return pg_view_1.pgMaterializedView; } });
|
|
71
71
|
Object.defineProperty(exports, "viewToSQL", { enumerable: true, get: function () { return pg_view_1.viewToSQL; } });
|
|
72
72
|
Object.defineProperty(exports, "materializedViewToSQL", { enumerable: true, get: function () { return pg_view_1.materializedViewToSQL; } });
|
|
73
|
+
Object.defineProperty(exports, "dropViewSQL", { enumerable: true, get: function () { return pg_view_1.dropViewSQL; } });
|
|
74
|
+
Object.defineProperty(exports, "dropMaterializedViewSQL", { enumerable: true, get: function () { return pg_view_1.dropMaterializedViewSQL; } });
|
|
75
|
+
Object.defineProperty(exports, "isViewConfig", { enumerable: true, get: function () { return pg_view_1.isViewConfig; } });
|
|
76
|
+
Object.defineProperty(exports, "isMaterializedViewConfig", { enumerable: true, get: function () { return pg_view_1.isMaterializedViewConfig; } });
|
|
77
|
+
var pg_policy_1 = require("./pg-policy.cjs");
|
|
78
|
+
Object.defineProperty(exports, "pgPolicy", { enumerable: true, get: function () { return pg_policy_1.pgPolicy; } });
|
|
79
|
+
Object.defineProperty(exports, "generatePolicySQL", { enumerable: true, get: function () { return pg_policy_1.generatePolicySQL; } });
|
|
80
|
+
Object.defineProperty(exports, "dropPolicySQL", { enumerable: true, get: function () { return pg_policy_1.dropPolicySQL; } });
|
|
81
|
+
Object.defineProperty(exports, "enableRlsSQL", { enumerable: true, get: function () { return pg_policy_1.enableRlsSQL; } });
|
|
82
|
+
Object.defineProperty(exports, "forceRlsSQL", { enumerable: true, get: function () { return pg_policy_1.forceRlsSQL; } });
|
|
83
|
+
Object.defineProperty(exports, "isPolicyConfig", { enumerable: true, get: function () { return pg_policy_1.isPolicyConfig; } });
|
|
73
84
|
var partitions_1 = require("./partitions.cjs");
|
|
74
85
|
Object.defineProperty(exports, "partitionStrategyFactory", { enumerable: true, get: function () { return partitions_1.partitionStrategyFactory; } });
|
|
75
86
|
Object.defineProperty(exports, "generatePartitionBySQL", { enumerable: true, get: function () { return partitions_1.generatePartitionBySQL; } });
|