pqb 0.36.16 → 0.38.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/dist/index.mjs CHANGED
@@ -933,6 +933,22 @@ const quoteValue$1 = (arg, ctx, quotedAs, jsonArray) => {
933
933
  }
934
934
  return addValue(ctx.values, arg);
935
935
  };
936
+ const quoteLikeValue = (arg, ctx, quotedAs, jsonArray) => {
937
+ if (arg && typeof arg === "object") {
938
+ if (!jsonArray && Array.isArray(arg)) {
939
+ return `(${arg.map((value) => addValue(ctx.values, value)).join(", ")})`;
940
+ }
941
+ if (isExpression(arg)) {
942
+ return arg.toSQL(ctx, quotedAs);
943
+ }
944
+ if ("toSQL" in arg) {
945
+ return `replace(replace((${getSqlText(
946
+ arg.toSQL({ values: ctx.values })
947
+ )}), '%', '\\\\%'), '_', '\\\\_')`;
948
+ }
949
+ }
950
+ return addValue(ctx.values, arg.replace(/[%_]/g, "\\$&"));
951
+ };
936
952
  const base = {
937
953
  equals: make(
938
954
  (key, value, ctx, quotedAs) => value === null ? `${key} IS NULL` : `${key} = ${quoteValue$1(value, ctx, quotedAs)}`
@@ -978,22 +994,22 @@ const numeric = __spreadProps$9(__spreadValues$j({}, base), {
978
994
  });
979
995
  const text = __spreadProps$9(__spreadValues$j({}, base), {
980
996
  contains: make(
981
- (key, value, ctx, quotedAs) => `${key} ILIKE '%' || ${quoteValue$1(value, ctx, quotedAs)} || '%'`
997
+ (key, value, ctx, quotedAs) => `${key} ILIKE '%' || ${quoteLikeValue(value, ctx, quotedAs)} || '%'`
982
998
  ),
983
999
  containsSensitive: make(
984
- (key, value, ctx, quotedAs) => `${key} LIKE '%' || ${quoteValue$1(value, ctx, quotedAs)} || '%'`
1000
+ (key, value, ctx, quotedAs) => `${key} LIKE '%' || ${quoteLikeValue(value, ctx, quotedAs)} || '%'`
985
1001
  ),
986
1002
  startsWith: make(
987
- (key, value, ctx, quotedAs) => `${key} ILIKE ${quoteValue$1(value, ctx, quotedAs)} || '%'`
1003
+ (key, value, ctx, quotedAs) => `${key} ILIKE ${quoteLikeValue(value, ctx, quotedAs)} || '%'`
988
1004
  ),
989
1005
  startsWithSensitive: make(
990
- (key, value, ctx, quotedAs) => `${key} LIKE ${quoteValue$1(value, ctx, quotedAs)} || '%'`
1006
+ (key, value, ctx, quotedAs) => `${key} LIKE ${quoteLikeValue(value, ctx, quotedAs)} || '%'`
991
1007
  ),
992
1008
  endsWith: make(
993
- (key, value, ctx, quotedAs) => `${key} ILIKE '%' || ${quoteValue$1(value, ctx, quotedAs)}`
1009
+ (key, value, ctx, quotedAs) => `${key} ILIKE '%' || ${quoteLikeValue(value, ctx, quotedAs)}`
994
1010
  ),
995
1011
  endsWithSensitive: make(
996
- (key, value, ctx, quotedAs) => `${key} LIKE '%' || ${quoteValue$1(value, ctx, quotedAs)}`
1012
+ (key, value, ctx, quotedAs) => `${key} LIKE '%' || ${quoteLikeValue(value, ctx, quotedAs)}`
997
1013
  )
998
1014
  });
999
1015
  const encodeJsonPath = (ctx, path) => addValue(ctx.values, `{${Array.isArray(path) ? path.join(", ") : path}}`);
@@ -1007,9 +1023,10 @@ const json = __spreadProps$9(__spreadValues$j({}, base), {
1007
1023
  this.q.parsers[getValueKey] = void 0;
1008
1024
  }
1009
1025
  if (options == null ? void 0 : options.type) {
1010
- const parse = options.type(this.columnTypes).parseFn;
1011
- if (parse)
1012
- ((_e = (_d = this.q).parsers) != null ? _e : _d.parsers = {})[getValueKey] = parse;
1026
+ const type = options.type(this.columnTypes);
1027
+ if (type.parseFn)
1028
+ ((_e = (_d = this.q).parsers) != null ? _e : _d.parsers = {})[getValueKey] = type.parseFn;
1029
+ return setQueryOperators(this, type.operators);
1013
1030
  }
1014
1031
  return this;
1015
1032
  },
@@ -2204,37 +2221,16 @@ const processWhere = (ands, ctx, table, query, data, quotedAs) => {
2204
2221
  );
2205
2222
  } else {
2206
2223
  const item = value;
2207
- const leftColumn = columnToSql(
2208
- ctx,
2209
- query,
2210
- query.shape,
2211
- item.on[0],
2212
- `"${getJoinItemSource(item.joinFrom)}"`
2224
+ const joinAs = `"${getJoinItemSource(item.joinFrom)}"`;
2225
+ const { on } = item;
2226
+ const q = item.useOuterJoinOverrides ? {
2227
+ joinedShapes: query.joinedShapes,
2228
+ joinOverrides: query.outerJoinOverrides,
2229
+ shape: query.shape
2230
+ } : query;
2231
+ ands.push(
2232
+ `${onColumnToSql(ctx, q, joinAs, on[0])} ${on.length === 2 ? "=" : on[1]} ${onColumnToSql(ctx, q, joinAs, on.length === 3 ? on[2] : on[1])}`
2213
2233
  );
2214
- const joinTo = getJoinItemSource(item.joinTo);
2215
- const joinedShape = query.joinedShapes[joinTo];
2216
- let op;
2217
- let rightColumn;
2218
- if (item.on.length === 2) {
2219
- op = "=";
2220
- rightColumn = columnToSql(
2221
- ctx,
2222
- query,
2223
- joinedShape,
2224
- item.on[1],
2225
- `"${joinTo}"`
2226
- );
2227
- } else {
2228
- op = item.on[1];
2229
- rightColumn = columnToSql(
2230
- ctx,
2231
- query,
2232
- joinedShape,
2233
- item.on[2],
2234
- `"${joinTo}"`
2235
- );
2236
- }
2237
- ands.push(`${leftColumn} ${op} ${rightColumn}`);
2238
2234
  }
2239
2235
  } else if (key === "IN") {
2240
2236
  toArray(value).forEach((item) => {
@@ -2330,6 +2326,7 @@ const processWhere = (ands, ctx, table, query, data, quotedAs) => {
2330
2326
  }
2331
2327
  }
2332
2328
  };
2329
+ const onColumnToSql = (ctx, query, joinAs, column) => columnToSql(ctx, query, query.shape, column, joinAs);
2333
2330
  const getJoinItemSource = (joinItem) => {
2334
2331
  return typeof joinItem === "string" ? joinItem : getQueryAs(joinItem);
2335
2332
  };
@@ -5968,12 +5965,14 @@ const makeRegexToFindInSql = (value) => {
5968
5965
  return new RegExp(`${value}(?=(?:[^']*'[^']*')*[^']*$)`, "g");
5969
5966
  };
5970
5967
  const resolveSubQueryCallback = (q, cb) => {
5971
- const { subQuery, relChain } = q.q;
5968
+ const { subQuery, relChain, outerJoinOverrides } = q.q;
5972
5969
  q.q.subQuery = 1;
5973
5970
  q.q.relChain = void 0;
5971
+ q.q.outerJoinOverrides = q.q.joinOverrides;
5974
5972
  const result = cb(q);
5975
5973
  q.q.subQuery = subQuery;
5976
5974
  q.q.relChain = relChain;
5975
+ q.q.outerJoinOverrides = outerJoinOverrides;
5977
5976
  return result;
5978
5977
  };
5979
5978
  const joinSubQuery = (q, sub) => {
@@ -8403,7 +8402,7 @@ class Join {
8403
8402
  *
8404
8403
  * All the `join` methods accept the same arguments, but returning type is different because with `join` it's guaranteed to load joined table, and with `leftJoin` the joined table columns may be `NULL` when no matching record was found.
8405
8404
  *
8406
- * For the following examples, imagine we have a `User` table with `id` and `name`, and `Message` table with `id`, `text`, messages belongs to user via `userId` column:
8405
+ * For the following examples, imagine you have a `User` table with `id` and `name`, and `Message` table with `id`, `text`, messages belongs to user via `userId` column:
8407
8406
  *
8408
8407
  * ```ts
8409
8408
  * export class UserTable extends BaseTable {
@@ -8481,7 +8480,7 @@ class Join {
8481
8480
  * ```ts
8482
8481
  * const result = await db.user
8483
8482
  * .join('messages')
8484
- * // after joining a table, we can use it in `where` conditions:
8483
+ * // after joining a table, you can use it in `where` conditions:
8485
8484
  * .where({ 'messages.text': { startsWith: 'Hi' } })
8486
8485
  * .select(
8487
8486
  * 'name', // name is User column, table name may be omitted
@@ -8492,8 +8491,8 @@ class Join {
8492
8491
  * const ok: { name: string; text: string }[] = result;
8493
8492
  * ```
8494
8493
  *
8495
- * The first argument can also be a callback, where instead of relation name as a string we're picking it as a property of `q`.
8496
- * In such a way, we can alias the relation with `as`, add `where` conditions, use other query methods.
8494
+ * The first argument can also be a callback, where instead of relation name as a string you're picking it as a property of `q`.
8495
+ * In such a way, you can alias the relation with `as`, add `where` conditions, use other query methods.
8497
8496
  *
8498
8497
  * ```ts
8499
8498
  * const result = await db.user.join((q) =>
@@ -8510,7 +8509,7 @@ class Join {
8510
8509
  * (q) => q.messages.as('m'),
8511
8510
  * (q) =>
8512
8511
  * q
8513
- * .on('text', 'name') // additionally, match message with user name
8512
+ * .on('messages.text', 'user.name') // additionally, match message with user name
8514
8513
  * .where({ text: 'some text' }), // you can add `where` in a second callback as well.
8515
8514
  * );
8516
8515
  * ```
@@ -8564,17 +8563,16 @@ class Join {
8564
8563
  * Joined table can be references from `where` and `select` by a table name.
8565
8564
  *
8566
8565
  * ```ts
8567
- * // Join message where userId = id:
8568
8566
  * db.user
8569
- * .join(db.message, 'userId', 'id')
8567
+ * .join(db.message, 'userId', 'user.id')
8570
8568
  * .where({ 'message.text': { startsWith: 'Hi' } })
8571
8569
  * .select('name', 'message.text');
8572
8570
  * ```
8573
8571
  *
8574
- * Columns in the join list may be prefixed with table names for clarity:
8572
+ * The name of the joining table can be omitted, but not the name of the main table:
8575
8573
  *
8576
8574
  * ```ts
8577
- * db.user.join(db.message, 'message.userId', 'user.id');
8575
+ * db.user.join(db.message, 'userId', 'user.id');
8578
8576
  * ```
8579
8577
  *
8580
8578
  * Joined table can have an alias for referencing it further:
@@ -8605,7 +8603,7 @@ class Join {
8605
8603
  * You can provide a custom comparison operator
8606
8604
  *
8607
8605
  * ```ts
8608
- * db.user.join(db.message, 'userId', '!=', 'id');
8606
+ * db.user.join(db.message, 'userId', '!=', 'user.id');
8609
8607
  * ```
8610
8608
  *
8611
8609
  * Join can accept raw SQL for the `ON` part of join:
@@ -8640,11 +8638,11 @@ class Join {
8640
8638
  *
8641
8639
  * ```ts
8642
8640
  * db.user.join(db.message, {
8643
- * userId: 'id',
8644
- *
8645
- * // with table names:
8646
8641
  * 'message.userId': 'user.id',
8647
8642
  *
8643
+ * // joined table name may be omitted
8644
+ * userId: 'user.id',
8645
+ *
8648
8646
  * // value can be a raw SQL expression:
8649
8647
  * text: sql`lower("user"."name")`,
8650
8648
  * });
@@ -8663,17 +8661,16 @@ class Join {
8663
8661
  * db.message,
8664
8662
  * (q) =>
8665
8663
  * q
8666
- * // left column is the db.message column, right column is the db.user column
8667
- * .on('userId', 'id')
8668
- * // table names can be provided:
8669
8664
  * .on('message.userId', 'user.id')
8665
+ * // joined table name may be omitted
8666
+ * .on('userId', 'user.id')
8670
8667
  * // operator can be specified:
8671
- * .on('userId', '!=', 'id')
8668
+ * .on('userId', '!=', 'user.id')
8672
8669
  * // operator can be specified with table names as well:
8673
8670
  * .on('message.userId', '!=', 'user.id')
8674
8671
  * // `.orOn` takes the same arguments as `.on` and acts like `.or`:
8675
- * .on('userId', 'id') // where message.userId = user.id
8676
- * .orOn('text', 'name'), // or message.text = user.name
8672
+ * .on('userId', 'user.id') // where message.userId = user.id
8673
+ * .orOn('text', 'user.name'), // or message.text = user.name
8677
8674
  * );
8678
8675
  * ```
8679
8676
  *
@@ -8682,7 +8679,7 @@ class Join {
8682
8679
  * ```ts
8683
8680
  * db.user.join(db.message, (q) =>
8684
8681
  * q
8685
- * .on('userId', 'id')
8682
+ * .on('userId', 'user.id')
8686
8683
  * .where({
8687
8684
  * // not prefixed column name is for joined table:
8688
8685
  * text: { startsWith: 'hello' },
@@ -8717,7 +8714,7 @@ class Join {
8717
8714
  * .where({ text: { startsWith: 'Hi' } })
8718
8715
  * .as('t'),
8719
8716
  * 'userId',
8720
- * 'id',
8717
+ * 'user.id',
8721
8718
  * );
8722
8719
  * ```
8723
8720
  *
@@ -8784,7 +8781,7 @@ class Join {
8784
8781
  *
8785
8782
  * // the same query, but joining table explicitly
8786
8783
  * const result2: typeof result = await db.user
8787
- * .leftJoin(db.message, 'userId', 'id')
8784
+ * .leftJoin(db.message, 'userId', 'user.id')
8788
8785
  * .select('name', 'message.text');
8789
8786
  *
8790
8787
  * // result has the following type:
@@ -8886,7 +8883,7 @@ class Join {
8886
8883
  * // select message columns
8887
8884
  * .select('text')
8888
8885
  * // join the message to the user, column names can be prefixed with table names
8889
- * .on('authorId', 'id')
8886
+ * .on('authorId', 'user.id')
8890
8887
  * // message columns are available without prefixing,
8891
8888
  * // outer table columns are available with a table name
8892
8889
  * .where({ text: 'some text', 'user.name': 'name' })
@@ -8968,14 +8965,22 @@ class Join {
8968
8965
  );
8969
8966
  }
8970
8967
  }
8971
- const makeOnItem = (joinTo, joinFrom, args) => {
8972
- return {
8968
+ const makeOnItem = (joinTo, joinFrom, args) => ({
8969
+ ON: {
8970
+ joinTo,
8971
+ joinFrom,
8972
+ on: args
8973
+ }
8974
+ });
8975
+ const pushQueryOnForOuter = (q, joinFrom, joinTo, ...on) => {
8976
+ return pushQueryValue(q, "and", {
8973
8977
  ON: {
8974
- joinTo,
8975
- joinFrom,
8976
- on: args
8978
+ joinTo: joinFrom,
8979
+ joinFrom: joinTo,
8980
+ useOuterJoinOverrides: true,
8981
+ on
8977
8982
  }
8978
- };
8983
+ });
8979
8984
  };
8980
8985
  const pushQueryOn = (q, joinFrom, joinTo, ...on) => {
8981
8986
  return pushQueryValue(
@@ -9026,16 +9031,13 @@ class OnMethods {
9026
9031
  *
9027
9032
  * ```ts
9028
9033
  * q
9029
- * // left column is the db.message column, right column is the db.user column
9030
- * .on('userId', 'id')
9031
- * // table names can be provided:
9032
9034
  * .on('message.userId', 'user.id')
9035
+ * // joined table name may be omitted
9036
+ * .on('userId', 'user.id')
9033
9037
  * // operator can be specified:
9034
- * .on('userId', '!=', 'id')
9038
+ * .on('userId', '!=', 'user.id')
9035
9039
  * // operator can be specified with table names as well:
9036
9040
  * .on('message.userId', '!=', 'user.id')
9037
- * // `.orOn` takes the same arguments as `.on` and acts like `.or`:
9038
- * .on('userId', 'id') // where message.userId = user.id
9039
9041
  * ```
9040
9042
  *
9041
9043
  * @param args - columns to join with
@@ -9380,6 +9382,7 @@ const resolveCallbacksInArgs = (q, args) => {
9380
9382
  qb.q = getClonedQueryData(q.q);
9381
9383
  qb.q.and = qb.q.or = qb.q.scopes = void 0;
9382
9384
  qb.q.subQuery = 1;
9385
+ qb.q.outerJoinOverrides = qb.q.joinOverrides;
9383
9386
  args[i] = resolveSubQueryCallback(qb, arg);
9384
9387
  }
9385
9388
  }
@@ -12769,5 +12772,5 @@ function copyTableData(query, arg) {
12769
12772
  return q;
12770
12773
  }
12771
12774
 
12772
- export { Adapter, 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, QueryBase, 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, _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, _queryRows, _querySelect, _queryTake, _queryTakeOptional, _queryUnion, _queryUpdate, _queryUpdateOrThrow, _queryUpdateRaw, _queryWhere, _queryWhereExists, _queryWhereIn, _queryWhereNot, _queryWhereNotOneOf, _queryWhereNotSql, _queryWhereOneOf, _queryWhereSql, addParserForRawExpression, addParserForSelectItem, addQueryOn, anyShape, applyComputedColumns, checkIfASimpleQuery, cloneQuery, cloneQueryBaseUnscoped, columnCheckToCode, columnCode, columnForeignKeysToCode, columnIndexesToCode, columnsShapeToCode, commitSql$1 as commitSql, constraintInnerToCode, constraintToCode, copyTableData, countSelect, createDb, defaultSchemaConfig, extendQuery, filterResult, foreignKeyArgumentToCode, getClonedQueryData, getColumnInfo, getColumnTypes, getPrimaryKeys, getQueryAs, getShapeFromSelect, getSqlText, handleResult, identityToCode, indexInnerToCode, indexToCode, instantiateColumn, isDefaultTimeStamp, isQueryReturnsAll, isSelectingCount, joinSubQuery, logParamToLogObject, makeColumnTypes, makeColumnsByType, makeFnExpression, makeRegexToFindInSql, makeSQL, parseRecord, parseTableData, parseTableDataInput, primaryKeyInnerToCode, processComputedBatches, processComputedResult, processSelectArg, pushLimitSQL, pushQueryArray, pushQueryOn, pushQueryOrOn, pushQueryValue, pushTableDataCode, queryFrom, queryFromSql, queryJson, queryMethodByReturnType, queryTypeWithLimitOne, queryWrap, quote, quoteString, raw, referencesArgsToCode, resolveSubQueryCallback, rollbackSql$1 as rollbackSql, saveSearchAlias, setParserForSelectedString, setQueryObjectValue, setQueryOperators, simplifyColumnDefault, sqlFn, sqlQueryArgsToExpression, tableDataMethods, templateLiteralToSQL, testTransaction, throwIfNoWhere, toSQL, toSQLCacheKey };
12775
+ export { Adapter, 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, QueryBase, 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, _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, _queryRows, _querySelect, _queryTake, _queryTakeOptional, _queryUnion, _queryUpdate, _queryUpdateOrThrow, _queryUpdateRaw, _queryWhere, _queryWhereExists, _queryWhereIn, _queryWhereNot, _queryWhereNotOneOf, _queryWhereNotSql, _queryWhereOneOf, _queryWhereSql, addParserForRawExpression, addParserForSelectItem, addQueryOn, anyShape, applyComputedColumns, checkIfASimpleQuery, cloneQuery, cloneQueryBaseUnscoped, columnCheckToCode, columnCode, columnForeignKeysToCode, columnIndexesToCode, columnsShapeToCode, commitSql$1 as commitSql, constraintInnerToCode, constraintToCode, copyTableData, countSelect, createDb, defaultSchemaConfig, extendQuery, filterResult, foreignKeyArgumentToCode, getClonedQueryData, getColumnInfo, getColumnTypes, getPrimaryKeys, getQueryAs, getShapeFromSelect, getSqlText, handleResult, identityToCode, indexInnerToCode, indexToCode, instantiateColumn, isDefaultTimeStamp, isQueryReturnsAll, isSelectingCount, joinSubQuery, logParamToLogObject, makeColumnTypes, makeColumnsByType, makeFnExpression, makeRegexToFindInSql, makeSQL, parseRecord, parseTableData, parseTableDataInput, primaryKeyInnerToCode, processComputedBatches, processComputedResult, processSelectArg, pushLimitSQL, pushQueryArray, pushQueryOn, pushQueryOnForOuter, pushQueryOrOn, pushQueryValue, pushTableDataCode, queryFrom, queryFromSql, queryJson, queryMethodByReturnType, queryTypeWithLimitOne, queryWrap, quote, quoteString, raw, referencesArgsToCode, resolveSubQueryCallback, rollbackSql$1 as rollbackSql, saveSearchAlias, setParserForSelectedString, setQueryObjectValue, setQueryOperators, simplifyColumnDefault, sqlFn, sqlQueryArgsToExpression, tableDataMethods, templateLiteralToSQL, testTransaction, throwIfNoWhere, toSQL, toSQLCacheKey };
12773
12776
  //# sourceMappingURL=index.mjs.map