metal-orm 1.0.45 → 1.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.
Files changed (47) hide show
  1. package/dist/index.cjs +72 -4
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +72 -4
  4. package/dist/index.d.ts +72 -4
  5. package/dist/index.js +69 -4
  6. package/dist/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/core/ast/adapters.ts +2 -1
  9. package/src/core/ddl/dialects/base-schema-dialect.ts +2 -1
  10. package/src/core/ddl/dialects/mssql-schema-dialect.ts +10 -23
  11. package/src/core/ddl/dialects/mysql-schema-dialect.ts +10 -24
  12. package/src/core/ddl/dialects/postgres-schema-dialect.ts +10 -23
  13. package/src/core/ddl/dialects/render-reference.test.ts +2 -1
  14. package/src/core/ddl/dialects/sqlite-schema-dialect.ts +9 -23
  15. package/src/core/ddl/introspect/catalogs/postgres.ts +2 -1
  16. package/src/core/ddl/introspect/mssql.ts +17 -1
  17. package/src/core/ddl/introspect/postgres.ts +2 -1
  18. package/src/core/ddl/introspect/sqlite.ts +2 -1
  19. package/src/core/ddl/schema-dialect.ts +2 -1
  20. package/src/core/ddl/schema-diff.ts +2 -1
  21. package/src/core/ddl/schema-generator.ts +2 -1
  22. package/src/core/ddl/schema-types.ts +2 -1
  23. package/src/core/ddl/sql-writing.ts +2 -1
  24. package/src/core/functions/datetime.ts +2 -1
  25. package/src/core/functions/numeric.ts +2 -1
  26. package/src/core/functions/text.ts +2 -1
  27. package/src/decorators/{column.ts → column-decorator.ts} +4 -1
  28. package/src/decorators/index.ts +1 -1
  29. package/src/index.ts +2 -1
  30. package/src/orm/entity-metadata.ts +2 -1
  31. package/src/orm/lazy-batch.ts +2 -1
  32. package/src/orm/orm-session.ts +2 -1
  33. package/src/query-builder/column-selector.ts +2 -1
  34. package/src/query-builder/delete.ts +2 -1
  35. package/src/query-builder/insert.ts +2 -1
  36. package/src/query-builder/query-ast-service.ts +2 -1
  37. package/src/query-builder/relation-projection-helper.ts +2 -1
  38. package/src/query-builder/relation-service.ts +2 -1
  39. package/src/query-builder/select/predicate-facet.ts +2 -1
  40. package/src/query-builder/select/projection-facet.ts +2 -1
  41. package/src/query-builder/select-helpers.ts +2 -1
  42. package/src/query-builder/select.ts +2 -1
  43. package/src/query-builder/update.ts +2 -1
  44. package/src/schema/{column.ts → column-types.ts} +317 -290
  45. package/src/schema/table-guards.ts +1 -1
  46. package/src/schema/table.ts +1 -1
  47. package/src/schema/types.ts +10 -8
@@ -1,4 +1,4 @@
1
- import { ColumnDef } from '../schema/column.js';
1
+ import { ColumnDef } from '../schema/column-types.js';
2
2
  import { CaseExpressionNode, ColumnNode, FunctionNode, WindowFunctionNode } from '../core/ast/expression.js';
3
3
  import { SelectQueryNode } from '../core/ast/query.js';
4
4
  import { buildColumnNode } from '../core/ast/builders.js';
@@ -78,3 +78,4 @@ export class ColumnSelector {
78
78
  return { state: nextState, hydration: context.hydration };
79
79
  }
80
80
  }
81
+
@@ -1,5 +1,5 @@
1
1
  import { TableDef } from '../schema/table.js';
2
- import { ColumnDef } from '../schema/column.js';
2
+ import { ColumnDef } from '../schema/column-types.js';
3
3
  import { ColumnNode, ExpressionNode } from '../core/ast/expression.js';
4
4
  import { JOIN_KINDS, JoinKind } from '../core/sql/sql.js';
5
5
  import { CompiledQuery, Dialect } from '../core/dialect/abstract.js';
@@ -143,3 +143,4 @@ export class DeleteQueryBuilder<T> {
143
143
 
144
144
  const isTableSourceNode = (source: TableDef | TableSourceNode): source is TableSourceNode =>
145
145
  typeof (source as TableSourceNode).type === 'string';
146
+
@@ -1,6 +1,6 @@
1
1
  import type { SelectQueryBuilder } from './select.js';
2
2
  import { TableDef } from '../schema/table.js';
3
- import { ColumnDef } from '../schema/column.js';
3
+ import { ColumnDef } from '../schema/column-types.js';
4
4
  import { ColumnNode } from '../core/ast/expression.js';
5
5
  import { CompiledQuery, InsertCompiler, Dialect } from '../core/dialect/abstract.js';
6
6
  import { DialectKey, resolveDialectInput } from '../core/dialect/dialect-factory.js';
@@ -137,3 +137,4 @@ export class InsertQueryBuilder<T> {
137
137
  return this.state.ast;
138
138
  }
139
139
  }
