orchid-orm 1.78.23 → 1.78.24

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
@@ -1,6 +1,5 @@
1
- import { DynamicRawSQL, QueryHooks, RawSql, ValExpression, VirtualColumn, _appendQuery, _appendQueryOnUpsertCreate, _clone, _createDbSqlMethod, _hookSelectColumns, _initQueryBuilder, _onUpsertUpdate, _orCreate, _prependWith, _prependWithOnUpsertCreate, _queryCreate, _queryCreateMany, _queryCreateManyFrom, _queryDefaults, _queryDelete, _queryFindBy, _queryFindByOptional, _queryHookAfterCreate, _queryHookAfterUpdate, _queryInsert, _queryInsertForEachFrom, _queryInsertMany, _queryInsertManyFrom, _queryJoinOn, _querySelect, _queryTake, _queryTakeOptional, _queryUpdate, _queryUpdateOrThrow, _queryUpsert, _queryWhere, _queryWhereExists, _queryWhereIn, applyMixins, cloneQueryBaseUnscoped, defaultSchemaConfig, emptyArray, emptyObject, getCallerFilePath, getClonedQueryData, getColumnTypes, getForeignKeyTableInstance, getFreeAlias, getPrimaryKeys, getQueryAs, getShapeFromSelect, getStackTrace, internalSchemaConfig, isExpression, isQueryReturnsAll, makeColumnTypes, noop, objectHasValues, parseTableData, parseTableDataInput, prepareSubQueryForSql, pushQueryOnForOuter, setQueryObjectValueImmutable, tableDataMethods, toArray, toSnakeCase } from "pqb/internal";
1
+ import { AsyncStateStorage, DynamicRawSQL, QueryHooks, RawSql, ValExpression, VirtualColumn, _appendQuery, _appendQueryOnUpsertCreate, _clone, _createDbSqlMethod, _hookSelectColumns, _initQueryBuilder, _onUpsertUpdate, _orCreate, _prependWith, _prependWithOnUpsertCreate, _queryCreate, _queryCreateMany, _queryCreateManyFrom, _queryDefaults, _queryDelete, _queryFindBy, _queryFindByOptional, _queryHookAfterCreate, _queryHookAfterUpdate, _queryInsert, _queryInsertForEachFrom, _queryInsertMany, _queryInsertManyFrom, _queryJoinOn, _querySelect, _queryTake, _queryTakeOptional, _queryUpdate, _queryUpdateOrThrow, _queryUpsert, _queryWhere, _queryWhereExists, _queryWhereIn, applyMixins, cloneQueryBaseUnscoped, defaultSchemaConfig, emptyArray, emptyObject, getCallerFilePath, getClonedQueryData, getColumnTypes, getForeignKeyTableInstance, getFreeAlias, getPrimaryKeys, getQueryAs, getShapeFromSelect, getStackTrace, internalSchemaConfig, isExpression, isQueryReturnsAll, makeColumnTypes, noop, objectHasValues, parseTableData, parseTableDataInput, prepareSubQueryForSql, pushQueryOnForOuter, setQueryObjectValueImmutable, tableDataMethods, toArray, toSnakeCase } from "pqb/internal";
2
2
  import { Db, Expression, NotFoundError, OrchidOrmInternalError } from "pqb";
3
- import { AsyncLocalStorage } from "node:async_hooks";
4
3
  export * from "pqb";
5
4
  function createBaseTable({ schemaConfig = defaultSchemaConfig, columnTypes: columnTypesArg, snakeCase, filePath: filePathArg, nowSQL, exportAs = "BaseTable", language, autoForeignKeys } = {}) {
6
5
  const schema = schemaConfig();
@@ -2820,7 +2819,7 @@ const privateOrchidORMWithAdapter = ({ log, logger, autoPreparedStatements, noPr
2820
2819
  qb = options.db.qb;
2821
2820
  } else {
2822
2821
  adapter = options.adapter;
2823
- asyncStorage = new AsyncLocalStorage();
2822
+ asyncStorage = new AsyncStateStorage();
2824
2823
  qb = _initQueryBuilder(adapter, makeColumnTypes(defaultSchemaConfig(adapter.driverAdapter.schemaConfig)), asyncStorage, commonOptions, options);
2825
2824
  }
2826
2825
  qb.internal.rls = options.rls;