vona-module-a-orm 5.0.45 → 5.0.46

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.
@@ -3,6 +3,7 @@ import type { BeanModelMeta } from '../bean/bean.model/bean.model_meta.ts';
3
3
  import type { TypeModelColumn, TypeModelColumns } from '../types/modelWhere.ts';
4
4
  import type { IModelClassRecord } from '../types/onion/model.ts';
5
5
  export declare function isRaw(raw: any): boolean;
6
+ export declare function isRef(ref: any): boolean;
6
7
  export declare function getTableOrTableAlias(table: string): string;
7
8
  export declare function getTargetColumnName(column: string): string;
8
9
  export declare function prepareColumns<TRecord>(columns?: TypeModelColumns<TRecord>): Array<TypeModelColumn<TRecord>> | undefined;
package/dist/index.js CHANGED
@@ -846,6 +846,9 @@ const OpValues = Object.values(Op);
846
846
  function isRaw(raw) {
847
847
  return typeof raw?.constructor === 'function' && raw?.constructor?.name === 'Raw';
848
848
  }
849
+ function isRef(ref) {
850
+ return typeof ref?.constructor === 'function' && ref?.constructor?.name === 'Ref';
851
+ }
849
852
  function getTableOrTableAlias(table) {
850
853
  const _table = table.toString();
851
854
  return _table.includes(' as ') ? _table.split(' as ')[1].trim() : _table;
@@ -985,7 +988,7 @@ function _buildWhereColumn(having, knex, builder, column, value, op) {
985
988
  return;
986
989
  }
987
990
  // raw
988
- if (isRaw(value)) {
991
+ if (isRaw(value) || isRef(value)) {
989
992
  _buildWhereColumnOpNormal(having, knex, builder, column, value, op ?? Op.eq);
990
993
  return;
991
994
  }
@@ -4125,4 +4128,4 @@ const $relationMutate = {
4125
4128
  belongsToMany
4126
4129
  };
4127
4130
 
4128
- export { $Dto, $column, $columns, $columnsAll, $locale, $relation, $relationDynamic, $relationMutate, $tableColumns, $tableComments, $tableDefaults, $tableName, AopMethodTransaction, BeanDatabase, BeanDatabaseDialectBase, BeanModel, BeanModelBase, BeanModelMeta, BroadcastColumnsClear, BroadcastDatabaseClientReload, Database, DatabaseDialect, Entity, EntityBase, EntityBaseEmpty, EntityBaseInner, EntityBaseSimple, Errors, EventClientNameReal, EventColumnsClear, EventDatabaseClientReload, ExtendKnex, ExtendSchemaBuilder, ExtendTableBuilder, Main, Model, Op, OpAggrs, OpJoint, OpJointValues, OpNormal, OpNormalValues, OpValues, ScheduleSoftDeletionPrune, ScopeModuleAOrm, ServiceCacheEntity, ServiceCacheQuery, ServiceColumns, ServiceColumnsCache, ServiceDatabase, ServiceDatabaseAsyncLocalStorage, ServiceDatabaseClient, ServiceDb, ServiceEntityResolver, ServiceModelResolver, ServiceRelations, ServiceTransaction, ServiceTransactionAsyncLocalStorage, ServiceTransactionConsistency‌, ServiceTransactionFiber, ServiceTransactionState, SymbolKeyEntity, SymbolKeyEntityMeta, SymbolKeyFieldsMore, SymbolKeyModelOptions, TransactionIsolationLevelsMap, buildWhere, config, configDefault, getClassEntityFromClassModel, getTableOrTableAlias, getTargetColumnName, isAggrColumn, isRaw, locales, prepareClassModel, prepareColumns };
4131
+ export { $Dto, $column, $columns, $columnsAll, $locale, $relation, $relationDynamic, $relationMutate, $tableColumns, $tableComments, $tableDefaults, $tableName, AopMethodTransaction, BeanDatabase, BeanDatabaseDialectBase, BeanModel, BeanModelBase, BeanModelMeta, BroadcastColumnsClear, BroadcastDatabaseClientReload, Database, DatabaseDialect, Entity, EntityBase, EntityBaseEmpty, EntityBaseInner, EntityBaseSimple, Errors, EventClientNameReal, EventColumnsClear, EventDatabaseClientReload, ExtendKnex, ExtendSchemaBuilder, ExtendTableBuilder, Main, Model, Op, OpAggrs, OpJoint, OpJointValues, OpNormal, OpNormalValues, OpValues, ScheduleSoftDeletionPrune, ScopeModuleAOrm, ServiceCacheEntity, ServiceCacheQuery, ServiceColumns, ServiceColumnsCache, ServiceDatabase, ServiceDatabaseAsyncLocalStorage, ServiceDatabaseClient, ServiceDb, ServiceEntityResolver, ServiceModelResolver, ServiceRelations, ServiceTransaction, ServiceTransactionAsyncLocalStorage, ServiceTransactionConsistency‌, ServiceTransactionFiber, ServiceTransactionState, SymbolKeyEntity, SymbolKeyEntityMeta, SymbolKeyFieldsMore, SymbolKeyModelOptions, TransactionIsolationLevelsMap, buildWhere, config, configDefault, getClassEntityFromClassModel, getTableOrTableAlias, getTargetColumnName, isAggrColumn, isRaw, isRef, locales, prepareClassModel, prepareColumns };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-module-a-orm",
3
3
  "type": "module",
4
- "version": "5.0.45",
4
+ "version": "5.0.46",
5
5
  "title": "a-orm",
6
6
  "vonaModule": {
7
7
  "capabilities": {