diff --git a/src/java/com/samskivert/depot/Exps.java b/src/java/com/samskivert/depot/Exps.java index 3c6e258..c9eb32c 100644 --- a/src/java/com/samskivert/depot/Exps.java +++ b/src/java/com/samskivert/depot/Exps.java @@ -21,6 +21,8 @@ package com.samskivert.depot; import com.samskivert.depot.expression.*; +import com.samskivert.depot.function.AggregateFun; +import com.samskivert.depot.function.NumericalFun; /** * Provides static methods for expression construction. For example: {@link #literal}, {@link @@ -101,4 +103,43 @@ public class Exps { return new EpochSeconds(expr); } + + /** + * Creates an expression that computes the sum of the supplied expression. This would usually + * be used in a FieldOverride and supplied with a ColumnExp. + */ + @Deprecated + public static AggregateFun.Sum sum (SQLExpression expr) + { + return new AggregateFun.Sum(expr); + } + + /** + * Creates an expression that computes the absolute value of the supplied expression. + */ + @Deprecated + public static NumericalFun.Abs abs (SQLExpression expr) + { + return new NumericalFun.Abs(expr); + } + + /** + * Creates an expression that counts the number of rows that match the supplied expression. + * This would usually be used in a FieldOverride and supplied with a ColumnExp. + */ + @Deprecated + public static AggregateFun.Count count (SQLExpression expr) + { + return new AggregateFun.Count(expr, false); + } + + /** + * Creates an expression that counts the number of distinct values that match the supplied + * expression. This would usually be used in a FieldOverride and supplied with a ColumnExp. + */ + @Deprecated + public static AggregateFun.Count countDistinct (SQLExpression expr) + { + return new AggregateFun.Count(expr, true); + } }