@mikro-orm/sql 7.0.2-dev.9 → 7.0.2
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/AbstractSqlConnection.d.ts +95 -47
- package/AbstractSqlConnection.js +240 -232
- package/AbstractSqlDriver.d.ts +412 -155
- package/AbstractSqlDriver.js +2062 -1937
- package/AbstractSqlPlatform.d.ts +84 -73
- package/AbstractSqlPlatform.js +163 -158
- package/PivotCollectionPersister.d.ts +33 -15
- package/PivotCollectionPersister.js +158 -160
- package/README.md +128 -294
- package/SqlEntityManager.d.ts +68 -20
- package/SqlEntityManager.js +54 -37
- package/SqlEntityRepository.d.ts +15 -14
- package/SqlEntityRepository.js +24 -23
- package/dialects/mssql/MsSqlNativeQueryBuilder.d.ts +12 -12
- package/dialects/mssql/MsSqlNativeQueryBuilder.js +192 -194
- package/dialects/mysql/BaseMySqlPlatform.d.ts +64 -45
- package/dialects/mysql/BaseMySqlPlatform.js +134 -131
- package/dialects/mysql/MySqlExceptionConverter.d.ts +6 -6
- package/dialects/mysql/MySqlExceptionConverter.js +91 -77
- package/dialects/mysql/MySqlNativeQueryBuilder.d.ts +3 -3
- package/dialects/mysql/MySqlNativeQueryBuilder.js +66 -69
- package/dialects/mysql/MySqlSchemaHelper.d.ts +39 -39
- package/dialects/mysql/MySqlSchemaHelper.js +327 -319
- package/dialects/oracledb/OracleDialect.d.ts +81 -52
- package/dialects/oracledb/OracleDialect.js +155 -149
- package/dialects/oracledb/OracleNativeQueryBuilder.d.ts +12 -12
- package/dialects/oracledb/OracleNativeQueryBuilder.js +232 -236
- package/dialects/postgresql/BasePostgreSqlPlatform.d.ts +108 -105
- package/dialects/postgresql/BasePostgreSqlPlatform.js +351 -350
- package/dialects/postgresql/FullTextType.d.ts +10 -6
- package/dialects/postgresql/FullTextType.js +51 -51
- package/dialects/postgresql/PostgreSqlExceptionConverter.d.ts +5 -5
- package/dialects/postgresql/PostgreSqlExceptionConverter.js +55 -43
- package/dialects/postgresql/PostgreSqlNativeQueryBuilder.d.ts +1 -1
- package/dialects/postgresql/PostgreSqlNativeQueryBuilder.js +4 -4
- package/dialects/postgresql/PostgreSqlSchemaHelper.d.ts +102 -82
- package/dialects/postgresql/PostgreSqlSchemaHelper.js +711 -683
- package/dialects/sqlite/BaseSqliteConnection.d.ts +3 -5
- package/dialects/sqlite/BaseSqliteConnection.js +21 -19
- package/dialects/sqlite/NodeSqliteDialect.d.ts +1 -1
- package/dialects/sqlite/NodeSqliteDialect.js +23 -23
- package/dialects/sqlite/SqliteDriver.d.ts +1 -1
- package/dialects/sqlite/SqliteDriver.js +3 -3
- package/dialects/sqlite/SqliteExceptionConverter.d.ts +6 -6
- package/dialects/sqlite/SqliteExceptionConverter.js +67 -51
- package/dialects/sqlite/SqliteNativeQueryBuilder.d.ts +2 -2
- package/dialects/sqlite/SqliteNativeQueryBuilder.js +7 -7
- package/dialects/sqlite/SqlitePlatform.d.ts +63 -72
- package/dialects/sqlite/SqlitePlatform.js +139 -139
- package/dialects/sqlite/SqliteSchemaHelper.d.ts +70 -60
- package/dialects/sqlite/SqliteSchemaHelper.js +533 -520
- package/package.json +4 -4
- package/plugin/index.d.ts +44 -35
- package/plugin/index.js +44 -36
- package/plugin/transformer.d.ts +117 -94
- package/plugin/transformer.js +890 -881
- package/query/ArrayCriteriaNode.d.ts +4 -4
- package/query/ArrayCriteriaNode.js +18 -18
- package/query/CriteriaNode.d.ts +35 -25
- package/query/CriteriaNode.js +133 -123
- package/query/CriteriaNodeFactory.d.ts +49 -6
- package/query/CriteriaNodeFactory.js +97 -94
- package/query/NativeQueryBuilder.d.ts +120 -117
- package/query/NativeQueryBuilder.js +484 -480
- package/query/ObjectCriteriaNode.d.ts +12 -12
- package/query/ObjectCriteriaNode.js +298 -282
- package/query/QueryBuilder.d.ts +1546 -904
- package/query/QueryBuilder.js +2270 -2145
- package/query/QueryBuilderHelper.d.ts +153 -72
- package/query/QueryBuilderHelper.js +1079 -1028
- package/query/ScalarCriteriaNode.d.ts +3 -3
- package/query/ScalarCriteriaNode.js +53 -46
- package/query/enums.d.ts +16 -14
- package/query/enums.js +16 -14
- package/query/raw.d.ts +16 -6
- package/query/raw.js +10 -10
- package/schema/DatabaseSchema.d.ts +73 -50
- package/schema/DatabaseSchema.js +331 -307
- package/schema/DatabaseTable.d.ts +96 -73
- package/schema/DatabaseTable.js +1012 -927
- package/schema/SchemaComparator.d.ts +58 -54
- package/schema/SchemaComparator.js +745 -719
- package/schema/SchemaHelper.d.ts +110 -80
- package/schema/SchemaHelper.js +676 -645
- package/schema/SqlSchemaGenerator.d.ts +79 -58
- package/schema/SqlSchemaGenerator.js +536 -501
- package/typings.d.ts +380 -266
|
@@ -1,78 +1,107 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
type AliasNode,
|
|
3
|
+
CompiledQuery,
|
|
4
|
+
type DatabaseConnection,
|
|
5
|
+
type DatabaseIntrospector,
|
|
6
|
+
DefaultQueryCompiler,
|
|
7
|
+
type Dialect,
|
|
8
|
+
DialectAdapterBase,
|
|
9
|
+
type Driver,
|
|
10
|
+
type Kysely,
|
|
11
|
+
type QueryCompiler,
|
|
12
|
+
type QueryResult,
|
|
13
|
+
type TransactionSettings,
|
|
14
|
+
} from 'kysely';
|
|
2
15
|
/**
|
|
3
16
|
* Subset of oracledb's Pool interface used by the dialect.
|
|
4
17
|
* We define our own interface to avoid importing the `oracledb` package directly.
|
|
5
18
|
*/
|
|
6
19
|
export interface OraclePool {
|
|
7
|
-
|
|
8
|
-
|
|
20
|
+
getConnection(): Promise<OraclePoolConnection>;
|
|
21
|
+
close(drainTime?: number): Promise<void>;
|
|
9
22
|
}
|
|
10
23
|
/**
|
|
11
24
|
* Subset of oracledb's Connection interface used by the dialect.
|
|
12
25
|
*/
|
|
13
26
|
export interface OraclePoolConnection {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
27
|
+
execute<R>(
|
|
28
|
+
sql: string,
|
|
29
|
+
params: unknown[],
|
|
30
|
+
options?: Record<string, unknown>,
|
|
31
|
+
): Promise<{
|
|
32
|
+
rows?: R[];
|
|
33
|
+
rowsAffected?: number;
|
|
34
|
+
resultSet?: OracleResultSet<R>;
|
|
35
|
+
outBinds?: unknown;
|
|
36
|
+
}>;
|
|
37
|
+
commit(): Promise<void>;
|
|
38
|
+
rollback(): Promise<void>;
|
|
39
|
+
close(): Promise<void>;
|
|
23
40
|
}
|
|
24
41
|
interface OracleResultSet<R> {
|
|
25
|
-
|
|
26
|
-
|
|
42
|
+
getRow(): Promise<R>;
|
|
43
|
+
close(): Promise<void>;
|
|
27
44
|
}
|
|
28
45
|
declare class OracleQueryCompiler extends DefaultQueryCompiler {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
46
|
+
protected getLeftIdentifierWrapper(): string;
|
|
47
|
+
protected getRightIdentifierWrapper(): string;
|
|
48
|
+
protected visitAlias(node: AliasNode): void;
|
|
32
49
|
}
|
|
33
50
|
declare class OracleAdapter extends DialectAdapterBase {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
51
|
+
#private;
|
|
52
|
+
get supportsReturning(): boolean;
|
|
53
|
+
get supportsTransactionalDdl(): boolean;
|
|
54
|
+
acquireMigrationLock(_: Kysely<any>): Promise<void>;
|
|
55
|
+
releaseMigrationLock(_: Kysely<any>): Promise<void>;
|
|
39
56
|
}
|
|
40
57
|
declare class OracleConnection implements DatabaseConnection {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
58
|
+
#private;
|
|
59
|
+
readonly id: number;
|
|
60
|
+
constructor(connection: OraclePoolConnection, executeOptions?: Record<string, unknown>);
|
|
61
|
+
executeQuery<R>(compiledQuery: CompiledQuery): Promise<QueryResult<R>>;
|
|
62
|
+
formatQuery(query: CompiledQuery): {
|
|
63
|
+
sql: string;
|
|
64
|
+
bindParams: unknown[];
|
|
65
|
+
};
|
|
66
|
+
streamQuery<R>(compiledQuery: CompiledQuery, _chunkSize?: number): AsyncIterableIterator<QueryResult<R>>;
|
|
67
|
+
get connection(): OraclePoolConnection;
|
|
51
68
|
}
|
|
52
69
|
declare class OracleDriver implements Driver {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
70
|
+
#private;
|
|
71
|
+
constructor(config: OracleDialectConfig);
|
|
72
|
+
init(): Promise<void>;
|
|
73
|
+
acquireConnection(): Promise<OracleConnection>;
|
|
74
|
+
savepoint(
|
|
75
|
+
connection: OracleConnection,
|
|
76
|
+
savepointName: string,
|
|
77
|
+
compileQuery: QueryCompiler['compileQuery'],
|
|
78
|
+
): Promise<void>;
|
|
79
|
+
rollbackToSavepoint(
|
|
80
|
+
connection: OracleConnection,
|
|
81
|
+
savepointName: string,
|
|
82
|
+
compileQuery: QueryCompiler['compileQuery'],
|
|
83
|
+
): Promise<void>;
|
|
84
|
+
releaseSavepoint(
|
|
85
|
+
connection: OracleConnection,
|
|
86
|
+
savepointName: string,
|
|
87
|
+
compileQuery: QueryCompiler['compileQuery'],
|
|
88
|
+
): Promise<void>;
|
|
89
|
+
beginTransaction(connection: OracleConnection, settings: TransactionSettings): Promise<void>;
|
|
90
|
+
commitTransaction(connection: OracleConnection): Promise<void>;
|
|
91
|
+
rollbackTransaction(connection: OracleConnection): Promise<void>;
|
|
92
|
+
releaseConnection(connection: OracleConnection): Promise<void>;
|
|
93
|
+
destroy(): Promise<void>;
|
|
65
94
|
}
|
|
66
95
|
export interface OracleDialectConfig {
|
|
67
|
-
|
|
68
|
-
|
|
96
|
+
pool: OraclePool;
|
|
97
|
+
executeOptions?: Record<string, unknown>;
|
|
69
98
|
}
|
|
70
99
|
export declare class OracleDialect implements Dialect {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
100
|
+
#private;
|
|
101
|
+
constructor(config: OracleDialectConfig);
|
|
102
|
+
createDriver(): OracleDriver;
|
|
103
|
+
createAdapter(): OracleAdapter;
|
|
104
|
+
createIntrospector(db: Kysely<any>): DatabaseIntrospector;
|
|
105
|
+
createQueryCompiler(): OracleQueryCompiler;
|
|
77
106
|
}
|
|
78
107
|
export {};
|
|
@@ -1,166 +1,172 @@
|
|
|
1
1
|
// inlined https://github.com/griffiths-waite/kysely-oracledb with minor adjustments
|
|
2
2
|
/* v8 ignore start: internal Kysely driver integration, tested through the main Oracle driver */
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
CompiledQuery,
|
|
5
|
+
createQueryId,
|
|
6
|
+
DefaultQueryCompiler,
|
|
7
|
+
DialectAdapterBase,
|
|
8
|
+
IdentifierNode,
|
|
9
|
+
RawNode,
|
|
10
|
+
} from 'kysely';
|
|
4
11
|
function parseSavepointCommand(command, savepointName) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
return RawNode.createWithChildren([
|
|
13
|
+
RawNode.createWithSql(`${command} `),
|
|
14
|
+
IdentifierNode.create(savepointName), // ensures savepointName gets sanitized
|
|
15
|
+
]);
|
|
9
16
|
}
|
|
10
17
|
class OracleQueryCompiler extends DefaultQueryCompiler {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
getLeftIdentifierWrapper() {
|
|
19
|
+
return '';
|
|
20
|
+
}
|
|
21
|
+
getRightIdentifierWrapper() {
|
|
22
|
+
return '';
|
|
23
|
+
}
|
|
24
|
+
visitAlias(node) {
|
|
25
|
+
this.visitNode(node.node);
|
|
26
|
+
this.append(' ');
|
|
27
|
+
this.visitNode(node.alias);
|
|
28
|
+
}
|
|
22
29
|
}
|
|
23
30
|
class OracleAdapter extends DialectAdapterBase {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
#supportsReturning = false;
|
|
32
|
+
#supportsTransactionalDdl = false;
|
|
33
|
+
get supportsReturning() {
|
|
34
|
+
return this.#supportsReturning;
|
|
35
|
+
}
|
|
36
|
+
get supportsTransactionalDdl() {
|
|
37
|
+
return this.#supportsTransactionalDdl;
|
|
38
|
+
}
|
|
39
|
+
async acquireMigrationLock(_) {
|
|
40
|
+
throw new Error('Not implemented');
|
|
41
|
+
}
|
|
42
|
+
async releaseMigrationLock(_) {
|
|
43
|
+
throw new Error('Not implemented');
|
|
44
|
+
}
|
|
38
45
|
}
|
|
39
46
|
const OUT_FORMAT_OBJECT = 4002;
|
|
40
47
|
let i = 0;
|
|
41
48
|
class OracleConnection {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
49
|
+
id = i++;
|
|
50
|
+
#executeOptions;
|
|
51
|
+
#connection;
|
|
52
|
+
constructor(connection, executeOptions) {
|
|
53
|
+
this.#executeOptions = executeOptions ?? {};
|
|
54
|
+
this.#connection = connection;
|
|
55
|
+
}
|
|
56
|
+
async executeQuery(compiledQuery) {
|
|
57
|
+
const { sql, bindParams } = this.formatQuery(compiledQuery);
|
|
58
|
+
const result = await this.#connection.execute(sql, bindParams, {
|
|
59
|
+
autoCommit: compiledQuery.autoCommit,
|
|
60
|
+
outFormat: OUT_FORMAT_OBJECT,
|
|
61
|
+
...this.#executeOptions,
|
|
62
|
+
});
|
|
63
|
+
return {
|
|
64
|
+
rows: result?.rows || [],
|
|
65
|
+
numAffectedRows: result.rowsAffected ? BigInt(result.rowsAffected) : undefined,
|
|
66
|
+
// @ts-ignore internal extension for Oracle returning clause
|
|
67
|
+
outBinds: result.outBinds,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
formatQuery(query) {
|
|
71
|
+
return {
|
|
72
|
+
sql: query.sql.replace(/\$(\d+)/g, (_match, p1) => `:${parseInt(p1, 10) - 1}`), // Format bind params in Oracle syntax :0, :1, etc.
|
|
73
|
+
bindParams: query.parameters,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
async *streamQuery(compiledQuery, _chunkSize) {
|
|
77
|
+
const { sql, bindParams } = this.formatQuery(compiledQuery);
|
|
78
|
+
const result = await this.#connection.execute(sql, bindParams, {
|
|
79
|
+
resultSet: true,
|
|
80
|
+
autoCommit: compiledQuery.autoCommit,
|
|
81
|
+
outFormat: OUT_FORMAT_OBJECT,
|
|
82
|
+
...this.#executeOptions,
|
|
83
|
+
});
|
|
84
|
+
const rs = result.resultSet;
|
|
85
|
+
try {
|
|
86
|
+
let row;
|
|
87
|
+
while ((row = await rs.getRow())) {
|
|
88
|
+
yield { rows: [row] };
|
|
89
|
+
}
|
|
90
|
+
} finally {
|
|
91
|
+
await rs.close();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
get connection() {
|
|
95
|
+
return this.#connection;
|
|
96
|
+
}
|
|
91
97
|
}
|
|
92
98
|
class OracleDriver {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
99
|
+
#config;
|
|
100
|
+
#connections = new Set();
|
|
101
|
+
constructor(config) {
|
|
102
|
+
this.#config = config;
|
|
103
|
+
}
|
|
104
|
+
async init() {
|
|
105
|
+
//
|
|
106
|
+
}
|
|
107
|
+
async acquireConnection() {
|
|
108
|
+
const connection = new OracleConnection(await this.#config.pool.getConnection(), this.#config.executeOptions);
|
|
109
|
+
this.#connections.add(connection);
|
|
110
|
+
return connection;
|
|
111
|
+
}
|
|
112
|
+
async savepoint(connection, savepointName, compileQuery) {
|
|
113
|
+
await connection.executeQuery(compileQuery(parseSavepointCommand('savepoint', savepointName), createQueryId()));
|
|
114
|
+
}
|
|
115
|
+
async rollbackToSavepoint(connection, savepointName, compileQuery) {
|
|
116
|
+
await connection.executeQuery(
|
|
117
|
+
compileQuery(parseSavepointCommand('rollback to savepoint', savepointName), createQueryId()),
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
async releaseSavepoint(connection, savepointName, compileQuery) {
|
|
121
|
+
//
|
|
122
|
+
}
|
|
123
|
+
async beginTransaction(connection, settings) {
|
|
124
|
+
if (settings.accessMode) {
|
|
125
|
+
await connection.executeQuery(CompiledQuery.raw(`set transaction ${settings.accessMode}`));
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
if (settings.isolationLevel) {
|
|
129
|
+
await connection.executeQuery(CompiledQuery.raw(`set transaction isolation level ${settings.isolationLevel}`));
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
async commitTransaction(connection) {
|
|
133
|
+
await connection.connection.commit();
|
|
134
|
+
}
|
|
135
|
+
async rollbackTransaction(connection) {
|
|
136
|
+
await connection.connection.rollback();
|
|
137
|
+
}
|
|
138
|
+
async releaseConnection(connection) {
|
|
139
|
+
try {
|
|
140
|
+
await connection.connection.close();
|
|
141
|
+
} catch (err) {
|
|
142
|
+
//
|
|
143
|
+
} finally {
|
|
144
|
+
this.#connections.delete(connection);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
async destroy() {
|
|
148
|
+
for (const connection of this.#connections) {
|
|
149
|
+
await this.releaseConnection(connection);
|
|
150
|
+
}
|
|
151
|
+
await this.#config.pool?.close(0);
|
|
152
|
+
}
|
|
147
153
|
}
|
|
148
154
|
export class OracleDialect {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
155
|
+
#config;
|
|
156
|
+
constructor(config) {
|
|
157
|
+
this.#config = config;
|
|
158
|
+
}
|
|
159
|
+
createDriver() {
|
|
160
|
+
return new OracleDriver(this.#config);
|
|
161
|
+
}
|
|
162
|
+
createAdapter() {
|
|
163
|
+
return new OracleAdapter();
|
|
164
|
+
}
|
|
165
|
+
createIntrospector(db) {
|
|
166
|
+
throw new Error('Not implemented');
|
|
167
|
+
}
|
|
168
|
+
createQueryCompiler() {
|
|
169
|
+
return new OracleQueryCompiler();
|
|
170
|
+
}
|
|
165
171
|
}
|
|
166
172
|
/* v8 ignore stop */
|
|
@@ -4,16 +4,16 @@ import { NativeQueryBuilder } from '../../query/NativeQueryBuilder.js';
|
|
|
4
4
|
export declare function markOutBindings(obj: Dictionary): void;
|
|
5
5
|
/** @internal */
|
|
6
6
|
export declare class OracleNativeQueryBuilder extends NativeQueryBuilder {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
as(alias: string): this;
|
|
8
|
+
compile(): {
|
|
9
|
+
sql: string;
|
|
10
|
+
params: unknown[];
|
|
11
|
+
};
|
|
12
|
+
protected compileTruncate(): void;
|
|
13
|
+
protected combineParts(): {
|
|
14
|
+
sql: string;
|
|
15
|
+
params: unknown[];
|
|
16
|
+
};
|
|
17
|
+
private compileUpsert;
|
|
18
|
+
protected compileSelect(): void;
|
|
19
19
|
}
|