Package org.datanucleus.store.rdbms.sql.expression

Examples of org.datanucleus.store.rdbms.sql.expression.NumericExpression.encloseInParentheses()


        NumericExpression monthExpr = new NumericExpression(stmt, getMappingForClass(int.class), "MONTH", funcArgs);

        // Delete one from the SQL "month" (origin=1) to be compatible with Java month (origin=0)
        SQLExpression one = ExpressionUtils.getLiteralForOne(stmt);
        NumericExpression numExpr = new NumericExpression(monthExpr, Expression.OP_SUB, one);
        numExpr.encloseInParentheses();
        return numExpr;
    }
}
View Full Code Here


        // Delete one from the SQL "month" (origin=1) to be compatible with Java month (origin=0)
        NumericExpression numExpr = new NumericExpression(
            new NumericExpression(stmt, getMappingForClass(int.class), "date_part", funcArgs),
            Expression.OP_SUB, one);
        numExpr.encloseInParentheses();
        return numExpr;
    }
}
View Full Code Here

        // Delete one from the SQL "month" (origin=1) to be compatible with Java month (origin=0)
        NumericExpression numExpr = new NumericExpression(
            new NumericExpression(stmt, getMappingForClass(int.class), "TO_NUMBER", funcArgs2),
            Expression.OP_SUB, one);
        numExpr.encloseInParentheses();
        return numExpr;
    }
}
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.