File tree Expand file tree Collapse file tree 3 files changed +19
-6
lines changed
hibernate-community-dialects/src/main/java/org/hibernate/community/dialect
hibernate-core/src/main/java/org/hibernate/dialect/function Expand file tree Collapse file tree 3 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -276,7 +276,6 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
276276 functionFactory .initcap ();
277277 functionFactory .yearMonthDay ();
278278 functionFactory .ceiling_ceil ();
279- functionFactory .concat_pipeOperator ( SqlAstNodeRenderingMode .INLINE_ALL_PARAMETERS );
280279 functionFactory .ascii ();
281280 functionFactory .char_chr ();
282281 functionFactory .addMonths ();
Original file line number Diff line number Diff line change 1515import org .hibernate .sql .ast .spi .AbstractSqlAstTranslator ;
1616import org .hibernate .sql .ast .spi .SqlSelection ;
1717import org .hibernate .sql .ast .tree .Statement ;
18+ import org .hibernate .sql .ast .tree .expression .CaseSearchedExpression ;
1819import org .hibernate .sql .ast .tree .expression .Expression ;
1920import org .hibernate .sql .ast .tree .expression .Literal ;
2021import org .hibernate .sql .ast .tree .expression .SqlTuple ;
@@ -65,6 +66,24 @@ protected void visitSqlSelections(SelectClause selectClause) {
6566 super .visitSqlSelections ( selectClause );
6667 }
6768
69+ @ Override
70+ protected void visitCaseSearchedExpression (CaseSearchedExpression caseSearchedExpression , boolean inSelect ) {
71+ if ( inSelect ) {
72+ withParameterRenderingMode (
73+ SqlAstNodeRenderingMode .INLINE_ALL_PARAMETERS ,
74+ () -> super .visitCaseSearchedExpression ( caseSearchedExpression , inSelect )
75+ );
76+ }
77+ else {
78+ super .visitCaseSearchedExpression ( caseSearchedExpression , inSelect );
79+ }
80+ }
81+
82+ @ Override
83+ protected void renderSelectExpression (Expression expression ) {
84+ renderSelectExpressionWithCastedOrInlinedPlainParameters ( expression );
85+ }
86+
6887 @ Override
6988 protected boolean needsRowsToSkip () {
7089 return !supportsSkipFirstClause ();
Original file line number Diff line number Diff line change @@ -1338,18 +1338,13 @@ public void week_weekofyear() {
13381338 * Almost every database
13391339 */
13401340 public void concat_pipeOperator () {
1341- concat_pipeOperator ( SqlAstNodeRenderingMode .DEFAULT );
1342- }
1343-
1344- public void concat_pipeOperator ( SqlAstNodeRenderingMode inferenceArgumentRenderingMode ) {
13451341 functionRegistry .patternDescriptorBuilder ( "concat" , "(?1||?2...)" )
13461342 .setInvariantType (stringType )
13471343 .setMinArgumentCount ( 1 )
13481344 .setArgumentTypeResolver (
13491345 StandardFunctionArgumentTypeResolvers .impliedOrInvariant ( typeConfiguration , STRING )
13501346 )
13511347 .setArgumentListSignature ( "(STRING string0[, STRING string1[, ...]])" )
1352- .setArgumentRenderingMode ( inferenceArgumentRenderingMode )
13531348 .register ();
13541349 }
13551350
You can’t perform that action at this time.
0 commit comments