pqb 0.42.7 → 0.42.8
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/index.d.ts +162 -4
- package/dist/index.js +187 -46
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +186 -48
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExpressionTypeMethod, Expression, RawSQLBase, emptyObject, isTemplateLiteralArgs, ColumnTypeBase, setColumnData, pushColumnData,
|
|
1
|
+
import { ExpressionTypeMethod, Expression, RawSQLBase, emptyObject, isTemplateLiteralArgs, ColumnTypeBase, setColumnData, pushColumnData, templateLiteralSQLToCode, quoteObjectKey, toArray, emptyArray, singleQuote, addCode, singleQuoteArray, objectHasValues, toSnakeCase, columnDefaultArgumentToCode, columnErrorMessagesToCode, getValueKey, addValue, isExpression, joinTruthy, stringDataToCode, getDefaultLanguage, dateDataToCode, returnArg as returnArg$1, noop, pushOrNewArrayToObject, arrayDataToCode, numberDataToCode, logColors, applyTransforms, callWithThis, setParserToQuery, isRawSQL, pushOrNewArray, setDefaultNowFn, setDefaultLanguage, setCurrentColumnName, makeTimestampsHelpers, setAdapterConnectRetry, isObjectEmpty, ValExpression, applyMixins, snakeCaseKey } from 'orchid-core';
|
|
2
2
|
import pg from 'pg';
|
|
3
3
|
import { inspect } from 'node:util';
|
|
4
4
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
@@ -329,6 +329,58 @@ class ColumnType extends ColumnTypeBase {
|
|
|
329
329
|
name: typeof args[0] === "string" ? args[0] : void 0
|
|
330
330
|
});
|
|
331
331
|
}
|
|
332
|
+
/**
|
|
333
|
+
* Add [EXCLUDE constraint](https://www.postgresql.org/docs/current/sql-createtable.html#SQL-CREATETABLE-EXCLUDE) to the column.
|
|
334
|
+
*
|
|
335
|
+
* ```ts
|
|
336
|
+
* import { change } from '../dbScript';
|
|
337
|
+
*
|
|
338
|
+
* change(async (db) => {
|
|
339
|
+
* await db.createTable('table', (t) => ({
|
|
340
|
+
* // exclude rows with overlapping time ranges, && is for the `WITH` operator
|
|
341
|
+
* timeRange: t.type('tstzrange').exclude('&&'),
|
|
342
|
+
* // with a database-level name:
|
|
343
|
+
* timeRange: t.type('tstzrange').exclude('&&', 'no_overlap'),
|
|
344
|
+
* // with options:
|
|
345
|
+
* timeRange: t.type('tstzrange').exclude('&&', { ...options }),
|
|
346
|
+
* // with name and options:
|
|
347
|
+
* name: t.type('tstzrange').exclude('&&', 'no_overlap', { ...options }),
|
|
348
|
+
* }));
|
|
349
|
+
* });
|
|
350
|
+
* ```
|
|
351
|
+
*
|
|
352
|
+
* Possible options are:
|
|
353
|
+
*
|
|
354
|
+
* ```ts
|
|
355
|
+
* interface ExcludeColumnOptions {
|
|
356
|
+
* // specify collation:
|
|
357
|
+
* collate?: string;
|
|
358
|
+
* // see `opclass` in the Postgres document for creating the index
|
|
359
|
+
* opclass?: string;
|
|
360
|
+
* // specify index order such as ASC NULLS FIRST, DESC NULLS LAST
|
|
361
|
+
* order?: string;
|
|
362
|
+
* // algorithm to use such as GIST, GIN
|
|
363
|
+
* using?: string;
|
|
364
|
+
* // EXCLUDE creates an index under the hood, include columns to the index
|
|
365
|
+
* include?: MaybeArray<string>;
|
|
366
|
+
* // see "storage parameters" in the Postgres document for creating an index, for example, 'fillfactor = 70'
|
|
367
|
+
* with?: string;
|
|
368
|
+
* // The tablespace in which to create the constraint. If not specified, default_tablespace is consulted, or temp_tablespaces for indexes on temporary tables.
|
|
369
|
+
* tablespace?: string;
|
|
370
|
+
* // WHERE clause to filter records for the constraint
|
|
371
|
+
* where?: string;
|
|
372
|
+
* // for dropping the index at a down migration
|
|
373
|
+
* dropMode?: DropMode;
|
|
374
|
+
* }
|
|
375
|
+
* ```
|
|
376
|
+
*/
|
|
377
|
+
exclude(...args) {
|
|
378
|
+
return pushColumnData(this, "excludes", {
|
|
379
|
+
with: args[0],
|
|
380
|
+
options: (typeof args[1] === "string" ? args[2] : args[1]) ?? emptyObject,
|
|
381
|
+
name: typeof args[1] === "string" ? args[1] : void 0
|
|
382
|
+
});
|
|
383
|
+
}
|
|
332
384
|
comment(comment) {
|
|
333
385
|
return setColumnData(this, "comment", comment);
|
|
334
386
|
}
|
|
@@ -369,7 +421,7 @@ class ColumnType extends ColumnTypeBase {
|
|
|
369
421
|
toCode() {
|
|
370
422
|
let sql2 = ".generated";
|
|
371
423
|
if (Array.isArray(args[0])) {
|
|
372
|
-
sql2 +=
|
|
424
|
+
sql2 += templateLiteralSQLToCode(args);
|
|
373
425
|
} else {
|
|
374
426
|
const { raw: raw2, values } = args[0];
|
|
375
427
|
sql2 += `({ raw: '${raw2.replace(/'/g, "\\'")}'${values ? `, values: ${JSON.stringify(values)}` : ""} })`;
|
|
@@ -453,20 +505,12 @@ const columnsShapeToCode = (ctx, shape) => {
|
|
|
453
505
|
return code;
|
|
454
506
|
};
|
|
455
507
|
const pushTableDataCode = (code, ast) => {
|
|
456
|
-
const lines = [
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
lines.push(indexToCode(index, "t"));
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
if (ast.constraints) {
|
|
466
|
-
for (const constraint of ast.constraints) {
|
|
467
|
-
lines.push(constraintToCode(constraint, "t", true));
|
|
468
|
-
}
|
|
469
|
-
}
|
|
508
|
+
const lines = [
|
|
509
|
+
ast.primaryKey && [primaryKeyInnerToCode(ast.primaryKey, "t") + ","],
|
|
510
|
+
...ast.indexes?.map((x) => indexToCode(x, "t")) || emptyArray,
|
|
511
|
+
...ast.excludes?.map((x) => excludeToCode(x, "t")) || emptyArray,
|
|
512
|
+
...ast.constraints?.map((x) => constraintToCode(x, "t", true)) || emptyArray
|
|
513
|
+
].filter((x) => !!x);
|
|
470
514
|
if (lines.length > 1) {
|
|
471
515
|
code.push("(t) => [", ...lines, "],");
|
|
472
516
|
} else if (lines[0].length === 1 && typeof lines[0][0] === "string") {
|
|
@@ -480,18 +524,17 @@ const primaryKeyInnerToCode = (primaryKey, t) => {
|
|
|
480
524
|
const name = primaryKey.name;
|
|
481
525
|
return `${t}.primaryKey([${primaryKey.columns.map(singleQuote).join(", ")}]${name ? `, ${singleQuote(name)}` : ""})`;
|
|
482
526
|
};
|
|
483
|
-
const
|
|
484
|
-
const code =
|
|
527
|
+
const indexOrExcludeToCode = (innerToCode) => (item, t, prefix) => {
|
|
528
|
+
const code = innerToCode(item, t);
|
|
485
529
|
if (prefix) code[0] = prefix + code[0];
|
|
486
530
|
const last = code[code.length - 1];
|
|
487
531
|
if (typeof last === "string" && !last.endsWith(",")) addCode(code, ",");
|
|
488
532
|
return code;
|
|
489
533
|
};
|
|
490
534
|
const indexInnerToCode = (index, t) => {
|
|
491
|
-
const code = [
|
|
492
|
-
code.push(
|
|
535
|
+
const code = [
|
|
493
536
|
`${t}.${index.options.tsVector ? "searchIndex" : index.options.unique ? "unique" : "index"}(`
|
|
494
|
-
|
|
537
|
+
];
|
|
495
538
|
const columnOptions = ["collate", "opclass", "order", "weight"];
|
|
496
539
|
const indexOptionsKeys = [
|
|
497
540
|
index.options.tsVector ? "unique" : void 0,
|
|
@@ -582,6 +625,54 @@ const indexInnerToCode = (index, t) => {
|
|
|
582
625
|
}
|
|
583
626
|
return code;
|
|
584
627
|
};
|
|
628
|
+
const indexToCode = indexOrExcludeToCode(indexInnerToCode);
|
|
629
|
+
const excludeInnerToCode = (item, t) => {
|
|
630
|
+
const code = [`${t}.exclude(`];
|
|
631
|
+
const columnOptions = ["collate", "opclass", "order", "with"];
|
|
632
|
+
const optionsKeys = [
|
|
633
|
+
"using",
|
|
634
|
+
"include",
|
|
635
|
+
"with",
|
|
636
|
+
"tablespace",
|
|
637
|
+
"where",
|
|
638
|
+
"dropMode"
|
|
639
|
+
];
|
|
640
|
+
const hasOptions = optionsKeys.some((key) => key && item.options[key]);
|
|
641
|
+
const objects = [];
|
|
642
|
+
for (const column of item.columns) {
|
|
643
|
+
const expr = "column" in column ? column.column : column.expression;
|
|
644
|
+
const props = [
|
|
645
|
+
`${"column" in column ? "column" : "expression"}: ${singleQuote(expr)},`
|
|
646
|
+
];
|
|
647
|
+
for (const key of columnOptions) {
|
|
648
|
+
const value = column[key];
|
|
649
|
+
if (value !== void 0) {
|
|
650
|
+
props.push(`${key}: ${singleQuote(value)},`);
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
objects.push("{", props, "},");
|
|
654
|
+
}
|
|
655
|
+
code.push(["[", objects, hasOptions || item.name ? "]," : "]"]);
|
|
656
|
+
if (item.name) {
|
|
657
|
+
addCode(code, ` ${singleQuote(item.name)},`);
|
|
658
|
+
}
|
|
659
|
+
if (hasOptions) {
|
|
660
|
+
code.push(["{"]);
|
|
661
|
+
const options = [];
|
|
662
|
+
for (const key of optionsKeys) {
|
|
663
|
+
if (!key) continue;
|
|
664
|
+
const value = item.options[key];
|
|
665
|
+
if (value === null || value === void 0) continue;
|
|
666
|
+
options.push(
|
|
667
|
+
`${key}: ${Array.isArray(value) ? singleQuoteArray(value) : typeof value === "string" ? singleQuote(value) : value},`
|
|
668
|
+
);
|
|
669
|
+
}
|
|
670
|
+
code.push([options, "},"]);
|
|
671
|
+
}
|
|
672
|
+
code.push("),");
|
|
673
|
+
return code;
|
|
674
|
+
};
|
|
675
|
+
const excludeToCode = indexOrExcludeToCode(excludeInnerToCode);
|
|
585
676
|
const constraintToCode = (item, t, m, prefix) => {
|
|
586
677
|
const code = constraintInnerToCode(item, t, m);
|
|
587
678
|
if (prefix) code[0] = prefix + code[0];
|
|
@@ -670,25 +761,22 @@ const foreignKeyArgumentToCode = ({
|
|
|
670
761
|
}
|
|
671
762
|
return code;
|
|
672
763
|
};
|
|
673
|
-
const columnIndexesToCode = (
|
|
764
|
+
const columnIndexesToCode = (items) => {
|
|
674
765
|
const code = [];
|
|
675
|
-
for (const { options, name } of
|
|
766
|
+
for (const { options, name } of items) {
|
|
676
767
|
addCode(code, `.${options.unique ? "unique" : "index"}(`);
|
|
677
|
-
const arr = [
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
)
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
if (options.tablespace)
|
|
690
|
-
arr.push(`tablespace: ${singleQuote(options.tablespace)},`);
|
|
691
|
-
if (options.where) arr.push(`where: ${singleQuote(options.where)},`);
|
|
768
|
+
const arr = [
|
|
769
|
+
options.collate && `collate: ${singleQuote(options.collate)},`,
|
|
770
|
+
options.opclass && `opclass: ${singleQuote(options.opclass)},`,
|
|
771
|
+
options.order && `order: ${singleQuote(options.order)},`,
|
|
772
|
+
name && `name: ${singleQuote(name)},`,
|
|
773
|
+
options.using && `using: ${singleQuote(options.using)},`,
|
|
774
|
+
options.include && `include: ${typeof options.include === "string" ? singleQuote(options.include) : `[${options.include.map(singleQuote).join(", ")}]`},`,
|
|
775
|
+
options.nullsNotDistinct && `nullsNotDistinct: true,`,
|
|
776
|
+
options.with && `with: ${singleQuote(options.with)},`,
|
|
777
|
+
options.tablespace && `tablespace: ${singleQuote(options.tablespace)},`,
|
|
778
|
+
options.where && `where: ${singleQuote(options.where)},`
|
|
779
|
+
].filter((x) => !!x);
|
|
692
780
|
if (arr.length) {
|
|
693
781
|
addCode(code, "{");
|
|
694
782
|
addCode(code, arr);
|
|
@@ -698,6 +786,30 @@ const columnIndexesToCode = (indexes) => {
|
|
|
698
786
|
}
|
|
699
787
|
return code;
|
|
700
788
|
};
|
|
789
|
+
const columnExcludesToCode = (items) => {
|
|
790
|
+
const code = [];
|
|
791
|
+
for (const { options, name, with: w } of items) {
|
|
792
|
+
addCode(code, `.exclude('${w}'`);
|
|
793
|
+
const arr = [
|
|
794
|
+
options.collate && `collate: ${singleQuote(options.collate)},`,
|
|
795
|
+
options.opclass && `opclass: ${singleQuote(options.opclass)},`,
|
|
796
|
+
options.order && `order: ${singleQuote(options.order)},`,
|
|
797
|
+
name && `name: ${singleQuote(name)},`,
|
|
798
|
+
options.using && `using: ${singleQuote(options.using)},`,
|
|
799
|
+
options.include && `include: ${typeof options.include === "string" ? singleQuote(options.include) : `[${options.include.map(singleQuote).join(", ")}]`},`,
|
|
800
|
+
options.with && `with: ${singleQuote(options.with)},`,
|
|
801
|
+
options.tablespace && `tablespace: ${singleQuote(options.tablespace)},`,
|
|
802
|
+
options.where && `where: ${singleQuote(options.where)},`
|
|
803
|
+
].filter((x) => !!x);
|
|
804
|
+
if (arr.length) {
|
|
805
|
+
addCode(code, ", {");
|
|
806
|
+
addCode(code, arr);
|
|
807
|
+
addCode(code, "}");
|
|
808
|
+
}
|
|
809
|
+
addCode(code, ")");
|
|
810
|
+
}
|
|
811
|
+
return code;
|
|
812
|
+
};
|
|
701
813
|
const columnCheckToCode = (ctx, { sql, name }, columnName) => {
|
|
702
814
|
return `.check(${sql.toCode(ctx.t)}${name && name !== `${ctx.table}_${columnName}_check` ? `, { name: '${name}' }` : ""})`;
|
|
703
815
|
};
|
|
@@ -777,6 +889,11 @@ const columnCode = (type, ctx, key, code) => {
|
|
|
777
889
|
addCode(code, part);
|
|
778
890
|
}
|
|
779
891
|
}
|
|
892
|
+
if (data.excludes) {
|
|
893
|
+
for (const part of columnExcludesToCode(data.excludes)) {
|
|
894
|
+
addCode(code, part);
|
|
895
|
+
}
|
|
896
|
+
}
|
|
780
897
|
if (data.comment) addCode(code, `.comment(${singleQuote(data.comment)})`);
|
|
781
898
|
if (data.check) {
|
|
782
899
|
addCode(code, columnCheckToCode(ctx, data.check, name));
|
|
@@ -12028,6 +12145,19 @@ const tableDataMethods = {
|
|
|
12028
12145
|
input.index.options.tsVector = true;
|
|
12029
12146
|
return input;
|
|
12030
12147
|
},
|
|
12148
|
+
exclude(columns, ...[first, second]) {
|
|
12149
|
+
if (typeof first === "string") {
|
|
12150
|
+
const options = second ?? {};
|
|
12151
|
+
return {
|
|
12152
|
+
exclude: { columns, options, name: first }
|
|
12153
|
+
};
|
|
12154
|
+
} else {
|
|
12155
|
+
const options = first ?? {};
|
|
12156
|
+
return {
|
|
12157
|
+
exclude: { columns, options }
|
|
12158
|
+
};
|
|
12159
|
+
}
|
|
12160
|
+
},
|
|
12031
12161
|
foreignKey(columns, fnOrTable, foreignColumns, options) {
|
|
12032
12162
|
return {
|
|
12033
12163
|
constraint: {
|
|
@@ -12059,15 +12189,13 @@ const parseTableDataInput = (tableData, item) => {
|
|
|
12059
12189
|
if (item.primaryKey) {
|
|
12060
12190
|
tableData.primaryKey = item.primaryKey;
|
|
12061
12191
|
} else if (item.index) {
|
|
12062
|
-
|
|
12063
|
-
|
|
12064
|
-
|
|
12065
|
-
|
|
12066
|
-
|
|
12067
|
-
|
|
12068
|
-
|
|
12069
|
-
}
|
|
12070
|
-
(tableData.indexes ?? (tableData.indexes = [])).push(item.index);
|
|
12192
|
+
(tableData.indexes ?? (tableData.indexes = [])).push(
|
|
12193
|
+
parseIndexOrExclude(item.index)
|
|
12194
|
+
);
|
|
12195
|
+
} else if (item.exclude) {
|
|
12196
|
+
(tableData.excludes ?? (tableData.excludes = [])).push(
|
|
12197
|
+
parseIndexOrExclude(item.exclude)
|
|
12198
|
+
);
|
|
12071
12199
|
} else if (item.constraint) {
|
|
12072
12200
|
(tableData.constraints ?? (tableData.constraints = [])).push(item.constraint);
|
|
12073
12201
|
if (item.constraint.references?.options?.dropMode) {
|
|
@@ -12075,6 +12203,16 @@ const parseTableDataInput = (tableData, item) => {
|
|
|
12075
12203
|
}
|
|
12076
12204
|
}
|
|
12077
12205
|
};
|
|
12206
|
+
const parseIndexOrExclude = (item) => {
|
|
12207
|
+
for (let i = item.columns.length - 1; i >= 0; i--) {
|
|
12208
|
+
if (typeof item.columns[i] === "string") {
|
|
12209
|
+
item.columns[i] = {
|
|
12210
|
+
column: item.columns[i]
|
|
12211
|
+
};
|
|
12212
|
+
}
|
|
12213
|
+
}
|
|
12214
|
+
return item;
|
|
12215
|
+
};
|
|
12078
12216
|
|
|
12079
12217
|
const anyShape = {};
|
|
12080
12218
|
class Db extends QueryMethods {
|
|
@@ -12540,5 +12678,5 @@ function copyTableData(query, arg) {
|
|
|
12540
12678
|
return q;
|
|
12541
12679
|
}
|
|
12542
12680
|
|
|
12543
|
-
export { Adapter, AfterCommitError, AggregateMethods, ArrayColumn, AsMethods, BigIntColumn, BigSerialColumn, BitColumn, BitVaryingColumn, BooleanColumn, BoxColumn, ByteaColumn, CidrColumn, CircleColumn, CitextColumn, Clear, ColumnRefExpression, ColumnType, ComputedColumn, Create, CustomTypeColumn, DateBaseColumn, DateColumn, DateTimeBaseClass, DateTimeTzBaseClass, Db, DecimalColumn, Delete, DomainColumn, DoublePrecisionColumn, DynamicRawSQL, EnumColumn, ExpressionMethods, FnExpression, For, FromMethods, Having, InetColumn, IntegerBaseColumn, IntegerColumn, IntervalColumn, JSONColumn, JSONTextColumn, Join, JsonMethods, LimitedTextBaseColumn, LineColumn, LsegColumn, MacAddr8Column, MacAddrColumn, MergeQueryMethods, MoneyColumn, MoreThanOneRowError, NotFoundError, NumberAsStringBaseColumn, NumberBaseColumn, OnConflictQueryBuilder, OnMethods, Operators, OrExpression, OrchidOrmError, OrchidOrmInternalError, PathColumn, PointColumn, PolygonColumn, PostgisGeographyPointColumn, QueryError, QueryGet, QueryHooks, QueryLog, QueryMethods, QueryUpsertOrCreate, RawSQL, RealColumn, RefExpression, SearchMethods, Select, SerialColumn, SmallIntColumn, SmallSerialColumn, SqlMethod, StringColumn, TextBaseColumn, TextColumn, Then, TimeColumn, TimestampColumn, TimestampTZColumn, Transaction, TransactionAdapter, TransformMethods, TsQueryColumn, TsVectorColumn, UUIDColumn, UnhandledTypeError, Union, UnknownColumn, Update, VarCharColumn, VirtualColumn, Where, WithMethods, XMLColumn, _afterCommitError, _clone, _getSelectableColumn, _initQueryBuilder, _queryAfterSaveCommit, _queryAll, _queryAs, _queryChangeCounter, _queryCreate, _queryCreateFrom, _queryCreateMany, _queryCreateManyFrom, _queryCreateManyRaw, _queryCreateRaw, _queryDefaults, _queryDelete, _queryExec, _queryFindBy, _queryFindByOptional, _queryGet, _queryGetOptional, _queryHookAfterCreate, _queryHookAfterCreateCommit, _queryHookAfterDelete, _queryHookAfterDeleteCommit, _queryHookAfterQuery, _queryHookAfterSave, _queryHookAfterUpdate, _queryHookAfterUpdateCommit, _queryHookBeforeCreate, _queryHookBeforeDelete, _queryHookBeforeQuery, _queryHookBeforeSave, _queryHookBeforeUpdate, _queryInsert, _queryInsertFrom, _queryInsertMany, _queryInsertManyFrom, _queryInsertManyRaw, _queryInsertRaw, _queryJoinOn, _queryJoinOnJsonPathEquals, _queryJoinOrOn, _queryOr, _queryOrNot, _queryResolveAlias, _queryRows, _querySelect, _queryTake, _queryTakeOptional, _queryUnion, _queryUpdate, _queryUpdateOrThrow, _queryUpdateRaw, _queryWhere, _queryWhereExists, _queryWhereIn, _queryWhereNot, _queryWhereNotOneOf, _queryWhereNotSql, _queryWhereOneOf, _queryWhereSql, addColumnParserToQuery, addParserForRawExpression, addParserForSelectItem, addQueryOn, anyShape, applyComputedColumns, checkIfASimpleQuery, cloneQuery, cloneQueryBaseUnscoped, columnCheckToCode, columnCode, columnForeignKeysToCode, columnIndexesToCode, columnsShapeToCode, commitSql$1 as commitSql, constraintInnerToCode, constraintToCode, copyTableData, countSelect, createDb, defaultSchemaConfig, escapeForLog, escapeForMigration, escapeString, extendQuery, filterResult, foreignKeyArgumentToCode, getClonedQueryData, getColumnInfo, getColumnTypes, getFullColumnTable, getPrimaryKeys, getQueryAs, getShapeFromSelect, getSqlText, handleResult, identityToCode, indexInnerToCode, indexToCode, instantiateColumn, isDefaultTimeStamp, isQueryReturnsAll, isSelectingCount, joinSubQuery, logParamToLogObject, makeColumnTypes, makeColumnsByType, makeFnExpression, makeRegexToFindInSql, makeSQL, parseRecord, parseTableData, parseTableDataInput, postgisTypmodToSql, primaryKeyInnerToCode, processComputedBatches, processComputedResult, processSelectArg, pushLimitSQL, pushQueryArray, pushQueryOn, pushQueryOnForOuter, pushQueryOrOn, pushQueryValue, pushTableDataCode, queryFrom, queryFromSql, queryJson, queryMethodByReturnType, queryTypeWithLimitOne, queryWrap, raw, referencesArgsToCode, resolveSubQueryCallback, rollbackSql$1 as rollbackSql, saveSearchAlias, setColumnDefaultParse, setColumnEncode, setColumnParse, setColumnParseNull, setParserForSelectedString, setQueryObjectValue, setQueryOperators, simplifyColumnDefault, sqlFn, sqlQueryArgsToExpression, tableDataMethods, templateLiteralToSQL, testTransaction, throwIfJoinLateral, throwIfNoWhere, toSQL, toSQLCacheKey };
|
|
12681
|
+
export { Adapter, AfterCommitError, AggregateMethods, ArrayColumn, AsMethods, BigIntColumn, BigSerialColumn, BitColumn, BitVaryingColumn, BooleanColumn, BoxColumn, ByteaColumn, CidrColumn, CircleColumn, CitextColumn, Clear, ColumnRefExpression, ColumnType, ComputedColumn, Create, CustomTypeColumn, DateBaseColumn, DateColumn, DateTimeBaseClass, DateTimeTzBaseClass, Db, DecimalColumn, Delete, DomainColumn, DoublePrecisionColumn, DynamicRawSQL, EnumColumn, ExpressionMethods, FnExpression, For, FromMethods, Having, InetColumn, IntegerBaseColumn, IntegerColumn, IntervalColumn, JSONColumn, JSONTextColumn, Join, JsonMethods, LimitedTextBaseColumn, LineColumn, LsegColumn, MacAddr8Column, MacAddrColumn, MergeQueryMethods, MoneyColumn, MoreThanOneRowError, NotFoundError, NumberAsStringBaseColumn, NumberBaseColumn, OnConflictQueryBuilder, OnMethods, Operators, OrExpression, OrchidOrmError, OrchidOrmInternalError, PathColumn, PointColumn, PolygonColumn, PostgisGeographyPointColumn, QueryError, QueryGet, QueryHooks, QueryLog, QueryMethods, QueryUpsertOrCreate, RawSQL, RealColumn, RefExpression, SearchMethods, Select, SerialColumn, SmallIntColumn, SmallSerialColumn, SqlMethod, StringColumn, TextBaseColumn, TextColumn, Then, TimeColumn, TimestampColumn, TimestampTZColumn, Transaction, TransactionAdapter, TransformMethods, TsQueryColumn, TsVectorColumn, UUIDColumn, UnhandledTypeError, Union, UnknownColumn, Update, VarCharColumn, VirtualColumn, Where, WithMethods, XMLColumn, _afterCommitError, _clone, _getSelectableColumn, _initQueryBuilder, _queryAfterSaveCommit, _queryAll, _queryAs, _queryChangeCounter, _queryCreate, _queryCreateFrom, _queryCreateMany, _queryCreateManyFrom, _queryCreateManyRaw, _queryCreateRaw, _queryDefaults, _queryDelete, _queryExec, _queryFindBy, _queryFindByOptional, _queryGet, _queryGetOptional, _queryHookAfterCreate, _queryHookAfterCreateCommit, _queryHookAfterDelete, _queryHookAfterDeleteCommit, _queryHookAfterQuery, _queryHookAfterSave, _queryHookAfterUpdate, _queryHookAfterUpdateCommit, _queryHookBeforeCreate, _queryHookBeforeDelete, _queryHookBeforeQuery, _queryHookBeforeSave, _queryHookBeforeUpdate, _queryInsert, _queryInsertFrom, _queryInsertMany, _queryInsertManyFrom, _queryInsertManyRaw, _queryInsertRaw, _queryJoinOn, _queryJoinOnJsonPathEquals, _queryJoinOrOn, _queryOr, _queryOrNot, _queryResolveAlias, _queryRows, _querySelect, _queryTake, _queryTakeOptional, _queryUnion, _queryUpdate, _queryUpdateOrThrow, _queryUpdateRaw, _queryWhere, _queryWhereExists, _queryWhereIn, _queryWhereNot, _queryWhereNotOneOf, _queryWhereNotSql, _queryWhereOneOf, _queryWhereSql, addColumnParserToQuery, addParserForRawExpression, addParserForSelectItem, addQueryOn, anyShape, applyComputedColumns, checkIfASimpleQuery, cloneQuery, cloneQueryBaseUnscoped, columnCheckToCode, columnCode, columnExcludesToCode, columnForeignKeysToCode, columnIndexesToCode, columnsShapeToCode, commitSql$1 as commitSql, constraintInnerToCode, constraintToCode, copyTableData, countSelect, createDb, defaultSchemaConfig, escapeForLog, escapeForMigration, escapeString, excludeInnerToCode, excludeToCode, extendQuery, filterResult, foreignKeyArgumentToCode, getClonedQueryData, getColumnInfo, getColumnTypes, getFullColumnTable, getPrimaryKeys, getQueryAs, getShapeFromSelect, getSqlText, handleResult, identityToCode, indexInnerToCode, indexToCode, instantiateColumn, isDefaultTimeStamp, isQueryReturnsAll, isSelectingCount, joinSubQuery, logParamToLogObject, makeColumnTypes, makeColumnsByType, makeFnExpression, makeRegexToFindInSql, makeSQL, parseRecord, parseTableData, parseTableDataInput, postgisTypmodToSql, primaryKeyInnerToCode, processComputedBatches, processComputedResult, processSelectArg, pushLimitSQL, pushQueryArray, pushQueryOn, pushQueryOnForOuter, pushQueryOrOn, pushQueryValue, pushTableDataCode, queryFrom, queryFromSql, queryJson, queryMethodByReturnType, queryTypeWithLimitOne, queryWrap, raw, referencesArgsToCode, resolveSubQueryCallback, rollbackSql$1 as rollbackSql, saveSearchAlias, setColumnDefaultParse, setColumnEncode, setColumnParse, setColumnParseNull, setParserForSelectedString, setQueryObjectValue, setQueryOperators, simplifyColumnDefault, sqlFn, sqlQueryArgsToExpression, tableDataMethods, templateLiteralToSQL, testTransaction, throwIfJoinLateral, throwIfNoWhere, toSQL, toSQLCacheKey };
|
|
12544
12682
|
//# sourceMappingURL=index.mjs.map
|