@@ -91,18 +91,6 @@ public TimesTenDialect(DialectResolutionInfo info) {
91
91
super ( info );
92
92
}
93
93
94
- /*
95
- * Copyright (c) 2025, Oracle and/or its affiliates.
96
- * Licensed under the Universal Permissive License v 1.0 as shown
97
- * at http://oss.oracle.com/licenses/upl
98
- *
99
- * - Added more datatypes into columnType():
100
- * BIT, CHAR, VARCHAR, LONGVARCHAR, BINARY, VARBINARY
101
- * LONGVARBINARY, BINARY_FLOAT, BINARY_DOUBLE, TIMESTAMP,
102
- * BLOB, CLOB, NCLOB
103
- *
104
- * @Author: Carlos Blanco
105
- */
106
94
@ Override
107
95
protected String columnType (int sqlTypeCode ) {
108
96
switch ( sqlTypeCode ) {
@@ -200,22 +188,6 @@ public int getDefaultDecimalPrecision() {
200
188
return 40 ;
201
189
}
202
190
203
- /*
204
- * Copyright (c) 2025, Oracle and/or its affiliates.
205
- * Licensed under the Universal Permissive License v 1.0 as shown
206
- * at http://oss.oracle.com/licenses/upl
207
- *
208
- * - Added more SQL functions support into initializeFunctionRegistry():
209
- * lower, upper, rtrim, ltrim, length, to_char, chr, instr, instrb,
210
- * lpad, rpad, substr, substrb, substring, str, soundex, replace,
211
- * to_date, sysdate, getdate, current_date, current_time, current_timestamp,
212
- * to_timestamp, add_months, months_between, abs, acos, asin, atan, atan2,
213
- * ceil, cos, cosh, exp, ln, sin, sign, sinh, mod, round, trunc, tan, tanh,
214
- * floor, power, bitnot, bitor, bitxor, nvl, user, rowid, uid, rownum,
215
- * vsize, SESSION_USER, SYSTEM_USER, CURRENT_USER
216
- *
217
- * @Author: Carlos Blanco
218
- */
219
191
@ Override
220
192
public void initializeFunctionRegistry (FunctionContributions functionContributions ) {
221
193
super .initializeFunctionRegistry (functionContributions );
@@ -232,16 +204,10 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
232
204
233
205
// String Functions
234
206
functionContributions .getFunctionRegistry ().register (
235
- "lower " , new StandardSQLFunction ("lower" )
207
+ "rtrim " , new StandardSQLFunction ("rtrim" , StandardBasicTypes . STRING )
236
208
);
237
209
functionContributions .getFunctionRegistry ().register (
238
- "upper" , new StandardSQLFunction ("upper" )
239
- );
240
- functionContributions .getFunctionRegistry ().register (
241
- "rtrim" , new StandardSQLFunction ("rtrim" )
242
- );
243
- functionContributions .getFunctionRegistry ().register (
244
- "ltrim" , new StandardSQLFunction ("ltrim" )
210
+ "ltrim" , new StandardSQLFunction ("ltrim" , StandardBasicTypes .STRING )
245
211
);
246
212
functionContributions .getFunctionRegistry ().register (
247
213
"length" , new StandardSQLFunction ("length" , StandardBasicTypes .LONG )
@@ -250,40 +216,16 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
250
216
functionContributions .getFunctionRegistry ().register (
251
217
"to_char" , new StandardSQLFunction ("to_char" , StandardBasicTypes .STRING )
252
218
);
253
- functionContributions .getFunctionRegistry ().register (
254
- "chr" , new StandardSQLFunction ("chr" , StandardBasicTypes .CHARACTER )
255
- );
256
- functionContributions .getFunctionRegistry ().register (
257
- "instr" , new StandardSQLFunction ("instr" , StandardBasicTypes .INTEGER )
258
- );
259
- functionContributions .getFunctionRegistry ().register (
260
- "instrb" , new StandardSQLFunction ("instrb" , StandardBasicTypes .INTEGER )
261
- );
262
- functionContributions .getFunctionRegistry ().register (
263
- "lpad" , new StandardSQLFunction ("lpad" , StandardBasicTypes .STRING )
264
- );
265
- functionContributions .getFunctionRegistry ().register (
266
- "rpad" , new StandardSQLFunction ("rpad" , StandardBasicTypes .STRING )
267
- );
268
- functionContributions .getFunctionRegistry ().register (
269
- "substr" , new StandardSQLFunction ("substr" , StandardBasicTypes .STRING )
270
- );
271
- functionContributions .getFunctionRegistry ().register (
272
- "substrb" , new StandardSQLFunction ("substrb" , StandardBasicTypes .STRING )
273
- );
274
- functionContributions .getFunctionRegistry ().register (
275
- "substring" , new StandardSQLFunction ( "substr" , StandardBasicTypes .STRING )
276
- );
277
- functionFactory .locate ();
219
+ functionFactory .char_chr ();
220
+ functionFactory .instr ();
221
+ functionFactory .substr ();
278
222
functionContributions .getFunctionRegistry ().register (
279
223
"str" , new StandardSQLFunction ("to_char" , StandardBasicTypes .STRING )
280
224
);
281
225
functionContributions .getFunctionRegistry ().register (
282
- "soundex" , new StandardSQLFunction ("soundex" )
283
- );
284
- functionContributions .getFunctionRegistry ().register (
285
- "replace" , new StandardSQLFunction ("replace" , StandardBasicTypes .STRING )
226
+ "substring" , new StandardSQLFunction ( "substr" , StandardBasicTypes .STRING )
286
227
);
228
+ functionFactory .soundex ();
287
229
288
230
// Date/Time Functions
289
231
functionContributions .getFunctionRegistry ().register (
@@ -318,72 +260,21 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
318
260
);
319
261
320
262
// Math functions
321
- functionContributions .getFunctionRegistry ().register (
322
- "abs" , new StandardSQLFunction ("abs" )
323
- );
324
- functionContributions .getFunctionRegistry ().register (
325
- "acos" , new StandardSQLFunction ("acos" )
326
- );
327
- functionContributions .getFunctionRegistry ().register (
328
- "asin" , new StandardSQLFunction ("asin" )
329
- );
330
- functionContributions .getFunctionRegistry ().register (
331
- "atan" , new StandardSQLFunction ("atan" )
332
- );
333
- functionContributions .getFunctionRegistry ().register (
334
- "atan2" , new StandardSQLFunction ("atan2" )
335
- );
336
- functionContributions .getFunctionRegistry ().register (
337
- "ceil" , new StandardSQLFunction ("ceil" )
338
- );
339
- functionContributions .getFunctionRegistry ().register (
340
- "cos" , new StandardSQLFunction ("cos" )
341
- );
342
- functionContributions .getFunctionRegistry ().register (
343
- "cosh" , new StandardSQLFunction ("cosh" )
344
- );
345
- functionContributions .getFunctionRegistry ().register (
346
- "exp" , new StandardSQLFunction ("exp" )
347
- );
348
- functionContributions .getFunctionRegistry ().register (
349
- "ln" , new StandardSQLFunction ("ln" )
350
- );
351
- functionFactory .log ();
352
- functionContributions .getFunctionRegistry ().register (
353
- "sin" , new StandardSQLFunction ("sin" )
354
- );
355
- functionContributions .getFunctionRegistry ().register (
356
- "sign" , new StandardSQLFunction ("sign" , StandardBasicTypes .INTEGER )
357
- );
358
- functionContributions .getFunctionRegistry ().register (
359
- "sinh" , new StandardSQLFunction ("sinh" )
360
- );
361
- functionContributions .getFunctionRegistry ().register (
362
- "mod" , new StandardSQLFunction ("mod" )
363
- );
364
- functionContributions .getFunctionRegistry ().register (
365
- "round" , new StandardSQLFunction ("round" )
366
- );
263
+ functionFactory .ceiling_ceil ();
264
+ functionFactory .radians_acos ();
265
+ functionFactory .degrees_acos ();
266
+ functionFactory .sinh ();
267
+ functionFactory .tanh ();
367
268
functionContributions .getFunctionRegistry ().register (
368
269
"trunc" , new StandardSQLFunction ("trunc" )
369
270
);
370
271
functionContributions .getFunctionRegistry ().register (
371
- "tan" , new StandardSQLFunction ("tan" )
372
- );
373
- functionContributions .getFunctionRegistry ().register (
374
- "tanh" , new StandardSQLFunction ("tanh" )
375
- );
376
- functionContributions .getFunctionRegistry ().register (
377
- "floor" , new StandardSQLFunction ("floor" )
378
- );
379
- functionContributions .getFunctionRegistry ().register (
380
- "power" , new StandardSQLFunction ("power" , StandardBasicTypes .FLOAT )
272
+ "round" , new StandardSQLFunction ("round" )
381
273
);
382
274
383
275
// Bitwise functions
384
- functionFactory .bitand ();
385
276
functionContributions .getFunctionRegistry ().register (
386
- "bitnot" , new StandardSQLFunction ("bitnot" )
277
+ "bitnot" , new StandardSQLFunction ("bitnot" , StandardBasicTypes . INTEGER )
387
278
);
388
279
389
280
functionContributions .getFunctionRegistry ()
@@ -404,7 +295,6 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
404
295
functionContributions .getFunctionRegistry ().register (
405
296
"nvl" , new StandardSQLFunction ("nvl" )
406
297
);
407
- functionFactory .coalesce ();
408
298
functionContributions .getFunctionRegistry ().register (
409
299
"user" , new CurrentFunction ("user" , "user" , stringType )
410
300
);
@@ -418,7 +308,7 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
418
308
"rownum" , new CurrentFunction ("rownum" , "rownum" , longType )
419
309
);
420
310
functionContributions .getFunctionRegistry ().register (
421
- "vsize" , new StandardSQLFunction ("vsize" )
311
+ "vsize" , new StandardSQLFunction ("vsize" , StandardBasicTypes . DOUBLE )
422
312
);
423
313
functionContributions .getFunctionRegistry ().register (
424
314
"SESSION_USER" , new CurrentFunction ("SESSION_USER" ,"SESSION_USER" , stringType )
@@ -509,15 +399,6 @@ public RowLockStrategy getWriteRowLockStrategy() {
509
399
}
510
400
511
401
512
- /*
513
- * Copyright (c) 2025, Oracle and/or its affiliates.
514
- * Licensed under the Universal Permissive License v 1.0 as shown
515
- * at http://oss.oracle.com/licenses/upl
516
- *
517
- * - Updated the custom definition for 'getForUpdateString()'
518
- *
519
- * @Author: Carlos Blanco
520
- */
521
402
@ Override
522
403
public String getForUpdateString () {
523
404
return " for update" ;
@@ -693,24 +574,6 @@ public String getSelectClauseNullString(int sqlType, TypeConfiguration typeConfi
693
574
}
694
575
}
695
576
696
- /*
697
- * Copyright (c) 2025, Oracle and/or its affiliates.
698
- * Licensed under the Universal Permissive License v 1.0 as shown
699
- * at http://oss.oracle.com/licenses/upl
700
- *
701
- * - Added a custom definition for 'getNativeIdentifierGeneratorStrategy()'
702
- * - Added a custom definition for 'currentDate()'
703
- * - Added a custom definition for 'currentTime()'
704
- * - Added a custom definition for 'getMaxVarcharLength()'
705
- * - Added a custom definition for 'getMaxVarbinaryLength()'
706
- * - Added a custom definition for 'isEmptyStringTreatedAsNull()'
707
- * - Added a custom definition for 'supportsTupleDistinctCounts()'
708
- * - Added a custom definition for 'getDual()'
709
- * - Added a custom definition for 'getFromDualForSelectOnly()'
710
- *
711
- * @Author: Carlos Blanco
712
- */
713
-
714
577
@ Override
715
578
public String getNativeIdentifierGeneratorStrategy () {
716
579
return "sequence" ;
@@ -748,10 +611,12 @@ public boolean supportsTupleDistinctCounts() {
748
611
return false ;
749
612
}
750
613
614
+ @ Override
751
615
public String getDual () {
752
616
return "dual" ;
753
617
}
754
618
619
+ @ Override
755
620
public String getFromDualForSelectOnly () {
756
621
return " from dual" ;
757
622
}
0 commit comments