Examples of toSQLText()


Examples of org.datanucleus.store.rdbms.sql.expression.SQLExpression.toSQLText()

        {
            // Assume that we have something like "CURRENT_DATE()"
            SQLExpression dateExpr =
                new TemporalExpression(stmt, getMappingForClass(getClassForMapping()), getFunctionName(), args);
            // Update the SQL manually since the default is to add brackets after the name
            dateExpr.toSQLText().clearStatement();
            dateExpr.toSQLText().append(getFunctionName());
            return dateExpr;
        }
        else
        {
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.SQLExpression.toSQLText()

            // Assume that we have something like "CURRENT_DATE()"
            SQLExpression dateExpr =
                new TemporalExpression(stmt, getMappingForClass(getClassForMapping()), getFunctionName(), args);
            // Update the SQL manually since the default is to add brackets after the name
            dateExpr.toSQLText().clearStatement();
            dateExpr.toSQLText().append(getFunctionName());
            return dateExpr;
        }
        else
        {
            throw new NucleusException(LOCALISER.msg("060002", getFunctionName(), expr));
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.SQLExpression.toSQLText()

                argExpr.getSQLTable().getTable(), argExpr.getSQLTable().getAlias(), null);
            subStmt.setClassLoaderResolver(clr);

            JavaTypeMapping mapping =
                stmt.getRDBMSManager().getMappingManager().getMappingWithDatastoreMapping(String.class, false, false, clr);
            String aggregateString = getFunctionName() + "(" + argExpr.toSQLText() + ")";
            SQLExpression aggExpr = exprFactory.newLiteral(subStmt, mapping, aggregateString);
            ((StringLiteral)aggExpr).generateStatementWithoutQuotes();
            subStmt.select(aggExpr, null);

            JavaTypeMapping subqMapping = exprFactory.getMappingForType(Integer.class, false);
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.StringExpression.toSQLText()

        List argsOp2 = new ArrayList();
        argsOp2.add(expr2);
        SQLExpression secondExpr = new StringExpression(expr.getSQLStatement(), m, "CAST", argsOp2, types).encloseInParentheses();

        StringExpression concatExpr = new StringExpression(expr.getSQLStatement(), null, null);
        SQLText sql = concatExpr.toSQLText();
        sql.clearStatement();
        sql.append(firstExpr);
        sql.append("||");
        sql.append(secondExpr);
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.StringExpression.toSQLText()

                trimArgs.add(expr);
            }
            else
            {
                StringExpression argExpr = new StringExpression(stmt, expr.getJavaTypeMapping(), "NULL", null);
                SQLText sql = argExpr.toSQLText();
                sql.clearStatement();
                sql.append(getTrimSpecKeyword() + " ");
                sql.append(trimCharExpr);
                sql.append(" FROM ");
                sql.append(expr);
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.StringExpression.toSQLText()

                    "NumericExpression/IntegerLiteral/ParameterLiteral"));
            }

            // Create a new StringExpression and manually update its SQL
            StringExpression strExpr = new StringExpression(stmt, null, null);
            SQLText sql = strExpr.toSQLText();
            sql.append("SUBSTRING(").append(expr).append(" FROM ").append(startExpr.add(one)).append(')');
            return strExpr;
        }
        else
        {
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.StringExpression.toSQLText()

                    "NumericExpression"));
            }

            // Create a new StringExpression and manually update its SQL
            StringExpression strExpr = new StringExpression(stmt, null, null);
            SQLText sql = strExpr.toSQLText();
            sql.append("SUBSTRING(").append(expr).append(" FROM ").append(startExpr.add(one))
                .append(" FOR ").append(endExpr.sub(startExpr)).append(')');
            return strExpr;
        }
    }
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.TemporalExpression.toSQLText()

        {
            // Assume that we have something like "CURRENT_DATE()"
            SQLExpression dateExpr =
                new TemporalExpression(stmt, getMappingForClass(getClassForMapping()), getFunctionName(), args);
            // Update the SQL manually since the default is to add brackets after the name
            dateExpr.toSQLText().clearStatement();
            dateExpr.toSQLText().append(getFunctionName());
            return dateExpr;
        }
        else
        {
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.TemporalExpression.toSQLText()

            // Assume that we have something like "CURRENT_DATE()"
            SQLExpression dateExpr =
                new TemporalExpression(stmt, getMappingForClass(getClassForMapping()), getFunctionName(), args);
            // Update the SQL manually since the default is to add brackets after the name
            dateExpr.toSQLText().clearStatement();
            dateExpr.toSQLText().append(getFunctionName());
            return dateExpr;
        }
        else
        {
            throw new NucleusException(LOCALISER.msg("060002", getFunctionName(), expr));
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.TemporalExpression.toSQLText()

        {
            // Assume that we have something like "CURRENT_DATE()"
            SQLExpression dateExpr =
                new TemporalExpression(stmt, getMappingForClass(getClassForMapping()), getFunctionName(), args);
            // Update the SQL manually since the default is to add brackets after the name
            dateExpr.toSQLText().clearStatement();
            dateExpr.toSQLText().append(getFunctionName());
            return dateExpr;
        }
        else
        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.