@mikro-orm/oracledb 7.0.8 → 7.0.9-dev.1

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/OraclePlatform.js CHANGED
@@ -1,309 +1,294 @@
1
- import {
2
- AbstractSqlPlatform,
3
- ALIAS_REPLACEMENT,
4
- DoubleType,
5
- FloatType,
6
- markOutBindings,
7
- OracleNativeQueryBuilder,
8
- raw,
9
- Type,
10
- Utils,
11
- } from '@mikro-orm/sql';
1
+ import { AbstractSqlPlatform, ALIAS_REPLACEMENT, DoubleType, FloatType, markOutBindings, OracleNativeQueryBuilder, raw, Type, Utils, } from '@mikro-orm/sql';
12
2
  import oracledb from 'oracledb';
13
3
  import { OracleSchemaHelper } from './OracleSchemaHelper.js';
14
4
  import { OracleExceptionConverter } from './OracleExceptionConverter.js';
15
5
  import { OracleSchemaGenerator } from './OracleSchemaGenerator.js';
16
6
  const ORACLE_TYPE_MAP = {
17
- string: oracledb.DB_TYPE_VARCHAR,
18
- number: oracledb.DB_TYPE_NUMBER,
19
- Date: oracledb.DB_TYPE_DATE,
20
- boolean: oracledb.DB_TYPE_BOOLEAN,
21
- buffer: oracledb.DB_TYPE_RAW,
22
- Buffer: oracledb.DB_TYPE_RAW,
23
- out: oracledb.BIND_OUT,
7
+ string: oracledb.DB_TYPE_VARCHAR,
8
+ number: oracledb.DB_TYPE_NUMBER,
9
+ Date: oracledb.DB_TYPE_DATE,
10
+ boolean: oracledb.DB_TYPE_BOOLEAN,
11
+ buffer: oracledb.DB_TYPE_RAW,
12
+ Buffer: oracledb.DB_TYPE_RAW,
13
+ out: oracledb.BIND_OUT,
24
14
  };
25
15
  /** Platform implementation for Oracle Database. */
