metal-orm 1.1.2 → 1.1.4
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/README.md +728 -707
- package/dist/index.cjs +813 -75
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +277 -8
- package/dist/index.d.ts +277 -8
- package/dist/index.js +812 -75
- package/dist/index.js.map +1 -1
- package/package.json +8 -2
- package/scripts/naming-strategy.mjs +16 -1
- package/src/cache/adapters/keyv-cache-adapter.ts +5 -0
- package/src/cache/adapters/memory-cache-adapter.ts +5 -0
- package/src/cache/adapters/redis-cache-adapter.ts +233 -0
- package/src/cache/cache-interfaces.ts +11 -0
- package/src/cache/index.ts +2 -0
- package/src/core/ast/procedure.ts +21 -0
- package/src/core/ast/query.ts +47 -19
- package/src/core/ddl/introspect/utils.ts +56 -56
- package/src/core/dialect/abstract.ts +560 -547
- package/src/core/dialect/base/sql-dialect.ts +43 -29
- package/src/core/dialect/mssql/index.ts +369 -232
- package/src/core/dialect/mysql/index.ts +99 -7
- package/src/core/dialect/postgres/index.ts +121 -60
- package/src/core/dialect/sqlite/index.ts +97 -64
- package/src/core/execution/db-executor.ts +108 -90
- package/src/core/execution/executors/mssql-executor.ts +28 -24
- package/src/core/execution/executors/mysql-executor.ts +62 -27
- package/src/core/execution/executors/sqlite-executor.ts +10 -9
- package/src/index.ts +9 -6
- package/src/orm/execute-procedure.ts +77 -0
- package/src/orm/execute.ts +74 -73
- package/src/orm/interceptor-pipeline.ts +21 -17
- package/src/orm/pooled-executor-factory.ts +41 -20
- package/src/orm/unit-of-work.ts +6 -4
- package/src/query/index.ts +8 -5
- package/src/query-builder/delete.ts +3 -2
- package/src/query-builder/insert-query-state.ts +47 -19
- package/src/query-builder/insert.ts +142 -28
- package/src/query-builder/procedure-call.ts +122 -0
- package/src/query-builder/select/select-operations.ts +5 -2
- package/src/query-builder/select.ts +1146 -1105
- package/src/query-builder/update.ts +3 -2
- package/src/tree/tree-manager.ts +754 -754
|
@@ -9,7 +9,7 @@ import { UpdateQueryState } from './update-query-state.js';
|
|
|
9
9
|
import { createJoinNode } from '../core/ast/join-node.js';
|
|
10
10
|
import { buildColumnNode } from '../core/ast/builders.js';
|
|
11
11
|
import { OrmSession } from '../orm/orm-session.js';
|
|
12
|
-
import { QueryResult } from '../core/execution/db-executor.js';
|
|
12
|
+
import { payloadResultSets, QueryResult } from '../core/execution/db-executor.js';
|
|
13
13
|
|
|
14
14
|
type UpdateDialectInput = Dialect | DialectKey;
|
|
15
15
|
|
|
@@ -140,7 +140,8 @@ export class UpdateQueryBuilder<T> {
|
|
|
140
140
|
async execute(session: OrmSession): Promise<QueryResult[]> {
|
|
141
141
|
const execCtx = session.getExecutionContext();
|
|
142
142
|
const compiled = this.compile(execCtx.dialect);
|
|
143
|
-
|
|
143
|
+
const payload = await execCtx.interceptors.run({ sql: compiled.sql, params: compiled.params }, execCtx.executor);
|
|
144
|
+
return payloadResultSets(payload);
|
|
144
145
|
}
|
|
145
146
|
|
|
146
147
|
/**
|