Examples of toSQLText()


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

    protected BooleanExpression getBooleanLikeExpression(SQLExpression expr, SQLExpression regExpr,
            SQLExpression escapeExpr)
    {
        BooleanExpression similarToExpr = new BooleanExpression(stmt,
            exprFactory.getMappingForType(boolean.class, false));
        SQLText sql = similarToExpr.toSQLText();
        sql.clearStatement();
        if (OP_SIMILAR_TO.isHigherThanLeftSide(expr.getLowestOperator()))
        {
            sql.append("(").append(expr).append(")");
        }
View Full Code Here

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

    protected BooleanExpression getBooleanLikeExpression(SQLExpression expr, SQLExpression regExpr,
            SQLExpression escapeExpr)
    {
        BooleanExpression likeExpr = new BooleanExpression(stmt, exprFactory.getMappingForType(boolean.class, false));
        SQLText sql= likeExpr.toSQLText();
        sql.clearStatement();
        if (Expression.OP_LIKE.isHigherThanLeftSide(expr.getLowestOperator()))
        {
            sql.append("(").append(expr).append(")");
        }
View Full Code Here

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

        {
            Object item = appended.get(i);
            if (item instanceof SQLExpression)
            {
                SQLExpression expr = (SQLExpression) item;
                SQLText st = expr.toSQLText();
                sql.append(st.toSQL());

                if (st.parameters != null)
                {
                    if (parameters == null)
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
        {
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()

            List groupBy = new ArrayList();
            Iterator<SQLExpression> groupIter = groupingExpressions.iterator();
            while (groupIter.hasNext())
            {
                SQLExpression expr = groupIter.next();
                String exprText = expr.toSQLText().toSQL();
                if (!groupBy.contains(exprText))
                {
                    groupBy.add(exprText);
                }
            }
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
        {
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(returnType, false);
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
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.