140
+
@@ -1,5 +1,5 @@
1
1
  import { TableDef } from '../schema/table.js';
2
- import { ColumnDef } from '../schema/column.js';
2
+ import { ColumnDef } from '../schema/column-types.js';
3
3
  import {
4
4
  SelectQueryNode,
5
5
  CommonTableExpressionNode,
@@ -284,3 +284,4 @@ export class QueryAstService {
284
284
  }
285
285
 
286
286
  }
287
+
@@ -1,5 +1,5 @@
1
1
  import { TableDef } from '../schema/table.js';
2
- import { ColumnDef } from '../schema/column.js';
2
+ import { ColumnDef } from '../schema/column-types.js';
3
3
  import { SelectQueryState } from './select-query-state.js';
4
4
  import { HydrationManager } from './hydration-manager.js';
5
5
  import { ColumnNode } from '../core/ast/expression.js';
@@ -99,3 +99,4 @@ export class RelationProjectionHelper {
99
99
  }, {} as Record<string, ColumnDef>);
100
100
  }
101
101
  }
102
+
@@ -1,5 +1,5 @@
1
1
  import { TableDef } from '../schema/table.js';
2
- import { ColumnDef } from '../schema/column.js';
2
+ import { ColumnDef } from '../schema/column-types.js';
3
3
  import { RelationDef, RelationKinds, BelongsToManyRelation } from '../schema/relation.js';
4
4
  import { SelectQueryNode } from '../core/ast/query.js';
5
5
  import {
@@ -301,3 +301,4 @@ export class RelationService {
301
301
  }
302
302
 
303
303
  export type { RelationResult } from './relation-projection-helper.js';
304
+
@@ -1,4 +1,4 @@
1
- import { ColumnDef } from '../../schema/column.js';
1
+ import { ColumnDef } from '../../schema/column-types.js';
2
2
  import { ExpressionNode } from '../../core/ast/expression.js';
3
3
  import { OrderingTerm } from '../../core/ast/query.js';
4
4
  import { OrderDirection } from '../../core/sql/sql.js';
@@ -101,3 +101,4 @@ export class SelectPredicateFacet {
101
101
  return { state: nextState, hydration: context.hydration };
102
102
  }
103
103
  }
104
+
@@ -1,4 +1,4 @@
1
- import { ColumnDef } from '../../schema/column.js';
1
+ import { ColumnDef } from '../../schema/column-types.js';
2
2
  import { ColumnNode, FunctionNode, CaseExpressionNode, WindowFunctionNode } from '../../core/ast/expression.js';
3
3
  import { SelectQueryBuilderContext } from '../select-query-builder-deps.js';
4
4
  import { ColumnSelector } from '../column-selector.js';
@@ -67,3 +67,4 @@ export class SelectProjectionFacet {
67
67
  return { ...context, state: this.columnSelector.distinct(context, cols).state };
68
68
  }
69
69
  }
70
+
@@ -1,5 +1,5 @@
1
1
  import type { TableDef } from '../schema/table.js';
2
- import type { ColumnDef } from '../schema/column.js';
2
+ import type { ColumnDef } from '../schema/column-types.js';
3
3
  import { getTableDefFromEntity } from '../decorators/bootstrap.js';
4
4
 
5
5
  /**
@@ -61,3 +61,4 @@ export function esel<TEntity extends object, K extends keyof TEntity & string>(
61
61
 
62
62
  return selection;
63
63
  }
64
+
@@ -1,5 +1,5 @@
1
1
  import { TableDef } from '../schema/table.js';
2
- import { ColumnDef } from '../schema/column.js';
2
+ import { ColumnDef } from '../schema/column-types.js';
3
3
  import { OrderingTerm, SelectQueryNode, SetOperationKind } from '../core/ast/query.js';
4
4
  import { HydrationPlan } from '../core/hydration/types.js';
5
5
  import {
@@ -793,3 +793,4 @@ export class SelectQueryBuilder<T = unknown, TTable extends TableDef = TableDef>
793
793
  return this.context.hydration.applyToAst(this.context.state.ast);
794
794
  }
795
795
  }
796
+
@@ -1,5 +1,5 @@
1
1
  import { TableDef } from '../schema/table.js';
2
- import { ColumnDef } from '../schema/column.js';
2
+ import { ColumnDef } from '../schema/column-types.js';
3
3
  import { ColumnNode, ExpressionNode } from '../core/ast/expression.js';
4
4
  import { JOIN_KINDS, JoinKind } from '../core/sql/sql.js';
5
5
  import { CompiledQuery, Dialect } from '../core/dialect/abstract.js';
@@ -153,3 +153,4 @@ export class UpdateQueryBuilder<T> {
153
153
 
154
154
  const isTableSourceNode = (source: TableDef | TableSourceNode): source is TableSourceNode =>
155
155
  typeof (source as TableSourceNode).type === 'string';
156
+