@Test public void testNull() { String sql = SQLStringVisitor.getSQLString(null); assertEquals("Incorrect string for null object", SQLStringVisitor.UNDEFINED, sql); }
public static final String getSQLString( LanguageObject obj ) { if (obj == null) { return UNDEFINED; } SQLStringVisitor visitor = new SQLStringVisitor(); obj.acceptVisitor(visitor); return visitor.getSQLString(); }
SQLStringVisitor extends LanguageVisitor { public static final String getSQLString( LanguageObject obj ) { if (obj == null) { return UNDEFINED; } SQLStringVisitor visitor = new SQLStringVisitor(); obj.acceptVisitor(visitor); return visitor.getSQLString(); } }
SQLStringVisitor extends LanguageVisitor { public static final String getSQLString( LanguageObject obj ) { if (obj == null) { return UNDEFINED; } SQLStringVisitor visitor = new SQLStringVisitor(); obj.acceptVisitor(visitor); return visitor.getSQLString(); }  }
SQLStringVisitor extends LanguageVisitor { public static final String getSQLString( LanguageObject obj ) { if (obj == null) { return UNDEFINED; } SQLStringVisitor visitor = new SQLStringVisitor(); obj.acceptVisitor(visitor); return visitor.getSQLString(); }  static final String getSQLString( LanguageObject obj ); String getSQLString(); @Override void visit( BetweenCriteria obj ); @Override void visit( CaseExpression obj ); @Override void visit( CompareCriteria obj ); @Override void visit( CompoundCriteria obj ); @Override void visit( Delete obj ); @Override void visit( DependentSetCriteria obj ); @Override void visit( From obj ); @Override void visit( GroupBy obj ); @Override void visit( Insert obj ); @Override void visit( Create obj ); @Override void visit( Drop obj ); @Override void visit( IsNullCriteria obj ); @Override void visit( JoinPredicate obj ); @Override void visit( JoinType obj ); @Override void visit( MatchCriteria obj ); @Override void visit( NotCriteria obj ); @Override void visit( Option obj ); SQLStringVisitor appendMakeDepOptions(MakeDep makedep); @Override void visit( OrderBy obj ); @Override void visit( OrderByItem obj ); @Override void visit( DynamicCommand obj ); @Override void visit( SetClauseList obj ); @Override void visit( SetClause obj ); @Override void visit(WithQueryCommand obj); @Override void visit( Query obj ); @Override void visit( SearchedCaseExpression obj ); @Override void visit( Select obj ); @Override void visit( SetCriteria obj ); @Override void visit( SetQuery obj ); @Override void visit( StoredProcedure obj ); void addCacheHint( CacheHint obj ); @Override void visit( SubqueryFromClause obj ); @Override void visit( SubquerySetCriteria obj ); @Override void visit( UnaryFromClause obj ); @Override void visit( Update obj ); @Override void visit( Into obj ); @Override void visit( AggregateSymbol obj ); @Override void visit( AliasSymbol obj ); @Override void visit( MultipleElementSymbol obj ); @Override void visit( Constant obj ); @Override void visit( ElementSymbol obj ); @Override void visit( ExpressionSymbol obj ); @Override void visit( Function obj ); @Override void visit( GroupSymbol obj ); @Override void visit( Reference obj ); @Override void visit( Block obj ); @Override void visit( CommandStatement obj ); @Override void visit( CreateProcedureCommand obj ); @Override void visit( DeclareStatement obj ); @Override void visit( IfStatement obj ); @Override void visit( AssignmentStatement obj ); @Override void visit( RaiseStatement obj ); @Override void visit(ExceptionExpression exceptionExpression); @Override void visit(ReturnStatement obj); @Override void visit( BranchingStatement obj ); @Override void visit( LoopStatement obj ); @Override void visit( WhileStatement obj ); @Override void visit( ExistsCriteria obj ); void addSubqueryHint(SubqueryHint hint); @Override void visit( SubqueryCompareCriteria obj ); @Override void visit( ScalarSubquery obj ); @Override void visit( XMLAttributes obj ); @Override void visit( XMLElement obj ); @Override void visit( XMLForest obj ); @Override void visit( JSONObject obj ); @Override void visit( TextLine obj ); @Override void visit( XMLNamespaces obj ); @Override void visit( Limit obj ); @Override void visit( TextTable obj ); @Override void visit( XMLTable obj ); @Override void visit( ObjectTable obj ); @Override void visit( JsonTable obj ); @Override void visit( XMLQuery obj ); @Override void visit(XMLExists exists); @Override void visit(XMLCast xmlcast); @Override void visit( DerivedColumn obj ); @Override void visit( XMLSerialize obj ); @Override void visit( QueryString obj ); @Override void visit( XMLParse obj ); @Override void visit( ExpressionCriteria obj ); @Override void visit(TriggerAction obj); @Override void visit(ArrayTable obj); @Override void visit(AlterProcedure alterProcedure); @Override void visit(AlterTrigger alterTrigger); @Override void visit(AlterView alterView); @Override void visit(WindowFunction windowFunction); @Override void visit(WindowSpecification windowSpecification); @Override void visit(WindowFrame windowFrame); @Override void visit(Array array); @Override void visit(IsDistinctCriteria isDistinctCriteria); static String escapeSinglePart( String part ); @Override void visit(ExplainCommand explainCommand); }
SQLStringVisitor extends LanguageVisitor { public static final String getSQLString( LanguageObject obj ) { if (obj == null) { return UNDEFINED; } SQLStringVisitor visitor = new SQLStringVisitor(); obj.acceptVisitor(visitor); return visitor.getSQLString(); }  static final String getSQLString( LanguageObject obj ); String getSQLString(); @Override void visit( BetweenCriteria obj ); @Override void visit( CaseExpression obj ); @Override void visit( CompareCriteria obj ); @Override void visit( CompoundCriteria obj ); @Override void visit( Delete obj ); @Override void visit( DependentSetCriteria obj ); @Override void visit( From obj ); @Override void visit( GroupBy obj ); @Override void visit( Insert obj ); @Override void visit( Create obj ); @Override void visit( Drop obj ); @Override void visit( IsNullCriteria obj ); @Override void visit( JoinPredicate obj ); @Override void visit( JoinType obj ); @Override void visit( MatchCriteria obj ); @Override void visit( NotCriteria obj ); @Override void visit( Option obj ); SQLStringVisitor appendMakeDepOptions(MakeDep makedep); @Override void visit( OrderBy obj ); @Override void visit( OrderByItem obj ); @Override void visit( DynamicCommand obj ); @Override void visit( SetClauseList obj ); @Override void visit( SetClause obj ); @Override void visit(WithQueryCommand obj); @Override void visit( Query obj ); @Override void visit( SearchedCaseExpression obj ); @Override void visit( Select obj ); @Override void visit( SetCriteria obj ); @Override void visit( SetQuery obj ); @Override void visit( StoredProcedure obj ); void addCacheHint( CacheHint obj ); @Override void visit( SubqueryFromClause obj ); @Override void visit( SubquerySetCriteria obj ); @Override void visit( UnaryFromClause obj ); @Override void visit( Update obj ); @Override void visit( Into obj ); @Override void visit( AggregateSymbol obj ); @Override void visit( AliasSymbol obj ); @Override void visit( MultipleElementSymbol obj ); @Override void visit( Constant obj ); @Override void visit( ElementSymbol obj ); @Override void visit( ExpressionSymbol obj ); @Override void visit( Function obj ); @Override void visit( GroupSymbol obj ); @Override void visit( Reference obj ); @Override void visit( Block obj ); @Override void visit( CommandStatement obj ); @Override void visit( CreateProcedureCommand obj ); @Override void visit( DeclareStatement obj ); @Override void visit( IfStatement obj ); @Override void visit( AssignmentStatement obj ); @Override void visit( RaiseStatement obj ); @Override void visit(ExceptionExpression exceptionExpression); @Override void visit(ReturnStatement obj); @Override void visit( BranchingStatement obj ); @Override void visit( LoopStatement obj ); @Override void visit( WhileStatement obj ); @Override void visit( ExistsCriteria obj ); void addSubqueryHint(SubqueryHint hint); @Override void visit( SubqueryCompareCriteria obj ); @Override void visit( ScalarSubquery obj ); @Override void visit( XMLAttributes obj ); @Override void visit( XMLElement obj ); @Override void visit( XMLForest obj ); @Override void visit( JSONObject obj ); @Override void visit( TextLine obj ); @Override void visit( XMLNamespaces obj ); @Override void visit( Limit obj ); @Override void visit( TextTable obj ); @Override void visit( XMLTable obj ); @Override void visit( ObjectTable obj ); @Override void visit( JsonTable obj ); @Override void visit( XMLQuery obj ); @Override void visit(XMLExists exists); @Override void visit(XMLCast xmlcast); @Override void visit( DerivedColumn obj ); @Override void visit( XMLSerialize obj ); @Override void visit( QueryString obj ); @Override void visit( XMLParse obj ); @Override void visit( ExpressionCriteria obj ); @Override void visit(TriggerAction obj); @Override void visit(ArrayTable obj); @Override void visit(AlterProcedure alterProcedure); @Override void visit(AlterTrigger alterTrigger); @Override void visit(AlterView alterView); @Override void visit(WindowFunction windowFunction); @Override void visit(WindowSpecification windowSpecification); @Override void visit(WindowFrame windowFrame); @Override void visit(Array array); @Override void visit(IsDistinctCriteria isDistinctCriteria); static String escapeSinglePart( String part ); @Override void visit(ExplainCommand explainCommand); static final String UNDEFINED; }