File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
hibernate-community-dialects/src/main/java/org/hibernate/community/dialect
main/java/org/hibernate/dialect/function
test/java/org/hibernate/orm/test/query/hql Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -367,6 +367,8 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
367367 final TypeConfiguration typeConfiguration = functionContributions .getTypeConfiguration ();
368368 final BasicType <String > stringBasicType =
369369 typeConfiguration .getBasicTypeRegistry ().resolve ( StandardBasicTypes .STRING );
370+ final BasicType <Boolean > booleanBasicType =
371+ typeConfiguration .getBasicTypeRegistry ().resolve ( StandardBasicTypes .BOOLEAN );
370372
371373 functionRegistry .registerAlternateKey ( "var_samp" , "variance" );
372374
@@ -408,6 +410,12 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
408410 // parameter arguments to trim() require a cast
409411 functionContributions .getFunctionRegistry ().register ( "trim" ,
410412 new TrimFunction ( this , typeConfiguration , SqlAstNodeRenderingMode .NO_UNTYPED ) );
413+
414+ //TODO: emulate support for the 'i' flag argument
415+ functionRegistry .namedDescriptorBuilder ( "regexp_like" , "regex_match" )
416+ .setParameterTypes ( STRING , STRING )
417+ .setInvariantType ( booleanBasicType )
418+ .register ();
411419 }
412420
413421 @ Override
Original file line number Diff line number Diff line change @@ -2671,7 +2671,6 @@ public void regexpLike() {
26712671 .setParameterTypes ( STRING , STRING , STRING )
26722672 .setInvariantType ( booleanType )
26732673 .register ();
2674-
26752674 }
26762675
26772676 /**
Original file line number Diff line number Diff line change 44 */
55package org .hibernate .orm .test .query .hql ;
66
7+ import org .hibernate .community .dialect .InformixDialect ;
78import org .hibernate .dialect .HSQLDialect ;
89import org .hibernate .dialect .MariaDBDialect ;
910import org .hibernate .dialect .OracleDialect ;
@@ -41,6 +42,8 @@ void testInSelect(EntityManagerFactoryScope scope) {
4142 reason = "regexp_like coming in 2025" )
4243 @ SkipForDialect (dialectClass = SybaseASEDialect .class ,
4344 reason = "no regex support in Sybase ASE" )
45+ @ SkipForDialect (dialectClass = InformixDialect .class ,
46+ reason = "This could be made to work on Informix by changing the flags" )
4447 void testInSelectCaseInsensitive (EntityManagerFactoryScope scope ) {
4548 if ( !( scope .getDialect () instanceof OracleDialect dialect
4649 && ( dialect .isAutonomous () || dialect .getVersion ().isBefore ( 23 ) ) ) ) {
You can’t perform that action at this time.
0 commit comments