metal-orm 1.1.21 → 1.1.23
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.cjs +379 -474
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +145 -173
- package/dist/index.d.ts +145 -173
- package/dist/index.js +374 -474
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/core/ddl/introspect/catalogs/mssql.ts +0 -8
- package/src/core/ddl/introspect/catalogs/mysql.ts +0 -5
- package/src/core/ddl/introspect/catalogs/postgres.ts +0 -9
- package/src/core/ddl/introspect/catalogs/sqlite.ts +0 -3
- package/src/core/dialect/abstract.ts +94 -417
- package/src/core/dialect/base/expression-compiler-registry.ts +254 -0
- package/src/core/dialect/base/function-table-formatter.ts +40 -78
- package/src/core/dialect/base/select-ast-normalizer.ts +61 -0
- package/src/core/dialect/base/sql-dialect.ts +36 -59
- package/src/core/dialect/capabilities/procedure-compiler.ts +30 -0
- package/src/core/dialect/dialect-factory.ts +3 -4
- package/src/core/dialect/mssql/index.ts +3 -2
- package/src/core/dialect/mysql/index.ts +3 -2
- package/src/core/dialect/postgres/index.ts +3 -2
- package/src/core/dialect/sqlite/index.ts +1 -7
- package/src/decorators/entity.ts +2 -3
- package/src/index.ts +4 -0
- package/src/orm/entity-metadata.ts +6 -11
- package/src/orm/execute-procedure.ts +3 -2
- package/src/orm/lifecycle.ts +20 -0
- package/src/orm/orm-session.ts +37 -3
- package/src/orm/unit-of-work.ts +15 -9
- package/src/query-builder/procedure-call.ts +4 -18
- package/src/schema/table.ts +10 -25
- package/src/tree/tree-manager.ts +111 -43
package/package.json
CHANGED
|
@@ -17,7 +17,6 @@ export const SysColumns = defineTable(
|
|
|
17
17
|
user_type_id: col.int()
|
|
18
18
|
},
|
|
19
19
|
{},
|
|
20
|
-
undefined,
|
|
21
20
|
{ schema: 'sys' }
|
|
22
21
|
);
|
|
23
22
|
|
|
@@ -30,7 +29,6 @@ export const SysTables = defineTable(
|
|
|
30
29
|
is_ms_shipped: col.boolean()
|
|
31
30
|
},
|
|
32
31
|
{},
|
|
33
|
-
undefined,
|
|
34
32
|
{ schema: 'sys' }
|
|
35
33
|
);
|
|
36
34
|
|
|
@@ -41,7 +39,6 @@ export const SysSchemas = defineTable(
|
|
|
41
39
|
name: col.varchar(255)
|
|
42
40
|
},
|
|
43
41
|
{},
|
|
44
|
-
undefined,
|
|
45
42
|
{ schema: 'sys' }
|
|
46
43
|
);
|
|
47
44
|
|
|
@@ -52,7 +49,6 @@ export const SysTypes = defineTable(
|
|
|
52
49
|
name: col.varchar(255)
|
|
53
50
|
},
|
|
54
51
|
{},
|
|
55
|
-
undefined,
|
|
56
52
|
{ schema: 'sys' }
|
|
57
53
|
);
|
|
58
54
|
|
|
@@ -69,7 +65,6 @@ export const SysIndexes = defineTable(
|
|
|
69
65
|
is_hypothetical: col.boolean()
|
|
70
66
|
},
|
|
71
67
|
{},
|
|
72
|
-
undefined,
|
|
73
68
|
{ schema: 'sys' }
|
|
74
69
|
);
|
|
75
70
|
|
|
@@ -82,7 +77,6 @@ export const SysIndexColumns = defineTable(
|
|
|
82
77
|
key_ordinal: col.int()
|
|
83
78
|
},
|
|
84
79
|
{},
|
|
85
|
-
undefined,
|
|
86
80
|
{ schema: 'sys' }
|
|
87
81
|
);
|
|
88
82
|
|
|
@@ -95,7 +89,6 @@ export const SysForeignKeys = defineTable(
|
|
|
95
89
|
update_referential_action_desc: col.varchar(64)
|
|
96
90
|
},
|
|
97
91
|
{},
|
|
98
|
-
undefined,
|
|
99
92
|
{ schema: 'sys' }
|
|
100
93
|
);
|
|
101
94
|
|
|
@@ -110,7 +103,6 @@ export const SysForeignKeyColumns = defineTable(
|
|
|
110
103
|
constraint_column_id: col.int()
|
|
111
104
|
},
|
|
112
105
|
{},
|
|
113
|
-
undefined,
|
|
114
106
|
{ schema: 'sys' }
|
|
115
107
|
);
|
|
116
108
|
|
|
@@ -12,7 +12,6 @@ export const InformationSchemaTables = defineTable(
|
|
|
12
12
|
table_comment: col.varchar(1024)
|
|
13
13
|
},
|
|
14
14
|
{},
|
|
15
|
-
undefined,
|
|
16
15
|
{ schema: INFORMATION_SCHEMA }
|
|
17
16
|
);
|
|
18
17
|
|
|
@@ -32,7 +31,6 @@ export const InformationSchemaColumns = defineTable(
|
|
|
32
31
|
ordinal_position: col.int()
|
|
33
32
|
},
|
|
34
33
|
{},
|
|
35
|
-
undefined,
|
|
36
34
|
{ schema: INFORMATION_SCHEMA }
|
|
37
35
|
);
|
|
38
36
|
|
|
@@ -51,7 +49,6 @@ export const InformationSchemaKeyColumnUsage = defineTable(
|
|
|
51
49
|
referenced_column_name: col.varchar(255)
|
|
52
50
|
},
|
|
53
51
|
{},
|
|
54
|
-
undefined,
|
|
55
52
|
{ schema: INFORMATION_SCHEMA }
|
|
56
53
|
);
|
|
57
54
|
|
|
@@ -65,7 +62,6 @@ export const InformationSchemaReferentialConstraints = defineTable(
|
|
|
65
62
|
update_rule: col.varchar(255)
|
|
66
63
|
},
|
|
67
64
|
{},
|
|
68
|
-
undefined,
|
|
69
65
|
{ schema: INFORMATION_SCHEMA }
|
|
70
66
|
);
|
|
71
67
|
|
|
@@ -81,7 +77,6 @@ export const InformationSchemaStatistics = defineTable(
|
|
|
81
77
|
seq_in_index: col.int()
|
|
82
78
|
},
|
|
83
79
|
{},
|
|
84
|
-
undefined,
|
|
85
80
|
{ schema: INFORMATION_SCHEMA }
|
|
86
81
|
);
|
|
87
82
|
|
|
@@ -14,7 +14,6 @@ export const PgInformationSchemaColumns = defineTable(
|
|
|
14
14
|
ordinal_position: col.int()
|
|
15
15
|
},
|
|
16
16
|
{},
|
|
17
|
-
undefined,
|
|
18
17
|
{ schema: 'information_schema' }
|
|
19
18
|
);
|
|
20
19
|
|
|
@@ -27,7 +26,6 @@ export const PgClass = defineTable(
|
|
|
27
26
|
relkind: col.varchar(1)
|
|
28
27
|
},
|
|
29
28
|
{},
|
|
30
|
-
undefined,
|
|
31
29
|
{ schema: 'pg_catalog' }
|
|
32
30
|
);
|
|
33
31
|
|
|
@@ -38,7 +36,6 @@ export const PgNamespace = defineTable(
|
|
|
38
36
|
nspname: col.varchar(255)
|
|
39
37
|
},
|
|
40
38
|
{},
|
|
41
|
-
undefined,
|
|
42
39
|
{ schema: 'pg_catalog' }
|
|
43
40
|
);
|
|
44
41
|
|
|
@@ -52,7 +49,6 @@ export const PgIndex = defineTable(
|
|
|
52
49
|
indpred: col.varchar(1024)
|
|
53
50
|
},
|
|
54
51
|
{},
|
|
55
|
-
undefined,
|
|
56
52
|
{ schema: 'pg_catalog' }
|
|
57
53
|
);
|
|
58
54
|
|
|
@@ -64,7 +60,6 @@ export const PgAttribute = defineTable(
|
|
|
64
60
|
attnum: col.int()
|
|
65
61
|
},
|
|
66
62
|
{},
|
|
67
|
-
undefined,
|
|
68
63
|
{ schema: 'pg_catalog' }
|
|
69
64
|
);
|
|
70
65
|
|
|
@@ -80,7 +75,6 @@ export const PgTableConstraints = defineTable(
|
|
|
80
75
|
constraint_type: col.varchar(255)
|
|
81
76
|
},
|
|
82
77
|
{},
|
|
83
|
-
undefined,
|
|
84
78
|
{ schema: 'information_schema' }
|
|
85
79
|
);
|
|
86
80
|
|
|
@@ -97,7 +91,6 @@ export const PgKeyColumnUsage = defineTable(
|
|
|
97
91
|
ordinal_position: col.int()
|
|
98
92
|
},
|
|
99
93
|
{},
|
|
100
|
-
undefined,
|
|
101
94
|
{ schema: 'information_schema' }
|
|
102
95
|
);
|
|
103
96
|
|
|
@@ -113,7 +106,6 @@ export const PgConstraintColumnUsage = defineTable(
|
|
|
113
106
|
column_name: col.varchar(255)
|
|
114
107
|
},
|
|
115
108
|
{},
|
|
116
|
-
undefined,
|
|
117
109
|
{ schema: 'information_schema' }
|
|
118
110
|
);
|
|
119
111
|
|
|
@@ -131,7 +123,6 @@ export const PgReferentialConstraints = defineTable(
|
|
|
131
123
|
delete_rule: col.varchar(64)
|
|
132
124
|
},
|
|
133
125
|
{},
|
|
134
|
-
undefined,
|
|
135
126
|
{ schema: 'information_schema' }
|
|
136
127
|
);
|
|
137
128
|
|
|
@@ -14,7 +14,6 @@ export const SqliteMaster = defineTable(
|
|
|
14
14
|
sql: col.varchar(4096) // Original DDL
|
|
15
15
|
},
|
|
16
16
|
{},
|
|
17
|
-
undefined,
|
|
18
17
|
{ schema: undefined }
|
|
19
18
|
);
|
|
20
19
|
|
|
@@ -26,7 +25,6 @@ export const SqliteSequence = defineTable(
|
|
|
26
25
|
seq: col.int() // Last autoincrement value
|
|
27
26
|
},
|
|
28
27
|
{},
|
|
29
|
-
undefined,
|
|
30
28
|
{ schema: undefined }
|
|
31
29
|
);
|
|
32
30
|
|
|
@@ -39,7 +37,6 @@ export const SqliteStat1 = defineTable(
|
|
|
39
37
|
stat: col.varchar(255) // Statistics string
|
|
40
38
|
},
|
|
41
39
|
{},
|
|
42
|
-
undefined,
|
|
43
40
|
{ schema: undefined }
|
|
44
41
|
);
|
|
45
42
|
|