Search in sources :

Example 16 with AstFunNode

use of com.developmentontheedge.sql.model.AstFunNode in project be5 by DevelopmentOnTheEdge.

the class GenericDbmsTransformer method recursiveProcessing.

private void recursiveProcessing(SimpleNode node) {
    for (int i = 0; i < node.jjtGetNumChildren(); i++) {
        SimpleNode child = node.child(i);
        if (child instanceof AstFunNode) {
            transformFunction((AstFunNode) child);
        }
        if (child instanceof AstSelect) {
            transformSelect((AstSelect) child);
        }
        if (child instanceof AstIdentifierConstant) {
            transformIdentifier((AstIdentifierConstant) child);
        }
        if (child instanceof AstStringConstant) {
            transformString((AstStringConstant) child);
        }
        if (child instanceof AstCast) {
            transformCastExpression((AstCast) child);
        }
        if (child instanceof AstExtract) {
            transformExtractExpression((AstExtract) child);
        }
        if (child instanceof AstPosition) {
            transformPosition((AstPosition) child);
        }
        if (child instanceof AstInterval) {
            transformInterval((AstInterval) child);
        }
        if (child instanceof AstWith) {
            transformWith((AstWith) child);
        }
        if (child instanceof AstExcept) {
            transformExcept((AstExcept) child);
        }
        recursiveProcessing(child);
    }
}
Also used : AstSelect(com.developmentontheedge.sql.model.AstSelect) AstIdentifierConstant(com.developmentontheedge.sql.model.AstIdentifierConstant) AstFunNode(com.developmentontheedge.sql.model.AstFunNode) AstCast(com.developmentontheedge.sql.model.AstCast) AstPosition(com.developmentontheedge.sql.model.AstPosition) AstWith(com.developmentontheedge.sql.model.AstWith) AstExtract(com.developmentontheedge.sql.model.AstExtract) AstStringConstant(com.developmentontheedge.sql.model.AstStringConstant) AstExcept(com.developmentontheedge.sql.model.AstExcept) AstInterval(com.developmentontheedge.sql.model.AstInterval) SimpleNode(com.developmentontheedge.sql.model.SimpleNode)

Example 17 with AstFunNode

use of com.developmentontheedge.sql.model.AstFunNode in project be5 by DevelopmentOnTheEdge.

the class GenericDbmsTransformer method expandDbArguments.

private void expandDbArguments(SimpleNode node, Dbms dbms) {
    for (int i = 0; i < node.jjtGetNumChildren(); i++) {
        SimpleNode child = node.child(i);
        expandDbArguments(child, dbms);
        if (child instanceof AstFunNode && DbSpecificFunction.needsTransformation(dbms).test(((AstFunNode) child).getFunction()))
            expandDbFunction((AstFunNode) child, dbms);
    }
}
Also used : AstFunNode(com.developmentontheedge.sql.model.AstFunNode) SimpleNode(com.developmentontheedge.sql.model.SimpleNode)

Aggregations

AstFunNode (com.developmentontheedge.sql.model.AstFunNode)17 SimpleNode (com.developmentontheedge.sql.model.SimpleNode)10 AstIdentifierConstant (com.developmentontheedge.sql.model.AstIdentifierConstant)6 AstFieldReference (com.developmentontheedge.sql.model.AstFieldReference)4 AstFrom (com.developmentontheedge.sql.model.AstFrom)4 AstParenthesis (com.developmentontheedge.sql.model.AstParenthesis)4 AstSelect (com.developmentontheedge.sql.model.AstSelect)4 AstDerivedColumn (com.developmentontheedge.sql.model.AstDerivedColumn)3 AstLimit (com.developmentontheedge.sql.model.AstLimit)3 AstOrderBy (com.developmentontheedge.sql.model.AstOrderBy)3 AstSelectList (com.developmentontheedge.sql.model.AstSelectList)3 AstStringConstant (com.developmentontheedge.sql.model.AstStringConstant)3 AstTableRef (com.developmentontheedge.sql.model.AstTableRef)3 AstWhere (com.developmentontheedge.sql.model.AstWhere)3 AstBetweenPredicate (com.developmentontheedge.sql.model.AstBetweenPredicate)2 AstCase (com.developmentontheedge.sql.model.AstCase)2 AstCaseElse (com.developmentontheedge.sql.model.AstCaseElse)2 AstCast (com.developmentontheedge.sql.model.AstCast)2 AstExcept (com.developmentontheedge.sql.model.AstExcept)2 AstExtract (com.developmentontheedge.sql.model.AstExtract)2