public class CountHelper extends Object
| Constructor and Description |
|---|
CountHelper() |
| Modifier and Type | Method and Description |
|---|---|
String |
buildCountSelectStatement(String tableName,
String field,
String whereClause,
boolean isDistinct)
returns the select statement as SELECT COUNT([DISTINCT] fieldName) FROM tableName WHERE whereClause
|
public String buildCountSelectStatement(@Nonnull String tableName, @Nullable String field, @Nullable String whereClause, boolean isDistinct)
tableName - the table to queryfield - the field to query - if it is null use * as the fieldNamewhereClause - the WHERE clause, if specifiedisDistinct - whether to add distinct to the queryCopyright © 2016 Atlassian. All rights reserved.