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 @@ -280,7 +280,6 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
280280 functionFactory .initcap ();
281281 functionFactory .yearMonthDay ();
282282 functionFactory .ceiling_ceil ();
283- functionFactory .concat_pipeOperator ( SqlAstNodeRenderingMode .INLINE_ALL_PARAMETERS );
284283 functionFactory .ascii ();
285284 functionFactory .char_chr ();
286285 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 @@ -1342,18 +1342,13 @@ public void week_weekofyear() {
13421342 * Almost every database
13431343 */
13441344 public void concat_pipeOperator () {
1345- concat_pipeOperator ( SqlAstNodeRenderingMode .DEFAULT );
1346- }
1347-
1348- public void concat_pipeOperator ( SqlAstNodeRenderingMode inferenceArgumentRenderingMode ) {
13491345 functionRegistry .patternDescriptorBuilder ( "concat" , "(?1||?2...)" )
13501346 .setInvariantType (stringType )
13511347 .setMinArgumentCount ( 1 )
13521348 .setArgumentTypeResolver (
13531349 StandardFunctionArgumentTypeResolvers .impliedOrInvariant ( typeConfiguration , STRING )
13541350 )
13551351 .setArgumentListSignature ( "(STRING string0[, STRING string1[, ...]])" )
1356- .setArgumentRenderingMode ( inferenceArgumentRenderingMode )
13571352 .register ();
13581353 }
13591354
You can’t perform that action at this time.
0 commit comments