|
Produced by Siminov Software Solution LLP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISum
Exposes API's to return sum of all non-NULL values in the group. If there are no non-NULL input rows then sum() returns NULL but total() returns 0.0. NULL is not normally a helpful result for the sum of no rows but the SQL standard requires it and most other SQL database engines implement sum() that way so SQLite does it in the same way in order to be compatible. The result of sum() is an integer value if all non-NULL inputs are integers.
Field Summary | |
---|---|
static java.lang.String |
INTERFACE_NAME
|
Method Summary | |
---|---|
ISumClause |
and(java.lang.String column)
Used to specify AND condition between where clause. |
ISum |
column(java.lang.String column)
Used to provide name of column for which sum will be calculated. |
java.lang.Object |
execute()
Used to get sum, this method should be called in last to calculate sum. |
ISum |
groupBy(java.lang.String... columns)
Used to specify GROUP BY statement in conjunction with the aggregate functions to group the result-set by one or more columns. |
ISumClause |
having(java.lang.String column)
Used to specify HAVING clause to SQL because the WHERE keyword could not be used with aggregate functions. |
ISum |
havingClause(java.lang.String havingClause)
Used to provide manually created Where clause, instead of using API's. |
ISumClause |
or(java.lang.String column)
Used to specify OR condition between where clause. |
ISumClause |
where(java.lang.String column)
Column name of which condition will be specified. |
ISum |
whereClause(java.lang.String whereClause)
Used to provide manually created Where clause, instead of using API's. |
Field Detail |
---|
static final java.lang.String INTERFACE_NAME
Method Detail |
---|
ISumClause where(java.lang.String column)
column
- Name of column.
ISum whereClause(java.lang.String whereClause)
whereClause
- Manually created where clause.
ISumClause and(java.lang.String column)
column
- Name of column on which condition need to be specified.
ISumClause or(java.lang.String column)
column
- Name of column on which condition need to be specified.
ISum groupBy(java.lang.String... columns)
columns
- Name of columns.
ISumClause having(java.lang.String column)
column
- Name of column on which condition need to be applied.
ISum havingClause(java.lang.String havingClause)
havingClause
- Where clause.
ISum column(java.lang.String column)
column
- Name of column.
java.lang.Object execute() throws DatabaseException
DatabaseException
- Throws exception if any error occur while calculating sum.
|
Apache License 2.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |