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

Examples of org.datanucleus.store.rdbms.sql.expression.AggregateNumericExpression


            else
            {
                // Fallback to the type for this aggregate
                m = getMappingForClass(getClassForMapping());
            }
            return new AggregateNumericExpression(stmt, m, getFunctionName(), args);
        }
        else
        {
            throw new NucleusException(LOCALISER.msg("060002", getFunctionName(), expr));
        }
View Full Code Here


            if (argExpr.getNumberOfSubExpressions() > 1 && argExpr instanceof ObjectExpression)
            {
                // Just use first sub-expression since count() doesn't allow more
                ((ObjectExpression)argExpr).useFirstColumnOnly();
            }
            return new AggregateNumericExpression(stmt, getMappingForClass(long.class), "COUNT", args);
        }
        else
        {
            throw new NucleusException(LOCALISER.msg("060002", "COUNT", expr));
        }
View Full Code Here

        if (stmt.getQueryGenerator().getCompilationComponent() == CompilationComponent.RESULT)
        {
            // FUNC(argExpr)
            JavaTypeMapping m = getMappingForClass(returnType);
            return new AggregateNumericExpression(stmt, m, getFunctionName(), args);
        }
        else
        {
            // Handle as Subquery "SELECT AVG(expr) FROM tbl"
            SQLExpression argExpr = (SQLExpression)args.get(0);
View Full Code Here

            else
            {
                // Fallback to the type for this aggregate
                m = getMappingForClass(getClassForMapping());
            }
            return new AggregateNumericExpression(stmt, m, getFunctionName(), args);
        }
        else
        {
            // Handle as Subquery "SELECT AVG(expr) FROM tbl"
            SQLExpression argExpr = (SQLExpression)args.get(0);
View Full Code Here

                {
                    return new AggregateTemporalExpression(stmt, m, getFunctionName(), args);
                }
                else
                {
                    return new AggregateNumericExpression(stmt, m, getFunctionName(), args);
                }
            }
            else
            {
                // What is coming through here?
                // Fallback to the type for this aggregate TODO Allow for temporal types
                m = getMappingForClass(double.class);
                return new AggregateNumericExpression(stmt, m, getFunctionName(), args);
            }
        }
        else
        {
            // Handle as Subquery "SELECT AVG(expr) FROM tbl"
View Full Code Here

TOP

Related Classes of org.datanucleus.store.rdbms.sql.expression.AggregateNumericExpression

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.