private void setSQLValue(DotNode node, String text, String value) { LOG.debugf( "setSQLValue() %s -> %s", text, value ); // Chop off the rest of the tree. node.setFirstChild( null ); node.setType( SqlTokenTypes.SQL_TOKEN ); node.setText( value ); node.setResolvedConstant( text ); }
private void initText() { String[] cols = getColumns(); String text = String.join( ", ", cols ); boolean countDistinct = getWalker().isInCountDistinct() && getWalker().getSessionFactoryHelper().getFactory().getDialect().requiresParensForTupleDistinctCounts(); if ( cols.length > 1 && ( getWalker().isComparativeExpressionClause() || countDistinct ) ) { text = "(" + text + ")"; } setText( text ); }
private void dereferenceEntityIdentifier(String propertyName, DotNode dotParent) { // special shortcut for id properties, skip the join! // this must only occur at the _end_ of a path expression if ( LOG.isDebugEnabled() ) { LOG.debugf( "dereferenceShortcut() : property %s in %s does not require a join.", propertyName, getFromElement().getClassName() ); } setPropertyNameAndPath( dotParent ); // Set the unresolved path in this node and the parent. initText(); // Set the text for the parent. if ( dotParent != null ) { dotParent.dereferenceType = DereferenceType.IDENTIFIER; dotParent.setText( getText() ); dotParent.columns = getColumns(); } }
Dialect dialect = walker.getSessionFactoryHelper().getFactory().getDialect(); node.setText( literalType.objectToSQLString( value, dialect ) );
private void setSQLValue(DotNode node, String text, String value) { LOG.debugf( "setSQLValue() %s -> %s", text, value ); node.setFirstChild( null ); // Chop off the rest of the tree. node.setType( SqlTokenTypes.SQL_TOKEN ); node.setText(value); node.setResolvedConstant( text ); }
private void setSQLValue(DotNode node, String text, String value) { LOG.debugf( "setSQLValue() %s -> %s", text, value ); node.setFirstChild( null ); // Chop off the rest of the tree. node.setType( SqlTokenTypes.SQL_TOKEN ); node.setText(value); node.setResolvedConstant( text ); }
private void initText() { String[] cols = getColumns(); String text = StringHelper.join( ", ", cols ); if ( cols.length > 1 && getWalker().isComparativeExpressionClause() ) { text = "(" + text + ")"; } setText( text ); }
private void initText() { String[] cols = getColumns(); String text = StringHelper.join( ", ", cols ); if ( cols.length > 1 && getWalker().isComparativeExpressionClause() ) { text = "(" + text + ")"; } setText( text ); }
private void dereferenceEntityIdentifier(String propertyName, DotNode dotParent) { // special shortcut for id properties, skip the join! // this must only occur at the _end_ of a path expression if ( LOG.isDebugEnabled() ) { LOG.debugf( "dereferenceShortcut() : property %s in %s does not require a join.", propertyName, getFromElement().getClassName() ); } initText(); setPropertyNameAndPath( dotParent ); // Set the unresolved path in this node and the parent. // Set the text for the parent. if ( dotParent != null ) { dotParent.dereferenceType = DEREF_IDENTIFIER; dotParent.setText( getText() ); dotParent.columns = getColumns(); } }
private void dereferenceEntityIdentifier(String propertyName, DotNode dotParent) { // special shortcut for id properties, skip the join! // this must only occur at the _end_ of a path expression if ( LOG.isDebugEnabled() ) { LOG.debugf( "dereferenceShortcut() : property %s in %s does not require a join.", propertyName, getFromElement().getClassName() ); } initText(); setPropertyNameAndPath( dotParent ); // Set the unresolved path in this node and the parent. // Set the text for the parent. if ( dotParent != null ) { dotParent.dereferenceType = DEREF_IDENTIFIER; dotParent.setText( getText() ); dotParent.columns = getColumns(); } }
Dialect dialect = walker.getSessionFactoryHelper().getFactory().getDialect(); node.setText( literalType.objectToSQLString( value, dialect ) );
Dialect dialect = walker.getSessionFactoryHelper().getFactory().getDialect(); node.setText( literalType.objectToSQLString( value, dialect ) );