26
16
  export class OraclePlatform extends AbstractSqlPlatform {
27
- schemaHelper = new OracleSchemaHelper(this);
28
- exceptionConverter = new OracleExceptionConverter();
29
- #jsonTypeCasts = {
30
- string: 'varchar2(4000)',
31
- number: 'number',
32
- bigint: 'number',
33
- boolean: 'number',
34
- };
35
- /** @inheritDoc */
36
- lookupExtensions(orm) {
37
- OracleSchemaGenerator.register(orm);
38
- }
39
- getRollbackToSavepointSQL(savepointName) {
40
- return `rollback to savepoint ${this.quoteIdentifier(savepointName)}`;
41
- }
42
- getSavepointSQL(savepointName) {
43
- return `savepoint ${this.quoteIdentifier(savepointName)}`;
44
- }
45
- getBeginTransactionSQL(options) {
46
- const parts = [];
47
- if (options?.isolationLevel) {
48
- parts.push(`isolation level ${options.isolationLevel}`);
49
- }
50
- if (options?.readOnly) {
51
- parts.push('read only');
52
- }
53
- if (parts.length > 0) {
54
- return [`set transaction ${parts.join(' ')}`];
55
- }
56
- return ['begin'];
57
- }
58
- usesAsKeyword() {
59
- return false;
60
- }
61
- compareUuids() {
62
- return 'any';
63
- }
64
- convertUuidToJSValue(value) {
65
- const hex = value.toString('hex');
66
- return (
67
- hex.slice(0, 8) + '-' + hex.slice(8, 12) + '-' + hex.slice(12, 16) + '-' + hex.slice(16, 20) + '-' + hex.slice(20)
68
- );
69
- }
70
- convertUuidToDatabaseValue(value) {
71
- if (Buffer.isBuffer(value)) {
72
- return value;
73
- }
74
- if (typeof value !== 'string') {
75
- return value;
76
- }
77
- return Buffer.from(value.replaceAll('-', ''), 'hex');
78
- }
79
- /** @internal */
80
- createNativeQueryBuilder() {
81
- return new OracleNativeQueryBuilder(this);
82
- }
83
- usesOutputStatement() {
84
- return false;
85
- }
86
- usesReturningStatement() {
87
- return true;
88
- }
89
- convertsJsonAutomatically() {
90
- return true;
91
- }
92
- indexForeignKeys() {
93
- return false;
94
- }
95
- supportsSchemas() {
96
- return true;
97
- }
98
- getCurrentTimestampSQL(length) {
99
- return `current_timestamp`;
100
- }
101
- getDateTimeTypeDeclarationSQL(column) {
102
- return 'timestamp' + (column.length != null ? `(${column.length})` : '') + ' with time zone';
103
- }
104
- getDefaultDateTimeLength() {
105
- return 6;
106
- }
107
- getFloatDeclarationSQL() {
108
- return 'binary_float';
109
- }
110
- getDoubleDeclarationSQL() {
111
- return 'binary_double';
112
- }
113
- getDecimalTypeDeclarationSQL(column) {
114
- return `number(${column.precision ?? 10}, ${column.scale ?? 0})`;
115
- }
116
- getBooleanTypeDeclarationSQL() {
117
- return 'boolean';
118
- }
119
- getRegExpOperator() {
120
- return 'regexp_like';
121
- }
122
- mapRegExpCondition(mappedKey, value) {
123
- const quotedKey = this.quoteIdentifier(mappedKey);
124
- /* v8 ignore next: $flags branch */
125
- const quotedFlags = value.$flags ? `, ${this.quoteValue(value.$flags)}` : '';
126
- return { sql: `regexp_like(${quotedKey}, ?${quotedFlags})`, params: [value.$re] };
127
- }
128
- getBlobDeclarationSQL() {
129
- return 'blob';
130
- }
131
- getJsonDeclarationSQL() {
132
- return 'json';
133
- }
134
- getDefaultSchemaName() {
135
- return this.config.get('dbName');
136
- }
137
- getVarcharTypeDeclarationSQL(column) {
138
- return `varchar2(${column.length ?? this.getDefaultVarcharLength()})`;
139
- }
140
- getDateTypeDeclarationSQL(length) {
141
- return this.getVarcharTypeDeclarationSQL({ length: length ?? 10 });
142
- }
143
- getTimeTypeDeclarationSQL(length) {
144
- return this.getVarcharTypeDeclarationSQL({ length: length ?? 8 });
145
- }
146
- getIntegerTypeDeclarationSQL(column) {
147
- return `number(${column.length ?? 10}, 0)`;
148
- }
149
- /**
150
- * @inheritDoc
151
- */
152
- getBigIntTypeDeclarationSQL(column) {
153
- return this.getIntegerTypeDeclarationSQL({ ...column, length: column.length ?? 19 });
154
- }
155
- getMediumIntTypeDeclarationSQL(column) {
156
- return this.getIntegerTypeDeclarationSQL({ ...column, length: column.length ?? 7 });
157
- }
158
- getTinyIntTypeDeclarationSQL(column) {
159
- return this.getIntegerTypeDeclarationSQL({ ...column, length: column.length ?? 3 });
160
- }
161
- getSmallIntTypeDeclarationSQL(column) {
162
- return this.getIntegerTypeDeclarationSQL({ ...column, length: column.length ?? 5 });
163
- }
164
- getArrayDeclarationSQL() {
165
- return 'clob';
166
- }
167
- getEnumTypeDeclarationSQL(column) {
168
- if (column.items?.every(item => typeof item === 'string')) {
169
- const length = column.length ?? Math.max(...column.items.map(item => item.length));
170
- return this.getVarcharTypeDeclarationSQL({ length });
171
- }
172
- return this.getSmallIntTypeDeclarationSQL(column);
173
- }
174
- getTextTypeDeclarationSQL(_column) {
175
- return 'clob';
176
- }
177
- normalizeColumnType(type, options) {
178
- const simpleType = this.extractSimpleType(type);
179
- // Oracle uses 'number' for all numeric types including integer, decimal, etc.
180
- if (['decimal', 'numeric', 'number'].includes(simpleType)) {
181
- return this.getDecimalTypeDeclarationSQL(options);
182
- }
183
- if (['real'].includes(simpleType)) {
184
- return this.getFloatDeclarationSQL();
185
- }
186
- return super.normalizeColumnType(type, options);
187
- }
188
- getDefaultMappedType(type) {
189
- if (type.startsWith('float')) {
190
- const len = /float\((\d+)\)/.exec(type)?.[1] ?? 24;
191
- return +len > 24 ? Type.getType(DoubleType) : Type.getType(FloatType);
192
- }
193
- const normalizedType = this.extractSimpleType(type);
194
- const map = {
195
- int: 'integer',
196
- real: 'float',
197
- raw: 'uuid',
198
- binary_float: 'float',
199
- binary_double: 'double',
200
- nvarchar2: 'string',
201
- nclob: 'text',
17
+ schemaHelper = new OracleSchemaHelper(this);
18
+ exceptionConverter = new OracleExceptionConverter();
19
+ #jsonTypeCasts = {
20
+ string: 'varchar2(4000)',
21
+ number: 'number',
22
+ bigint: 'number',
23
+ boolean: 'number',
202
24
  };
203
- return super.getDefaultMappedType(map[normalizedType] ?? type);
204
- }
205
- getUuidTypeDeclarationSQL(column) {
206
- return 'raw(16)';
207
- }
208
- /* v8 ignore next 3: Oracle overrides all callers but this is part of the platform contract */
209
- usesCascadeStatement() {
210
- return true;
211
- }
212
- getSearchJsonPropertyKey(path, type, aliased, value) {
213
- const [a, ...b] = path;
214
- const root = this.quoteIdentifier(aliased ? `${ALIAS_REPLACEMENT}.${a}` : a);
215
- if (b.length === 0) {
216
- return raw(`json_equal(${root}, json(?))`, [value]);
217
- }
218
- return raw(`json_value(${root}, '$.${b.map(this.quoteJsonKey).join('.')}')`);
219
- }
220
- processJsonCondition(o, value, path, alias) {
221
- if (Utils.isPlainObject(value) && !Object.keys(value).some(k => Utils.isOperator(k))) {
222
- Utils.keys(value).forEach(k => {
223
- this.processJsonCondition(o, value[k], [...path, k], alias);
224
- });
225
- return o;
226
- }
227
- if (Utils.isPlainObject(value) && Object.keys(value)[0] === '$eq') {
228
- value = value.$eq;
229
- }
230
- const type = this.getJsonValueType(value);
231
- const k = this.getSearchJsonPropertyKey(path, type, alias, value);
232
- /* v8 ignore next: root-level JSON equality branch */
233
- o[k] = path.length > 1 ? value : [];
234
- return o;
235
- }
236
- getJsonArrayFromSQL(column, alias, properties) {
237
- const columns = properties
238
- .map(
239
- p =>
240
- `${this.quoteIdentifier(p.name)} ${this.#jsonTypeCasts[p.type] ?? 'varchar2(4000)'} path '$.${this.quoteJsonKey(p.name)}'`,
241
- )
242
- .join(', ');
243
- return `json_table(${column}, '$[*]' columns (${columns})) ${this.quoteIdentifier(alias)}`;
244
- }
245
- usesEnumCheckConstraints() {
246
- return true;
247
- }
248
- supportsMultipleCascadePaths() {
249
- return false;
250
- }
251
- /** @inheritDoc */
252
- supportsOnUpdate() {
253
- return false;
254
- }
255
- supportsMultipleStatements() {
256
- return false;
257
- }
258
- quoteIdentifier(id) {
259
- return super.quoteIdentifier(id, '"');
260
- }
261
- escape(value) {
262
- if (value === null) {
263
- return 'null';
264
- }
265
- if (Array.isArray(value)) {
266
- return value.map(v => this.escape(v)).join(', ');
267
- }
268
- if (typeof value === 'string') {
269
- if (value.includes(`'`)) {
270
- return `'${value.replaceAll(`'`, `''`)}'`;
271
- }
272
- return `'${value}'`;
273
- }
274
- if (Buffer.isBuffer(value)) {
275
- return `hextoraw('${value.toString('hex')}')`;
276
- }
277
- if (value instanceof Date) {
278
- return `timestamp '${value.toISOString().replace('T', ' ').substring(0, 23)} UTC'`;
279
- }
280
- return super.escape(value);
281
- }
282
- getSchemaGenerator(driver, em) {
283
- return new OracleSchemaGenerator(em ?? driver);
284
- }
285
- allowsComparingTuples() {
286
- return false;
287
- }
288
- getDefaultClientUrl() {
289
- return 'localhost:1521/freepdb1';
290
- }
291
- /** @internal */
292
- mapToBindType(type) {
293
- return this.mapToOracleType(type);
294
- }
295
- mapToOracleType(type) {
296
- return ORACLE_TYPE_MAP[type] ?? oracledb.DB_TYPE_VARCHAR;
297
- }
298
- createOutBindings(map) {
299
- const outBindings = {};
300
- markOutBindings(outBindings);
301
- for (const key of Object.keys(map)) {
302
- outBindings[key] = {
303
- dir: oracledb.BIND_OUT,
304
- type: this.mapToOracleType(map[key]),
305
- };
306
- }
307
- return outBindings;
308
- }
25
+ /** @inheritDoc */
26
+ lookupExtensions(orm) {
27
+ OracleSchemaGenerator.register(orm);
28
+ }
29
+ getRollbackToSavepointSQL(savepointName) {
30
+ return `rollback to savepoint ${this.quoteIdentifier(savepointName)}`;
31
+ }
32
+ getSavepointSQL(savepointName) {
33
+ return `savepoint ${this.quoteIdentifier(savepointName)}`;
34
+ }
35
+ getBeginTransactionSQL(options) {
36
+ const parts = [];
37
+ if (options?.isolationLevel) {
38
+ parts.push(`isolation level ${options.isolationLevel}`);
39
+ }
40
+ if (options?.readOnly) {
41
+ parts.push('read only');
42
+ }
43
+ if (parts.length > 0) {
44
+ return [`set transaction ${parts.join(' ')}`];
45
+ }
46
+ return ['begin'];
47
+ }
48
+ usesAsKeyword() {
49
+ return false;
50
+ }
51
+ compareUuids() {
52
+ return 'any';
53
+ }
54
+ convertUuidToJSValue(value) {
55
+ const hex = value.toString('hex');
56
+ return (hex.slice(0, 8) + '-' + hex.slice(8, 12) + '-' + hex.slice(12, 16) + '-' + hex.slice(16, 20) + '-' + hex.slice(20));
57
+ }
58
+ convertUuidToDatabaseValue(value) {
59
+ if (Buffer.isBuffer(value)) {
60
+ return value;
61
+ }
62
+ if (typeof value !== 'string') {
63
+ return value;
64
+ }
65
+ return Buffer.from(value.replaceAll('-', ''), 'hex');
66
+ }
67
+ /** @internal */
68
+ createNativeQueryBuilder() {
69
+ return new OracleNativeQueryBuilder(this);
70
+ }
71
+ usesOutputStatement() {
72
+ return false;
73
+ }
74
+ usesReturningStatement() {
75
+ return true;
76
+ }
77
+ convertsJsonAutomatically() {
78
+ return true;
79
+ }
80
+ indexForeignKeys() {
81
+ return false;
82
+ }
83
+ supportsSchemas() {
84
+ return true;
85
+ }
86
+ getCurrentTimestampSQL(length) {
87
+ return `current_timestamp`;
88
+ }
89
+ getDateTimeTypeDeclarationSQL(column) {
90
+ return 'timestamp' + (column.length != null ? `(${column.length})` : '') + ' with time zone';
91
+ }
92
+ getDefaultDateTimeLength() {
93
+ return 6;
94
+ }
95
+ getFloatDeclarationSQL() {
96
+ return 'binary_float';
97
+ }
98
+ getDoubleDeclarationSQL() {
99
+ return 'binary_double';
100
+ }
101
+ getDecimalTypeDeclarationSQL(column) {
102
+ return `number(${column.precision ?? 10}, ${column.scale ?? 0})`;
103
+ }
104
+ getBooleanTypeDeclarationSQL() {
105
+ return 'boolean';
106
+ }
107
+ getRegExpOperator() {
108
+ return 'regexp_like';
109
+ }
110
+ mapRegExpCondition(mappedKey, value) {
111
+ const quotedKey = this.quoteIdentifier(mappedKey);
112
+ /* v8 ignore next: $flags branch */
113
+ const quotedFlags = value.$flags ? `, ${this.quoteValue(value.$flags)}` : '';
114
+ return { sql: `regexp_like(${quotedKey}, ?${quotedFlags})`, params: [value.$re] };
115
+ }
116
+ getBlobDeclarationSQL() {
117
+ return 'blob';
118
+ }
119
+ getJsonDeclarationSQL() {
120
+ return 'json';
121
+ }
122
+ getDefaultSchemaName() {
123
+ return this.config.get('dbName');
124
+ }
125
+ getVarcharTypeDeclarationSQL(column) {
126
+ return `varchar2(${column.length ?? this.getDefaultVarcharLength()})`;
127
+ }
128
+ getDateTypeDeclarationSQL(length) {
129
+ return this.getVarcharTypeDeclarationSQL({ length: length ?? 10 });
130
+ }
131
+ getTimeTypeDeclarationSQL(length) {
132
+ return this.getVarcharTypeDeclarationSQL({ length: length ?? 8 });
133
+ }
134
+ getIntegerTypeDeclarationSQL(column) {
135
+ return `number(${column.length ?? 10}, 0)`;
136
+ }
137
+ /**
138
+ * @inheritDoc
139
+ */
140
+ getBigIntTypeDeclarationSQL(column) {
141
+ return this.getIntegerTypeDeclarationSQL({ ...column, length: column.length ?? 19 });
142
+ }
143
+ getMediumIntTypeDeclarationSQL(column) {
144
+ return this.getIntegerTypeDeclarationSQL({ ...column, length: column.length ?? 7 });
145
+ }
146
+ getTinyIntTypeDeclarationSQL(column) {
147
+ return this.getIntegerTypeDeclarationSQL({ ...column, length: column.length ?? 3 });
148
+ }
149
+ getSmallIntTypeDeclarationSQL(column) {
150
+ return this.getIntegerTypeDeclarationSQL({ ...column, length: column.length ?? 5 });
151
+ }
152
+ getArrayDeclarationSQL() {
153
+ return 'clob';
154
+ }
155
+ getEnumTypeDeclarationSQL(column) {
156
+ if (column.items?.every(item => typeof item === 'string')) {
157
+ const length = column.length ?? Math.max(...column.items.map(item => item.length));
158
+ return this.getVarcharTypeDeclarationSQL({ length });
159
+ }
160
+ return this.getSmallIntTypeDeclarationSQL(column);
161
+ }
162
+ getTextTypeDeclarationSQL(_column) {
163
+ return 'clob';
164
+ }
165
+ normalizeColumnType(type, options) {
166
+ const simpleType = this.extractSimpleType(type);
167
+ // Oracle uses 'number' for all numeric types including integer, decimal, etc.
168
+ if (['decimal', 'numeric', 'number'].includes(simpleType)) {
169
+ return this.getDecimalTypeDeclarationSQL(options);
170
+ }
171
+ if (['real'].includes(simpleType)) {
172
+ return this.getFloatDeclarationSQL();
173
+ }
174
+ return super.normalizeColumnType(type, options);
175
+ }
176
+ getDefaultMappedType(type) {
177
+ if (type.startsWith('float')) {
178
+ const len = /float\((\d+)\)/.exec(type)?.[1] ?? 24;
179
+ return +len > 24 ? Type.getType(DoubleType) : Type.getType(FloatType);
180
+ }
181
+ const normalizedType = this.extractSimpleType(type);
182
+ const map = {
183
+ int: 'integer',
184
+ real: 'float',
185
+ raw: 'uuid',
186
+ binary_float: 'float',
187
+ binary_double: 'double',
188
+ nvarchar2: 'string',
189
+ nclob: 'text',
190
+ };
191
+ return super.getDefaultMappedType(map[normalizedType] ?? type);
192
+ }
193
+ getUuidTypeDeclarationSQL(column) {
194
+ return 'raw(16)';
195
+ }
196
+ /* v8 ignore next 3: Oracle overrides all callers but this is part of the platform contract */
197
+ usesCascadeStatement() {
198
+ return true;
199
+ }
200
+ getSearchJsonPropertyKey(path, type, aliased, value) {
201
+ const [a, ...b] = path;
202
+ const root = this.quoteIdentifier(aliased ? `${ALIAS_REPLACEMENT}.${a}` : a);
203
+ if (b.length === 0) {
204
+ return raw(`json_equal(${root}, json(?))`, [value]);
205
+ }
206
+ return raw(`json_value(${root}, '$.${b.map(this.quoteJsonKey).join('.')}')`);
207
+ }
208
+ processJsonCondition(o, value, path, alias) {
209
+ if (Utils.isPlainObject(value) && !Object.keys(value).some(k => Utils.isOperator(k))) {
210
+ Utils.keys(value).forEach(k => {
211
+ this.processJsonCondition(o, value[k], [...path, k], alias);
212
+ });
213
+ return o;
214
+ }
215
+ if (Utils.isPlainObject(value) && Object.keys(value)[0] === '$eq') {
216
+ value = value.$eq;
217
+ }
218
+ const type = this.getJsonValueType(value);
219
+ const k = this.getSearchJsonPropertyKey(path, type, alias, value);
220
+ /* v8 ignore next: root-level JSON equality branch */
221
+ o[k] = path.length > 1 ? value : [];
222
+ return o;
223
+ }
224
+ getJsonArrayFromSQL(column, alias, properties) {
225
+ const columns = properties
226
+ .map(p => `${this.quoteIdentifier(p.name)} ${this.#jsonTypeCasts[p.type] ?? 'varchar2(4000)'} path '$.${this.quoteJsonKey(p.name)}'`)
227
+ .join(', ');
228
+ return `json_table(${column}, '$[*]' columns (${columns})) ${this.quoteIdentifier(alias)}`;
229
+ }
230
+ usesEnumCheckConstraints() {
231
+ return true;
232
+ }
233
+ supportsMultipleCascadePaths() {
234
+ return false;
235
+ }
236
+ /** @inheritDoc */
237
+ supportsOnUpdate() {
238
+ return false;
239
+ }
240
+ supportsMultipleStatements() {
241
+ return false;
242
+ }
243
+ quoteIdentifier(id) {
244
+ return super.quoteIdentifier(id, '"');
245
+ }
246
+ escape(value) {
247
+ if (value === null) {
248
+ return 'null';
249
+ }
250
+ if (Array.isArray(value)) {
251
+ return value.map(v => this.escape(v)).join(', ');
252
+ }
253
+ if (typeof value === 'string') {
254
+ if (value.includes(`'`)) {
255
+ return `'${value.replaceAll(`'`, `''`)}'`;
256
+ }
257
+ return `'${value}'`;
258
+ }
259
+ if (Buffer.isBuffer(value)) {
260
+ return `hextoraw('${value.toString('hex')}')`;
261
+ }
262
+ if (value instanceof Date) {
263
+ return `timestamp '${value.toISOString().replace('T', ' ').substring(0, 23)} UTC'`;
264
+ }
265
+ return super.escape(value);
266
+ }
267
+ getSchemaGenerator(driver, em) {
268
+ return new OracleSchemaGenerator(em ?? driver);
269
+ }
270
+ allowsComparingTuples() {
271
+ return false;
272
+ }
273
+ getDefaultClientUrl() {
274
+ return 'localhost:1521/freepdb1';
275
+ }
276
+ /** @internal */
277
+ mapToBindType(type) {
278
+ return this.mapToOracleType(type);
279
+ }
280
+ mapToOracleType(type) {
281
+ return ORACLE_TYPE_MAP[type] ?? oracledb.DB_TYPE_VARCHAR;
282
+ }
283
+ createOutBindings(map) {
284
+ const outBindings = {};
285
+ markOutBindings(outBindings);
286
+ for (const key of Object.keys(map)) {
287
+ outBindings[key] = {
288
+ dir: oracledb.BIND_OUT,
289
+ type: this.mapToOracleType(map[key]),
290
+ };
291
+ }
292
+ return outBindings;
293
+ }
309
294
  }
@@ -1,28 +1,10 @@
1
- import {
2
- type AnyEntity,
3
- type Dictionary,
4
- type EntityMetadata,
5
- type LockMode,
6
- type RequiredEntityData,
7
- } from '@mikro-orm/core';
1
+ import { type AnyEntity, type Dictionary, type EntityMetadata, type LockMode, type RequiredEntityData } from '@mikro-orm/core';
8
2
  import { type InsertQueryBuilder, type NativeQueryBuilder, type Field, QueryBuilder } from '@mikro-orm/sql';
9
3
  /** Query builder with Oracle-specific behavior such as RETURNING clause handling and lock table conversion. */
10
- export declare class OracleQueryBuilder<
11
- Entity extends object = AnyEntity,
12
- RootAlias extends string = never,
13
- Hint extends string = never,
14
- Context extends object = never,
15
- > extends QueryBuilder<Entity, RootAlias, Hint, Context> {
16
- insert(
17
- data: RequiredEntityData<Entity> | RequiredEntityData<Entity>[],
18
- ): InsertQueryBuilder<Entity, RootAlias, Context>;
19
- setLockMode(mode?: LockMode, tables?: string[]): this;
20
- getNativeQuery(processVirtualEntity?: boolean): NativeQueryBuilder;
21
- private convertLockTablesToColumnRefs;
22
- protected processReturningStatement(
23
- qb: NativeQueryBuilder,
24
- meta?: EntityMetadata,
25
- data?: Dictionary,
26
- returning?: Field<any>[],
27
- ): void;
4
+ export declare class OracleQueryBuilder<Entity extends object = AnyEntity, RootAlias extends string = never, Hint extends string = never, Context extends object = never> extends QueryBuilder<Entity, RootAlias, Hint, Context> {
5
+ insert(data: RequiredEntityData<Entity> | RequiredEntityData<Entity>[]): InsertQueryBuilder<Entity, RootAlias, Context>;
6
+ setLockMode(mode?: LockMode, tables?: string[]): this;
7
+ getNativeQuery(processVirtualEntity?: boolean): NativeQueryBuilder;
8
+ private convertLockTablesToColumnRefs;
9
+ protected processReturningStatement(qb: NativeQueryBuilder, meta?: EntityMetadata, data?: Dictionary, returning?: Field<any>[]): void;
28
10
  }