orchid-orm 1.65.0 → 1.66.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.d.ts +41 -5
- package/dist/index.js +10 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/dist/migrations/index.js.map +1 -1
- package/dist/migrations/index.mjs.map +1 -1
- package/dist/migrations/node-postgres.js.map +1 -1
- package/dist/migrations/node-postgres.mjs.map +1 -1
- package/dist/migrations/postgres-js.js.map +1 -1
- package/dist/migrations/postgres-js.mjs.map +1 -1
- package/dist/node-postgres.d.ts +1 -2
- package/dist/node-postgres.js.map +1 -1
- package/dist/node-postgres.mjs.map +1 -1
- package/dist/postgres-js.d.ts +4 -4
- package/dist/postgres-js.js.map +1 -1
- package/dist/postgres-js.mjs.map +1 -1
- package/package.json +25 -21
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { makeColumnTypes, getStackTrace, _createDbSqlMethod, applyMixins, QueryHooks,
|
|
2
|
-
import {
|
|
1
|
+
import { makeColumnTypes, defaultSchemaConfig, getStackTrace, _createDbSqlMethod, applyMixins, QueryHooks, emptyArray, emptyObject, getCallerFilePath, snakeCaseKey, getColumnTypes, parseTableData, toSnakeCase, getQueryAs, setQueryObjectValueImmutable, pushQueryOnForOuter, _queryHookAfterCreate, _queryHookAfterUpdate, isExpression, cloneQueryBaseUnscoped, DynamicRawSQL, RawSql, getShapeFromSelect, _queryWhere, _queryDefaults, getPrimaryKeys, VirtualColumn, _prependWith, _queryInsertMany, getFreeAlias, _orCreate, _querySelect, _queryCreate, _hookSelectColumns, _queryUpdate, _queryWhereIn, _appendQuery, isQueryReturnsAll, _queryUpsert, noop, _queryDelete, _queryFindBy, prepareSubQueryForSql, _clone, _queryUpdateOrThrow, _queryInsert, _queryCreateMany, toArray, objectHasValues, _queryCreateManyFrom, _queryJoinOn, _queryWhereExists, _queryFindByOptional, _queryRows, pick, _queryTake, _queryTakeOptional, _initQueryBuilder, getClonedQueryData } from 'pqb/internal';
|
|
2
|
+
import { OrchidOrmInternalError, NotFoundError, Db } from 'pqb';
|
|
3
3
|
export * from 'pqb';
|
|
4
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
4
5
|
|
|
5
6
|
function createBaseTable({
|
|
6
7
|
schemaConfig = defaultSchemaConfig,
|
|
@@ -142,6 +143,7 @@ function createBaseTable({
|
|
|
142
143
|
applyMixins(base, [QueryHooks]);
|
|
143
144
|
base.prototype.types = columnTypes;
|
|
144
145
|
base.prototype.snakeCase = snakeCase;
|
|
146
|
+
base.prototype.language = language;
|
|
145
147
|
base.prototype.autoForeignKeys = autoForeignKeys === true ? {} : autoForeignKeys || void 0;
|
|
146
148
|
return base;
|
|
147
149
|
}
|
|
@@ -415,7 +417,7 @@ class BelongsToVirtualColumn extends VirtualColumn {
|
|
|
415
417
|
var _a;
|
|
416
418
|
const value = item[key];
|
|
417
419
|
const kind = value.create ? "create" : value.connect ? "connect" : "connectOrCreate";
|
|
418
|
-
|
|
420
|
+
{
|
|
419
421
|
const nestedCreateItem = (_a = nestedCreateItems ?? (nestedCreateItems = {}))[kind] ?? (_a[kind] = {
|
|
420
422
|
items: [],
|
|
421
423
|
values: []
|
|
@@ -723,7 +725,7 @@ class HasOneVirtualColumn extends VirtualColumn {
|
|
|
723
725
|
var _a;
|
|
724
726
|
const value = item[this.key];
|
|
725
727
|
const kind = value.create ? "create" : value.connect ? "connect" : "connectOrCreate";
|
|
726
|
-
|
|
728
|
+
{
|
|
727
729
|
const nestedCreateItem = (_a = nestedCreateItems ?? (nestedCreateItems = {}))[kind] ?? (_a[kind] = {
|
|
728
730
|
indexes: [],
|
|
729
731
|
items: [],
|