Package org.apache.cayenne.exp.parser

Examples of org.apache.cayenne.exp.parser.SimpleNode


    @Override
    protected void processColumnWithQuoteSqlIdentifiers(
            DbAttribute dbAttr,
            Expression pathExp) throws IOException {

        SimpleNode parent = null;
        if (pathExp instanceof SimpleNode) {
            parent = (SimpleNode) ((SimpleNode) pathExp).jjtGetParent();
        }

        // problem in derby : Comparisons between 'CLOB (UCS_BASIC)' and 'CLOB
        // (UCS_BASIC)' are not supported.
        // we need do it by casting the Clob to VARCHAR.
        if (parent != null
                && (parent instanceof ASTEqual || parent instanceof ASTNotEqual)
                && dbAttr.getType() == Types.CLOB
                && parent.getOperandCount() == 2
                && parent.getOperand(1) instanceof String) {
            Integer size = parent.getOperand(1).toString().length() + 1;
            out.append("CAST(");
            super.processColumnWithQuoteSqlIdentifiers(dbAttr, pathExp);
            out.append(" AS VARCHAR(" + size + "))");
        }
        else {
View Full Code Here


    @Override
    protected void processColumnWithQuoteSqlIdentifiers(
            DbAttribute dbAttr,
            Expression pathExp) throws IOException {

        SimpleNode parent = null;
        if (pathExp instanceof SimpleNode) {
            parent = (SimpleNode) ((SimpleNode) pathExp).jjtGetParent();
        }

        // problem in db2 : Comparisons between CLOB and CLOB are not supported.
        // we need do it by casting the Clob to VARCHAR.
        if (parent != null
                && (parent instanceof ASTEqual || parent instanceof ASTNotEqual)
                && dbAttr.getType() == Types.CLOB
                && parent.getOperandCount() == 2
                && parent.getOperand(1) instanceof String) {
            Integer size = parent.getOperand(1).toString().length() + 1;

            out.append("CAST(");
            super.processColumnWithQuoteSqlIdentifiers(dbAttr, pathExp);
            out.append(" AS VARCHAR(" + size + "))");
        }
View Full Code Here

    @Override
    protected void processColumnWithQuoteSqlIdentifiers(
            DbAttribute dbAttr,
            Expression pathExp) throws IOException {

        SimpleNode parent = null;
        if (pathExp instanceof SimpleNode) {
            parent = (SimpleNode) ((SimpleNode) pathExp).jjtGetParent();
        }

        // problem in derby : Comparisons between 'CLOB (UCS_BASIC)' and 'CLOB (UCS_BASIC)' are not supported.
        // we need do it by casting the Clob to VARCHAR.
        if (parent != null
                && (parent instanceof ASTEqual || parent instanceof ASTNotEqual)
                && dbAttr.getType() == Types.CLOB
                && parent.getOperandCount() == 2
                && parent.getOperand(1) instanceof String) {
            Integer size = parent.getOperand(1).toString().length() + 1;

            out.append("CAST(");
            super.processColumnWithQuoteSqlIdentifiers(dbAttr, pathExp);
            out.append(" AS VARCHAR(" + size + "))");
        }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.exp.parser.SimpleNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.