mil.nga.geopackage.user.UserCoreDao Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of geopackage-core Show documentation
Show all versions of geopackage-core Show documentation
Core functionality for GeoPackage implementations
The newest version!
package mil.nga.geopackage.user;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.locationtech.proj4j.units.Units;
import mil.nga.geopackage.BoundingBox;
import mil.nga.geopackage.GeoPackageException;
import mil.nga.geopackage.contents.Contents;
import mil.nga.geopackage.db.AlterTable;
import mil.nga.geopackage.db.CoreSQLUtils;
import mil.nga.geopackage.db.GeoPackageCoreConnection;
import mil.nga.geopackage.db.GeoPackageDao;
import mil.nga.geopackage.db.GeoPackageDataType;
import mil.nga.geopackage.tiles.TileBoundingBoxUtils;
import mil.nga.proj.Projection;
import mil.nga.proj.ProjectionConstants;
import mil.nga.sf.GeometryEnvelope;
import mil.nga.sf.proj.GeometryTransform;
/**
* Abstract User DAO for reading user tables
*
* @param
* column type
* @param
* table type
* @param
* row type
* @param
* result type
*
* @author osbornb
*/
public abstract class UserCoreDao, TRow extends UserCoreRow, TResult extends UserCoreResult> {
/**
* Database
*/
private final String database;
/**
* Database connection
*/
private final GeoPackageCoreConnection db;
/**
* User Database connection
*/
private final UserCoreConnection userDb;
/**
* User table
*/
private final TTable table;
/**
* Projection
*/
protected Projection projection;
/**
* Constructor
*
* @param database
* database name
* @param db
* GeoPackage connection
* @param userDb
* user connection
* @param table
* table
*/
protected UserCoreDao(String database, GeoPackageCoreConnection db,
UserCoreConnection userDb,
TTable table) {
this.database = database;
this.db = db;
this.userDb = userDb;
this.table = table;
}
/**
* Get a new empty row
*
* @return row
*/
public abstract TRow newRow();
/**
* Get the bounding box of the user table data
*
* @return bounding box of user table data
* @since 1.1.0
*/
public abstract BoundingBox getBoundingBox();
/**
* Get the bounding box of the user table data
*
* @param projection
* desired projection
*
* @return bounding box of user table data
* @since 3.1.0
*/
public abstract BoundingBox getBoundingBox(Projection projection);
/**
* Project the provided bounding box in the declared projection to the user
* DAO projection
*
* @param boundingBox
* bounding box
* @param projection
* projection
* @return projected bounding box
* @since 3.1.0
*/
public BoundingBox projectBoundingBox(BoundingBox boundingBox,
Projection projection) {
GeometryTransform projectionTransform = GeometryTransform
.create(projection, getProjection());
BoundingBox projectedBoundingBox = boundingBox
.transform(projectionTransform);
return projectedBoundingBox;
}
/**
* Prepare the result before returning
*
* @param result
* result
* @return prepared result
* @since 2.0.0
*/
protected abstract TResult prepareResult(TResult result);
/**
* Get the database
*
* @return database
*/
public String getDatabase() {
return database;
}
/**
* Get the database connection
*
* @return database connection
*/
public GeoPackageCoreConnection getDb() {
return db;
}
/**
* Get the user database connection
*
* @return user database connection
*/
public UserCoreConnection getUserDb() {
return userDb;
}
/**
* Create a GeoPackage DAO
*
* @param
* DAO type
* @param
* DAO object type
* @param clazz
* DAO class type
* @return GeoPackage DAO
* @since 4.0.0
*/
public , O> D createDao(Class clazz) {
return GeoPackageDao.createDao(db, clazz);
}
/**
* Get the table name
*
* @return table name
*/
public String getTableName() {
return table.getTableName();
}
/**
* Get the table
*
* @return table
*/
public TTable getTable() {
return table;
}
/**
* Check if the table has a primary key column
*
* @return true if has a primary key
* @since 6.2.0
*/
public boolean hasPkColumn() {
return table.hasPkColumn();
}
/**
* Get the primary key column index
*
* @return primary key column index
* @since 6.2.0
*/
public int getPkColumnIndex() {
return table.getPkColumnIndex();
}
/**
* Get the primary key column
*
* @return primary key column
* @since 6.2.0
*/
public TColumn getPkColumn() {
return table.getPkColumn();
}
/**
* Get the primary key column name
*
* @return primary key column name
* @since 6.2.0
*/
public String getPkColumnName() {
return table.getPkColumnName();
}
/**
* Get the table columns
*
* @return columns
* @since 3.5.0
*/
public List getColumns() {
return table.getColumns();
}
/**
* Get the table column names
*
* @return column names
* @since 3.5.0
*/
public String[] getColumnNames() {
return table.getColumnNames();
}
/**
* Get the column count
*
* @return column count
* @since 3.5.0
*/
public int columnCount() {
return table.columnCount();
}
/**
* Get the contents
*
* @return contents
* @since 3.3.0
*/
public Contents getContents() {
return table.getContents();
}
/**
* Get the projection
*
* @return projection
*/
public Projection getProjection() {
return projection;
}
/**
* Is the primary key modifiable
*
* @return true if the primary key is modifiable
* @since 4.0.0
*/
public boolean isPkModifiable() {
return table.isPkModifiable();
}
/**
* Set if the primary key can be modified
*
* @param pkModifiable
* primary key modifiable flag
* @since 4.0.0
*/
public void setPkModifiable(boolean pkModifiable) {
table.setPkModifiable(pkModifiable);
}
/**
* Is value validation against column types enabled
*
* @return true if values are validated against column types
* @since 4.0.0
*/
public boolean isValueValidation() {
return table.isValueValidation();
}
/**
* Set if values should validated against column types
*
* @param valueValidation
* value validation flag
* @since 4.0.0
*/
public void setValueValidation(boolean valueValidation) {
table.setValueValidation(valueValidation);
}
/**
* Drop the user table
*/
public void dropTable() {
CoreSQLUtils.dropTable(db, getTableName());
}
/**
* Raw query
*
* @param sql
* SQL
* @return result
* @since 3.5.0
*/
public TResult rawQuery(String sql) {
return rawQuery(sql, null);
}
/**
* Raw query
*
* @param sql
* SQL
* @param selectionArgs
* selection args
* @return result
* @since 3.5.0
*/
public TResult rawQuery(String sql, String[] selectionArgs) {
return userDb.rawQuery(sql, selectionArgs);
}
/**
* Raw query
*
* @param sql
* SQL
* @param columns
* subset of table columns defined in the SQL
* @param selectionArgs
* selection args
* @return result
* @since 6.2.0
*/
public TResult rawQuery(String sql, String[] columns,
String[] selectionArgs) {
return userDb.rawQuery(sql, columns, selectionArgs);
}
/**
* Query for all rows
*
* @return result
*/
public TResult queryForAll() {
return query();
}
/**
* Query for all rows
*
* @return result
* @since 3.5.0
*/
public TResult query() {
return query(false);
}
/**
* Query for all rows
*
* @param distinct
* distinct rows
* @return result
* @since 4.0.0
*/
public TResult query(boolean distinct) {
return query(distinct, table.getColumnNames());
}
/**
* Query for all rows
*
* @param columns
* columns
*
* @return result
* @since 3.5.0
*/
public TResult query(String[] columns) {
return query(false, columns);
}
/**
* Query for all rows
*
* @param distinct
* distinct rows
* @param columns
* columns
*
* @return result
* @since 4.0.0
*/
public TResult query(boolean distinct, String[] columns) {
TResult result = userDb.query(distinct, getTableName(), columns, null,
null, null, null, null);
prepareResult(result);
return result;
}
/**
* Query for all rows with "columns as" values for corresponding column
* indices. Non null values in the array will be used as "as" values for the
* corresponding column.
*
* @param columnsAs
* columns as values
* @return result
* @since 3.5.0
*/
public TResult queryAs(String[] columnsAs) {
return queryAs(false, columnsAs);
}
/**
* Query for all rows with "columns as" values for corresponding column
* indices. Non null values in the array will be used as "as" values for the
* corresponding column.
*
* @param distinct
* distinct rows
* @param columnsAs
* columns as values
* @return result
* @since 4.0.0
*/
public TResult queryAs(boolean distinct, String[] columnsAs) {
return query(distinct, table.getColumnNames(), columnsAs);
}
/**
* Query for all rows with "columns as" values for corresponding column
* indices. Non null values in the array will be used as "as" values for the
* corresponding column.
*
* @param columns
* columns
* @param columnsAs
* columns as values
* @return result
* @since 3.5.0
*/
public TResult query(String[] columns, String[] columnsAs) {
return query(false, columns, columnsAs);
}
/**
* Query for all rows with "columns as" values for corresponding column
* indices. Non null values in the array will be used as "as" values for the
* corresponding column.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param columnsAs
* columns as values
* @return result
* @since 4.0.0
*/
public TResult query(boolean distinct, String[] columns,
String[] columnsAs) {
TResult result = userDb.query(distinct, getTableName(), columns,
columnsAs, null, null, null, null, null);
prepareResult(result);
return result;
}
/**
* Query SQL for all rows
*
* @return SQL
* @since 3.4.0
*/
public String querySQL() {
return querySQL(false);
}
/**
* Query SQL for all rows
*
* @param distinct
* distinct rows
* @return SQL
* @since 4.0.0
*/
public String querySQL(boolean distinct) {
return querySQL(distinct, table.getColumnNames());
}
/**
* Query SQL for all row ids
*
* @return SQL
* @since 3.4.0
*/
public String queryIdsSQL() {
return queryIdsSQL(false);
}
/**
* Query SQL for all row ids
*
* @param distinct
* distinct rows
* @return SQL
* @since 4.0.0
*/
public String queryIdsSQL(boolean distinct) {
return querySQL(distinct, new String[] { table.getPkColumnName() });
}
/**
* Query SQL for all rows
*
* @param columns
* columns
* @return SQL
* @since 3.4.0
*/
public String querySQL(String[] columns) {
return querySQL(false, columns);
}
/**
* Query SQL for all rows
*
* @param distinct
* distinct rows
* @param columns
* columns
* @return SQL
* @since 4.0.0
*/
public String querySQL(boolean distinct, String[] columns) {
return userDb.querySQL(distinct, getTableName(), columns, null, null,
null, null, null, null);
}
/**
* Query for the row where the field equals the value
*
* @param fieldName
* field name
* @param value
* value
* @return result
*/
public TResult queryForEq(String fieldName, Object value) {
return queryForEq(false, fieldName, value);
}
/**
* Query for the row where the field equals the value
*
* @param distinct
* distinct rows
* @param fieldName
* field name
* @param value
* value
* @return result
* @since 4.0.0
*/
public TResult queryForEq(boolean distinct, String fieldName,
Object value) {
return queryForEq(distinct, table.getColumnNames(), fieldName, value);
}
/**
* Query for the row where the field equals the value
*
* @param columns
* columns
* @param fieldName
* field name
* @param value
* value
* @return result
* @since 3.5.0
*/
public TResult queryForEq(String[] columns, String fieldName,
Object value) {
return queryForEq(false, columns, fieldName, value);
}
/**
* Query for the row where the field equals the value
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param fieldName
* field name
* @param value
* value
* @return result
* @since 4.0.0
*/
public TResult queryForEq(boolean distinct, String[] columns,
String fieldName, Object value) {
return queryForEq(distinct, columns, fieldName, value, null, null,
null);
}
/**
* Count where the field equals the value
*
* @param fieldName
* field name
* @param value
* value
* @return count
* @since 3.5.0
*/
public int countForEq(String fieldName, Object value) {
return countForEq(false, null, fieldName, value);
}
/**
* Count where the field equals the value
*
* @param column
* count column name
* @param fieldName
* field name
* @param value
* value
* @return count
* @since 4.0.0
*/
public int countForEq(String column, String fieldName, Object value) {
return countForEq(false, column, fieldName, value);
}
/**
* Count where the field equals the value
*
* @param distinct
* distinct column values
* @param column
* count column name
* @param fieldName
* field name
* @param value
* value
* @return count
* @since 4.0.0
*/
public int countForEq(boolean distinct, String column, String fieldName,
Object value) {
return countForEq(distinct, column, fieldName, value, null, null, null);
}
/**
* Query for the row where the field equals the value
*
* @param fieldName
* field name
* @param value
* value
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @return result
*/
public TResult queryForEq(String fieldName, Object value, String groupBy,
String having, String orderBy) {
return queryForEq(false, fieldName, value, groupBy, having, orderBy);
}
/**
* Query for the row where the field equals the value
*
* @param distinct
* distinct rows
* @param fieldName
* field name
* @param value
* value
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @return result
* @since 4.0.0
*/
public TResult queryForEq(boolean distinct, String fieldName, Object value,
String groupBy, String having, String orderBy) {
return queryForEq(distinct, table.getColumnNames(), fieldName, value,
groupBy, having, orderBy);
}
/**
* Query for the row where the field equals the value
*
* @param columns
* columns
* @param fieldName
* field name
* @param value
* value
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @return result
* @since 3.5.0
*/
public TResult queryForEq(String[] columns, String fieldName, Object value,
String groupBy, String having, String orderBy) {
return queryForEq(false, columns, fieldName, value, groupBy, having,
orderBy);
}
/**
* Query for the row where the field equals the value
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param fieldName
* field name
* @param value
* value
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @return result
* @since 4.0.0
*/
public TResult queryForEq(boolean distinct, String[] columns,
String fieldName, Object value, String groupBy, String having,
String orderBy) {
String where = buildWhere(fieldName, value);
String[] whereArgs = buildWhereArgs(value);
TResult result = userDb.query(distinct, getTableName(), columns, where,
whereArgs, groupBy, having, orderBy);
prepareResult(result);
return result;
}
/**
* Count where the field equals the value
*
* @param fieldName
* field name
* @param value
* value
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @return count
* @since 3.5.0
*/
public int countForEq(String fieldName, Object value, String groupBy,
String having, String orderBy) {
return countForEq(false, null, fieldName, value, groupBy, having,
orderBy);
}
/**
* Count where the field equals the value
*
* @param column
* count column name
* @param fieldName
* field name
* @param value
* value
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @return count
* @since 4.0.0
*/
public int countForEq(String column, String fieldName, Object value,
String groupBy, String having, String orderBy) {
return countForEq(false, column, fieldName, value, groupBy, having,
orderBy);
}
/**
* Count where the field equals the value
*
* @param distinct
* distinct column values
* @param column
* count column name
* @param fieldName
* field name
* @param value
* value
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @return count
* @since 4.0.0
*/
public int countForEq(boolean distinct, String column, String fieldName,
Object value, String groupBy, String having, String orderBy) {
String where = buildWhere(fieldName, value);
String[] whereArgs = buildWhereArgs(value);
return count(distinct, column, where, whereArgs);
}
/**
* Query for the row where the field equals the value
*
* @param fieldName
* field name
* @param value
* column value
* @return result
*/
public TResult queryForEq(String fieldName, ColumnValue value) {
return queryForEq(false, fieldName, value);
}
/**
* Query for the row where the field equals the value
*
* @param distinct
* distinct rows
* @param fieldName
* field name
* @param value
* column value
* @return result
* @since 4.0.0
*/
public TResult queryForEq(boolean distinct, String fieldName,
ColumnValue value) {
return queryForEq(distinct, table.getColumnNames(), fieldName, value);
}
/**
* Query for the row where the field equals the value
*
* @param columns
* columns
* @param fieldName
* field name
* @param value
* column value
* @return result
* @since 3.5.0
*/
public TResult queryForEq(String[] columns, String fieldName,
ColumnValue value) {
return queryForEq(false, columns, fieldName, value);
}
/**
* Query for the row where the field equals the value
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param fieldName
* field name
* @param value
* column value
* @return result
* @since 4.0.0
*/
public TResult queryForEq(boolean distinct, String[] columns,
String fieldName, ColumnValue value) {
String where = buildWhere(fieldName, value);
String[] whereArgs = buildWhereArgs(value);
TResult result = userDb.query(distinct, getTableName(), columns, where,
whereArgs, null, null, null);
prepareResult(result);
return result;
}
/**
* Count where the field equals the value
*
* @param fieldName
* field name
* @param value
* column value
* @return count
* @since 3.5.0
*/
public int countForEq(String fieldName, ColumnValue value) {
return countForEq(false, null, fieldName, value);
}
/**
* Count where the field equals the value
*
* @param column
* count column name
* @param fieldName
* field name
* @param value
* column value
* @return count
* @since 4.0.0
*/
public int countForEq(String column, String fieldName, ColumnValue value) {
return countForEq(false, column, fieldName, value);
}
/**
* Count where the field equals the value
*
* @param distinct
* distinct column values
* @param column
* count column name
* @param fieldName
* field name
* @param value
* column value
* @return count
* @since 4.0.0
*/
public int countForEq(boolean distinct, String column, String fieldName,
ColumnValue value) {
String where = buildWhere(fieldName, value);
String[] whereArgs = buildWhereArgs(value);
return count(distinct, column, where, whereArgs);
}
/**
* Query for the row where the field is like the value
*
* @param fieldName
* field name
* @param value
* value
* @return result
* @since 3.0.1
*/
public TResult queryForLike(String fieldName, Object value) {
return queryForLike(false, fieldName, value);
}
/**
* Query for the row where the field is like the value
*
* @param distinct
* distinct rows
* @param fieldName
* field name
* @param value
* value
* @return result
* @since 4.0.0
*/
public TResult queryForLike(boolean distinct, String fieldName,
Object value) {
return queryForLike(distinct, table.getColumnNames(), fieldName, value);
}
/**
* Query for the row where the field is like the value
*
* @param columns
* columns
* @param fieldName
* field name
* @param value
* value
* @return result
* @since 3.5.0
*/
public TResult queryForLike(String[] columns, String fieldName,
Object value) {
return queryForLike(false, columns, fieldName, value);
}
/**
* Query for the row where the field is like the value
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param fieldName
* field name
* @param value
* value
* @return result
* @since 4.0.0
*/
public TResult queryForLike(boolean distinct, String[] columns,
String fieldName, Object value) {
return queryForLike(distinct, columns, fieldName, value, null, null,
null);
}
/**
* Count where the field is like the value
*
* @param fieldName
* field name
* @param value
* value
* @return count
* @since 3.5.0
*/
public int countForLike(String fieldName, Object value) {
return countForLike(false, null, fieldName, value);
}
/**
* Count where the field is like the value
*
* @param column
* count column name
* @param fieldName
* field name
* @param value
* value
* @return count
* @since 4.0.0
*/
public int countForLike(String column, String fieldName, Object value) {
return countForLike(false, column, fieldName, value);
}
/**
* Count where the field is like the value
*
* @param distinct
* distinct column values
* @param column
* count column name
* @param fieldName
* field name
* @param value
* value
* @return count
* @since 4.0.0
*/
public int countForLike(boolean distinct, String column, String fieldName,
Object value) {
return countForLike(distinct, column, fieldName, value, null, null,
null);
}
/**
* Query for the row where the field equals the value
*
* @param fieldName
* field name
* @param value
* value
* @param groupBy
* group by statement
* @param having
* having statement
* @param orderBy
* order by statement
* @return result
* @since 3.0.1
*/
public TResult queryForLike(String fieldName, Object value, String groupBy,
String having, String orderBy) {
return queryForLike(false, fieldName, value, groupBy, having, orderBy);
}
/**
* Query for the row where the field equals the value
*
* @param distinct
* distinct rows
* @param fieldName
* field name
* @param value
* value
* @param groupBy
* group by statement
* @param having
* having statement
* @param orderBy
* order by statement
* @return result
* @since 4.0.0
*/
public TResult queryForLike(boolean distinct, String fieldName,
Object value, String groupBy, String having, String orderBy) {
return queryForLike(distinct, table.getColumnNames(), fieldName, value,
groupBy, having, orderBy);
}
/**
* Query for the row where the field equals the value
*
* @param columns
* columns
* @param fieldName
* field name
* @param value
* value
* @param groupBy
* group by statement
* @param having
* having statement
* @param orderBy
* order by statement
* @return result
* @since 3.5.0
*/
public TResult queryForLike(String[] columns, String fieldName,
Object value, String groupBy, String having, String orderBy) {
return queryForLike(false, columns, fieldName, value, groupBy, having,
orderBy);
}
/**
* Query for the row where the field equals the value
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param fieldName
* field name
* @param value
* value
* @param groupBy
* group by statement
* @param having
* having statement
* @param orderBy
* order by statement
* @return result
* @since 4.0.0
*/
public TResult queryForLike(boolean distinct, String[] columns,
String fieldName, Object value, String groupBy, String having,
String orderBy) {
String where = buildWhereLike(fieldName, value);
String[] whereArgs = buildWhereArgs(value);
TResult result = userDb.query(distinct, getTableName(), columns, where,
whereArgs, groupBy, having, orderBy);
prepareResult(result);
return result;
}
/**
* Count where the field equals the value
*
* @param fieldName
* field name
* @param value
* value
* @param groupBy
* group by statement
* @param having
* having statement
* @param orderBy
* order by statement
* @return count
* @since 3.5.0
*/
public int countForLike(String fieldName, Object value, String groupBy,
String having, String orderBy) {
return countForLike(false, null, fieldName, value, groupBy, having,
orderBy);
}
/**
* Count where the field equals the value
*
* @param column
* count column name
* @param fieldName
* field name
* @param value
* value
* @param groupBy
* group by statement
* @param having
* having statement
* @param orderBy
* order by statement
* @return count
* @since 4.0.0
*/
public int countForLike(String column, String fieldName, Object value,
String groupBy, String having, String orderBy) {
return countForLike(false, column, fieldName, value, groupBy, having,
orderBy);
}
/**
* Count where the field equals the value
*
* @param distinct
* distinct column values
* @param column
* count column name
* @param fieldName
* field name
* @param value
* value
* @param groupBy
* group by statement
* @param having
* having statement
* @param orderBy
* order by statement
* @return count
* @since 4.0.0
*/
public int countForLike(boolean distinct, String column, String fieldName,
Object value, String groupBy, String having, String orderBy) {
String where = buildWhereLike(fieldName, value);
String[] whereArgs = buildWhereArgs(value);
return count(distinct, column, where, whereArgs);
}
/**
* Query for the row where the field is like the value
*
* @param fieldName
* field name
* @param value
* column value
* @return result
* @since 3.0.1
*/
public TResult queryForLike(String fieldName, ColumnValue value) {
return queryForLike(false, fieldName, value);
}
/**
* Query for the row where the field is like the value
*
* @param distinct
* distinct rows
* @param fieldName
* field name
* @param value
* column value
* @return result
* @since 4.0.0
*/
public TResult queryForLike(boolean distinct, String fieldName,
ColumnValue value) {
return queryForLike(distinct, table.getColumnNames(), fieldName, value);
}
/**
* Query for the row where the field is like the value
*
* @param columns
* columns
* @param fieldName
* field name
* @param value
* column value
* @return result
* @since 3.5.0
*/
public TResult queryForLike(String[] columns, String fieldName,
ColumnValue value) {
return queryForLike(false, columns, fieldName, value);
}
/**
* Query for the row where the field is like the value
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param fieldName
* field name
* @param value
* column value
* @return result
* @since 4.0.0
*/
public TResult queryForLike(boolean distinct, String[] columns,
String fieldName, ColumnValue value) {
String where = buildWhereLike(fieldName, value);
String[] whereArgs = buildWhereArgs(value);
TResult result = userDb.query(distinct, getTableName(), columns, where,
whereArgs, null, null, null);
prepareResult(result);
return result;
}
/**
* Count where the field is like the value
*
* @param fieldName
* field name
* @param value
* column value
* @return count
* @since 3.5.0
*/
public int countForLike(String fieldName, ColumnValue value) {
return countForLike(false, null, fieldName, value);
}
/**
* Count where the field is like the value
*
* @param column
* count column name
* @param fieldName
* field name
* @param value
* column value
* @return count
* @since 4.0.0
*/
public int countForLike(String column, String fieldName,
ColumnValue value) {
return countForLike(false, column, fieldName, value);
}
/**
* Count where the field is like the value
*
* @param distinct
* distinct column values
* @param column
* count column name
* @param fieldName
* field name
* @param value
* column value
* @return count
* @since 4.0.0
*/
public int countForLike(boolean distinct, String column, String fieldName,
ColumnValue value) {
String where = buildWhereLike(fieldName, value);
String[] whereArgs = buildWhereArgs(value);
return count(distinct, column, where, whereArgs);
}
/**
* Query for the row where all fields match their values
*
* @param fieldValues
* field values
* @return result
*/
public TResult queryForFieldValues(Map fieldValues) {
return queryForFieldValues(false, fieldValues);
}
/**
* Query for the row where all fields match their values
*
* @param distinct
* distinct rows
* @param fieldValues
* field values
* @return result
* @since 4.0.0
*/
public TResult queryForFieldValues(boolean distinct,
Map fieldValues) {
return queryForFieldValues(distinct, table.getColumnNames(),
fieldValues);
}
/**
* Query for the row where all fields match their values
*
* @param columns
* columns
* @param fieldValues
* field values
* @return result
* @since 3.5.0
*/
public TResult queryForFieldValues(String[] columns,
Map fieldValues) {
return queryForFieldValues(false, columns, fieldValues);
}
/**
* Query for the row where all fields match their values
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param fieldValues
* field values
* @return result
* @since 4.0.0
*/
public TResult queryForFieldValues(boolean distinct, String[] columns,
Map fieldValues) {
String where = buildWhere(fieldValues.entrySet());
String[] whereArgs = buildWhereArgs(fieldValues.values());
TResult result = userDb.query(distinct, getTableName(), columns, where,
whereArgs, null, null, null);
prepareResult(result);
return result;
}
/**
* Count where all fields match their values
*
* @param fieldValues
* field values
* @return count
* @since 3.5.0
*/
public int countForFieldValues(Map fieldValues) {
return countForFieldValues(false, null, fieldValues);
}
/**
* Count where all fields match their values
*
* @param column
* count column name
* @param fieldValues
* field values
* @return count
* @since 4.0.0
*/
public int countForFieldValues(String column,
Map fieldValues) {
return countForFieldValues(false, column, fieldValues);
}
/**
* Count where all fields match their values
*
* @param distinct
* distinct column values
* @param column
* count column name
* @param fieldValues
* field values
* @return count
* @since 4.0.0
*/
public int countForFieldValues(boolean distinct, String column,
Map fieldValues) {
String where = buildWhere(fieldValues.entrySet());
String[] whereArgs = buildWhereArgs(fieldValues.values());
return count(distinct, column, where, whereArgs);
}
/**
* Query for the row where all fields match their values
*
* @param fieldValues
* field values
* @return result
*/
public TResult queryForValueFieldValues(
Map fieldValues) {
return queryForValueFieldValues(false, fieldValues);
}
/**
* Query for the row where all fields match their values
*
* @param distinct
* distinct rows
* @param fieldValues
* field values
* @return result
* @since 4.0.0
*/
public TResult queryForValueFieldValues(boolean distinct,
Map fieldValues) {
return queryForValueFieldValues(distinct, table.getColumnNames(),
fieldValues);
}
/**
* Query for the row where all fields match their values
*
* @param columns
* columns
* @param fieldValues
* field values
* @return result
* @since 3.5.0
*/
public TResult queryForValueFieldValues(String[] columns,
Map fieldValues) {
return queryForValueFieldValues(false, columns, fieldValues);
}
/**
* Query for the row where all fields match their values
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param fieldValues
* field values
* @return result
* @since 4.0.0
*/
public TResult queryForValueFieldValues(boolean distinct, String[] columns,
Map fieldValues) {
String where = buildValueWhere(fieldValues.entrySet());
String[] whereArgs = buildValueWhereArgs(fieldValues.values());
TResult result = userDb.query(distinct, getTableName(), columns, where,
whereArgs, null, null, null);
prepareResult(result);
return result;
}
/**
* Count where all fields match their values
*
* @param fieldValues
* field values
* @return count
* @since 3.5.0
*/
public int countForValueFieldValues(Map fieldValues) {
return countForValueFieldValues(false, null, fieldValues);
}
/**
* Count where all fields match their values
*
* @param column
* count column name
* @param fieldValues
* field values
* @return count
* @since 4.0.0
*/
public int countForValueFieldValues(String column,
Map fieldValues) {
return countForValueFieldValues(false, column, fieldValues);
}
/**
* Count where all fields match their values
*
* @param distinct
* distinct column values
* @param column
* count column name
* @param fieldValues
* field values
* @return count
* @since 4.0.0
*/
public int countForValueFieldValues(boolean distinct, String column,
Map fieldValues) {
String where = buildValueWhere(fieldValues.entrySet());
String[] whereArgs = buildValueWhereArgs(fieldValues.values());
return count(distinct, column, where, whereArgs);
}
/**
* Query for the row with the provided id
*
* @param id
* id
* @return result
*/
public TResult queryForId(long id) {
return queryForId(false, id);
}
/**
* Query for the row with the provided id
*
* @param distinct
* distinct rows
* @param id
* id
* @return result
* @since 4.0.0
*/
public TResult queryForId(boolean distinct, long id) {
return queryForId(distinct, table.getColumnNames(), id);
}
/**
* Query for the row with the provided id
*
* @param columns
* columns
* @param id
* id
* @return result
* @since 3.5.0
*/
public TResult queryForId(String[] columns, long id) {
return queryForId(false, columns, id);
}
/**
* Query for the row with the provided id
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param id
* id
* @return result
* @since 4.0.0
*/
public TResult queryForId(boolean distinct, String[] columns, long id) {
String where = getPkWhere(id);
String[] whereArgs = getPkWhereArgs(id);
TResult result = userDb.query(distinct, getTableName(), columns, where,
whereArgs, null, null, null);
prepareResult(result);
return result;
}
/**
* Query for the row with the provided id
*
* @param id
* id
* @return row
*/
public TRow queryForIdRow(long id) {
return queryForIdRow(false, id);
}
/**
* Query for the row with the provided id
*
* @param distinct
* distinct rows
* @param id
* id
* @return row
* @since 4.0.0
*/
public TRow queryForIdRow(boolean distinct, long id) {
return queryForIdRow(distinct, table.getColumnNames(), id);
}
/**
* Query for the row with the provided id
*
* @param columns
* columns
* @param id
* id
* @return row
* @since 3.5.0
*/
public TRow queryForIdRow(String[] columns, long id) {
return queryForIdRow(false, columns, id);
}
/**
* Query for the row with the provided id
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param id
* id
* @return row
* @since 4.0.0
*/
public TRow queryForIdRow(boolean distinct, String[] columns, long id) {
TRow row = null;
TResult readCursor = queryForId(distinct, columns, id);
if (readCursor.moveToNext()) {
row = readCursor.getRow();
}
readCursor.close();
return row;
}
/**
* Query for rows by ids in the nested SQL query
*
* @param nestedSQL
* nested SQL
* @return result
* @since 3.4.0
*/
public TResult queryIn(String nestedSQL) {
return queryIn(false, nestedSQL);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @return result
* @since 4.0.0
*/
public TResult queryIn(boolean distinct, String nestedSQL) {
return queryIn(distinct, table.getColumnNames(), nestedSQL);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @return result
* @since 3.5.0
*/
public TResult queryIn(String[] columns, String nestedSQL) {
return queryIn(false, columns, nestedSQL);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @return result
* @since 4.0.0
*/
public TResult queryIn(boolean distinct, String[] columns,
String nestedSQL) {
return queryIn(distinct, columns, nestedSQL, null, null, null);
}
/**
* Get the count in the nested SQL query
*
* @param nestedSQL
* nested SQL
* @return count
* @since 3.4.0
*/
public int countIn(String nestedSQL) {
return countIn(false, null, nestedSQL);
}
/**
* Get the count in the nested SQL query
*
* @param column
* count column name
* @param nestedSQL
* nested SQL
* @return count
* @since 4.0.0
*/
public int countColumnIn(String column, String nestedSQL) {
return countIn(false, column, nestedSQL);
}
/**
* Get the count in the nested SQL query
*
* @param distinct
* distinct column values
* @param column
* count column name
* @param nestedSQL
* nested SQL
* @return count
* @since 4.0.0
*/
public int countIn(boolean distinct, String column, String nestedSQL) {
return countIn(distinct, column, nestedSQL, null, null, null);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @return result
* @since 3.4.0
*/
public TResult queryIn(String nestedSQL, String[] nestedArgs) {
return queryIn(false, nestedSQL, nestedArgs);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @return result
* @since 4.0.0
*/
public TResult queryIn(boolean distinct, String nestedSQL,
String[] nestedArgs) {
return queryIn(distinct, table.getColumnNames(), nestedSQL, nestedArgs);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @return result
* @since 3.5.0
*/
public TResult queryIn(String[] columns, String nestedSQL,
String[] nestedArgs) {
return queryIn(false, columns, nestedSQL, nestedArgs);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @return result
* @since 4.0.0
*/
public TResult queryIn(boolean distinct, String[] columns, String nestedSQL,
String[] nestedArgs) {
return queryIn(distinct, columns, nestedSQL, nestedArgs, null, null);
}
/**
* Get the count in the nested SQL query
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @return count
* @since 3.4.0
*/
public int countIn(String nestedSQL, String[] nestedArgs) {
return countIn(false, null, nestedSQL, nestedArgs);
}
/**
* Get the count in the nested SQL query
*
* @param column
* count column name
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @return count
* @since 4.0.0
*/
public int countColumnIn(String column, String nestedSQL,
String[] nestedArgs) {
return countIn(false, column, nestedSQL, nestedArgs);
}
/**
* Get the count in the nested SQL query
*
* @param distinct
* distinct column values
* @param column
* count column name
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @return count
* @since 4.0.0
*/
public int countIn(boolean distinct, String column, String nestedSQL,
String[] nestedArgs) {
return countIn(distinct, column, nestedSQL, nestedArgs, null, null);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @return result
* @since 3.4.0
*/
public TResult queryIn(String nestedSQL, Map fieldValues) {
return queryIn(false, nestedSQL, fieldValues);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @return result
* @since 4.0.0
*/
public TResult queryIn(boolean distinct, String nestedSQL,
Map fieldValues) {
return queryIn(distinct, table.getColumnNames(), nestedSQL,
fieldValues);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @return result
* @since 3.5.0
*/
public TResult queryIn(String[] columns, String nestedSQL,
Map fieldValues) {
return queryIn(false, columns, nestedSQL, fieldValues);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @return result
* @since 4.0.0
*/
public TResult queryIn(boolean distinct, String[] columns, String nestedSQL,
Map fieldValues) {
return queryIn(distinct, columns, nestedSQL, null, fieldValues);
}
/**
* Get the count in the nested SQL query
*
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @return count
* @since 3.4.0
*/
public int countIn(String nestedSQL, Map fieldValues) {
return countIn(false, null, nestedSQL, fieldValues);
}
/**
* Get the count in the nested SQL query
*
* @param column
* count column name
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @return count
* @since 4.0.0
*/
public int countIn(String column, String nestedSQL,
Map fieldValues) {
return countIn(false, column, nestedSQL, fieldValues);
}
/**
* Get the count in the nested SQL query
*
* @param distinct
* distinct column values
* @param column
* count column name
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @return count
* @since 4.0.0
*/
public int countIn(boolean distinct, String column, String nestedSQL,
Map fieldValues) {
return countIn(distinct, column, nestedSQL, null, fieldValues);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @return result
* @since 3.4.0
*/
public TResult queryIn(String nestedSQL, String[] nestedArgs,
Map fieldValues) {
return queryIn(false, nestedSQL, nestedArgs, fieldValues);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @return result
* @since 4.0.0
*/
public TResult queryIn(boolean distinct, String nestedSQL,
String[] nestedArgs, Map fieldValues) {
return queryIn(distinct, table.getColumnNames(), nestedSQL, nestedArgs,
fieldValues);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @return result
* @since 3.5.0
*/
public TResult queryIn(String[] columns, String nestedSQL,
String[] nestedArgs, Map fieldValues) {
return queryIn(false, columns, nestedSQL, nestedArgs, fieldValues);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @return result
* @since 4.0.0
*/
public TResult queryIn(boolean distinct, String[] columns, String nestedSQL,
String[] nestedArgs, Map fieldValues) {
String where = buildWhere(fieldValues.entrySet());
String[] whereArgs = buildWhereArgs(fieldValues.values());
return queryIn(distinct, columns, nestedSQL, nestedArgs, where,
whereArgs);
}
/**
* Get the count in the nested SQL query
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @return count
* @since 3.4.0
*/
public int countIn(String nestedSQL, String[] nestedArgs,
Map fieldValues) {
return countIn(false, null, nestedSQL, nestedArgs, fieldValues);
}
/**
* Get the count in the nested SQL query
*
* @param column
* count column name
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @return count
* @since 4.0.0
*/
public int countIn(String column, String nestedSQL, String[] nestedArgs,
Map fieldValues) {
return countIn(false, column, nestedSQL, nestedArgs, fieldValues);
}
/**
* Get the count in the nested SQL query
*
* @param distinct
* distinct column values
* @param column
* count column name
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @return count
* @since 4.0.0
*/
public int countIn(boolean distinct, String column, String nestedSQL,
String[] nestedArgs, Map fieldValues) {
String where = buildWhere(fieldValues.entrySet());
String[] whereArgs = buildWhereArgs(fieldValues.values());
return countIn(distinct, column, nestedSQL, nestedArgs, where,
whereArgs);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @return result
* @since 3.4.0
*/
public TResult queryIn(String nestedSQL, String[] nestedArgs,
String where) {
return queryIn(false, nestedSQL, nestedArgs, where);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @return result
* @since 4.0.0
*/
public TResult queryIn(boolean distinct, String nestedSQL,
String[] nestedArgs, String where) {
return queryIn(distinct, table.getColumnNames(), nestedSQL, nestedArgs,
where);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @return result
* @since 3.5.0
*/
public TResult queryIn(String[] columns, String nestedSQL,
String[] nestedArgs, String where) {
return queryIn(false, columns, nestedSQL, nestedArgs, where);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @return result
* @since 4.0.0
*/
public TResult queryIn(boolean distinct, String[] columns, String nestedSQL,
String[] nestedArgs, String where) {
return queryIn(distinct, columns, nestedSQL, nestedArgs, where, null);
}
/**
* Get the count in the nested SQL query
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @return count
* @since 3.4.0
*/
public int countIn(String nestedSQL, String[] nestedArgs, String where) {
return countIn(false, null, nestedSQL, nestedArgs, where);
}
/**
* Get the count in the nested SQL query
*
* @param column
* count column name
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @return count
* @since 4.0.0
*/
public int countIn(String column, String nestedSQL, String[] nestedArgs,
String where) {
return countIn(false, column, nestedSQL, nestedArgs, where);
}
/**
* Get the count in the nested SQL query
*
* @param distinct
* distinct column values
* @param column
* count column name
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @return count
* @since 4.0.0
*/
public int countIn(boolean distinct, String column, String nestedSQL,
String[] nestedArgs, String where) {
return countIn(distinct, column, nestedSQL, nestedArgs, where, null);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @return result
* @since 3.4.0
*/
public TResult queryIn(String nestedSQL, String where) {
return queryIn(false, nestedSQL, where);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @return result
* @since 4.0.0
*/
public TResult queryIn(boolean distinct, String nestedSQL, String where) {
return queryIn(distinct, table.getColumnNames(), nestedSQL, where);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @return result
* @since 3.5.0
*/
public TResult queryIn(String[] columns, String nestedSQL, String where) {
return queryIn(false, columns, nestedSQL, where);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @return result
* @since 4.0.0
*/
public TResult queryIn(boolean distinct, String[] columns, String nestedSQL,
String where) {
return queryIn(distinct, columns, nestedSQL, null, where, null);
}
/**
* Get the count in the nested SQL query
*
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @return count
* @since 3.4.0
*/
public int countIn(String nestedSQL, String where) {
return countIn(false, null, nestedSQL, where);
}
/**
* Get the count in the nested SQL query
*
* @param column
* count column name
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @return count
* @since 4.0.0
*/
public int countIn(String column, String nestedSQL, String where) {
return countIn(false, column, nestedSQL, where);
}
/**
* Get the count in the nested SQL query
*
* @param distinct
* distinct column values
* @param column
* count column name
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @return count
* @since 4.0.0
*/
public int countIn(boolean distinct, String column, String nestedSQL,
String where) {
return countIn(distinct, column, nestedSQL, null, where, null);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @return result
* @since 3.4.0
*/
public TResult queryIn(String nestedSQL, String where, String[] whereArgs) {
return queryIn(false, nestedSQL, where, whereArgs);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @return result
* @since 4.0.0
*/
public TResult queryIn(boolean distinct, String nestedSQL, String where,
String[] whereArgs) {
return queryIn(distinct, table.getColumnNames(), nestedSQL, where,
whereArgs);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @return result
* @since 3.5.0
*/
public TResult queryIn(String[] columns, String nestedSQL, String where,
String[] whereArgs) {
return queryIn(false, columns, nestedSQL, where, whereArgs);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @return result
* @since 4.0.0
*/
public TResult queryIn(boolean distinct, String[] columns, String nestedSQL,
String where, String[] whereArgs) {
return queryIn(distinct, columns, nestedSQL, null, where, whereArgs);
}
/**
* Get the count in the nested SQL query
*
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @return count
* @since 3.4.0
*/
public int countIn(String nestedSQL, String where, String[] whereArgs) {
return countIn(false, null, nestedSQL, where, whereArgs);
}
/**
* Get the count in the nested SQL query
*
* @param column
* count column name
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @return count
* @since 4.0.0
*/
public int countIn(String column, String nestedSQL, String where,
String[] whereArgs) {
return countIn(false, column, nestedSQL, where, whereArgs);
}
/**
* Get the count in the nested SQL query
*
* @param distinct
* distinct column values
* @param column
* count column name
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @return count
* @since 4.0.0
*/
public int countIn(boolean distinct, String column, String nestedSQL,
String where, String[] whereArgs) {
return countIn(distinct, column, nestedSQL, null, where, whereArgs);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @return result
* @since 3.4.0
*/
public TResult queryIn(String nestedSQL, String[] nestedArgs, String where,
String[] whereArgs) {
return queryIn(false, nestedSQL, nestedArgs, where, whereArgs);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @return result
* @since 4.0.0
*/
public TResult queryIn(boolean distinct, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs) {
return queryIn(distinct, table.getColumnNames(), nestedSQL, nestedArgs,
where, whereArgs);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @return result
* @since 3.5.0
*/
public TResult queryIn(String[] columns, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs) {
return queryIn(false, columns, nestedSQL, nestedArgs, where, whereArgs);
}
/**
* Query for rows by ids in the nested SQL query
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @return result
* @since 4.0.0
*/
public TResult queryIn(boolean distinct, String[] columns, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs) {
String whereClause = buildWhereIn(nestedSQL, where);
String[] args = buildWhereInArgs(nestedArgs, whereArgs);
return query(distinct, columns, whereClause, args);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, int limit) {
return queryInForChunk(nestedSQL, table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, int limit, long offset) {
return queryInForChunk(nestedSQL, table.getPkColumnName(), limit,
offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String orderBy,
int limit) {
return queryInForChunk(false, table.getColumnNames(), nestedSQL, null,
null, null, null, null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String orderBy, int limit,
long offset) {
return queryInForChunk(false, table.getColumnNames(), nestedSQL, null,
null, null, null, null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String groupBy,
String having, String orderBy, int limit) {
return queryInForChunk(false, nestedSQL, groupBy, having, orderBy,
limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String groupBy,
String having, String orderBy, int limit, long offset) {
return queryInForChunk(false, nestedSQL, groupBy, having, orderBy,
limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
int limit) {
return queryInForChunk(distinct, nestedSQL, table.getPkColumnName(),
limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
int limit, long offset) {
return queryInForChunk(distinct, nestedSQL, table.getPkColumnName(),
limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String orderBy, int limit) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
null, null, null, null, null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String orderBy, int limit, long offset) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
null, null, null, null, null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String groupBy, String having, String orderBy, int limit) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String groupBy, String having, String orderBy, int limit,
long offset) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
groupBy, having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
int limit) {
return queryInForChunk(columns, nestedSQL, table.getPkColumnName(),
limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
int limit, long offset) {
return queryInForChunk(columns, nestedSQL, table.getPkColumnName(),
limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String orderBy, int limit) {
return queryInForChunk(false, columns, nestedSQL, null, null, null,
null, null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String orderBy, int limit, long offset) {
return queryInForChunk(false, columns, nestedSQL, null, null, null,
null, null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String groupBy, String having, String orderBy, int limit) {
return queryInForChunk(false, columns, nestedSQL, groupBy, having,
orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String groupBy, String having, String orderBy, int limit,
long offset) {
return queryInForChunk(false, columns, nestedSQL, groupBy, having,
orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, int limit) {
return queryInForChunk(distinct, columns, nestedSQL,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, int limit, long offset) {
return queryInForChunk(distinct, columns, nestedSQL,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String orderBy, int limit) {
return queryInForChunk(distinct, columns, nestedSQL, null, null, null,
null, null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String orderBy, int limit, long offset) {
return queryInForChunk(distinct, columns, nestedSQL, null, null, null,
null, null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String groupBy, String having, String orderBy,
int limit) {
return queryInForChunk(distinct, columns, nestedSQL, null, null, null,
groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String groupBy, String having, String orderBy,
int limit, long offset) {
return queryInForChunk(distinct, columns, nestedSQL, null, null, null,
groupBy, having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
int limit) {
return queryInForChunk(nestedSQL, nestedArgs, table.getPkColumnName(),
limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
int limit, long offset) {
return queryInForChunk(nestedSQL, nestedArgs, table.getPkColumnName(),
limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
String orderBy, int limit) {
return queryInForChunk(false, table.getColumnNames(), nestedSQL,
nestedArgs, null, null, null, null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
String orderBy, int limit, long offset) {
return queryInForChunk(false, table.getColumnNames(), nestedSQL,
nestedArgs, null, null, null, null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
String groupBy, String having, String orderBy, int limit) {
return queryInForChunk(false, nestedSQL, nestedArgs, groupBy, having,
orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
String groupBy, String having, String orderBy, int limit,
long offset) {
return queryInForChunk(false, nestedSQL, nestedArgs, groupBy, having,
orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, int limit) {
return queryInForChunk(distinct, nestedSQL, nestedArgs,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, int limit, long offset) {
return queryInForChunk(distinct, nestedSQL, nestedArgs,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, String orderBy, int limit) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
nestedArgs, null, null, null, null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, String orderBy, int limit, long offset) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
nestedArgs, null, null, null, null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, String groupBy, String having, String orderBy,
int limit) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
nestedArgs, groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, String groupBy, String having, String orderBy,
int limit, long offset) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
nestedArgs, groupBy, having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, int limit) {
return queryInForChunk(columns, nestedSQL, nestedArgs,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, int limit, long offset) {
return queryInForChunk(columns, nestedSQL, nestedArgs,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, String orderBy, int limit) {
return queryInForChunk(false, columns, nestedSQL, nestedArgs, null,
null, null, null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, String orderBy, int limit, long offset) {
return queryInForChunk(false, columns, nestedSQL, nestedArgs, null,
null, null, null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, String groupBy, String having, String orderBy,
int limit) {
return queryInForChunk(false, columns, nestedSQL, nestedArgs, groupBy,
having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, String groupBy, String having, String orderBy,
int limit, long offset) {
return queryInForChunk(false, columns, nestedSQL, nestedArgs, groupBy,
having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, int limit) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, int limit, long offset) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String orderBy, int limit) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, null,
null, null, null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String orderBy, int limit,
long offset) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, null,
null, null, null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String groupBy,
String having, String orderBy, int limit) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, null,
null, groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String groupBy,
String having, String orderBy, int limit, long offset) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, null,
null, groupBy, having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL,
Map fieldValues, int limit) {
return queryInForChunk(nestedSQL, fieldValues, table.getPkColumnName(),
limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL,
Map fieldValues, int limit, long offset) {
return queryInForChunk(nestedSQL, fieldValues, table.getPkColumnName(),
limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL,
Map fieldValues, String orderBy, int limit) {
return queryInForChunk(nestedSQL, fieldValues, null, null, orderBy,
limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL,
Map fieldValues, String orderBy, int limit,
long offset) {
return queryInForChunk(nestedSQL, fieldValues, null, null, orderBy,
limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL,
Map fieldValues, String groupBy, String having,
String orderBy, int limit) {
return queryInForChunk(false, nestedSQL, fieldValues, groupBy, having,
orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL,
Map fieldValues, String groupBy, String having,
String orderBy, int limit, long offset) {
return queryInForChunk(false, nestedSQL, fieldValues, groupBy, having,
orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
Map fieldValues, int limit) {
return queryInForChunk(distinct, nestedSQL, fieldValues,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
Map fieldValues, int limit, long offset) {
return queryInForChunk(distinct, nestedSQL, fieldValues,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
Map fieldValues, String orderBy, int limit) {
return queryInForChunk(distinct, nestedSQL, fieldValues, null, null,
orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
Map fieldValues, String orderBy, int limit,
long offset) {
return queryInForChunk(distinct, nestedSQL, fieldValues, null, null,
orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
Map fieldValues, String groupBy, String having,
String orderBy, int limit) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
fieldValues, groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
Map fieldValues, String groupBy, String having,
String orderBy, int limit, long offset) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
fieldValues, groupBy, having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
Map fieldValues, int limit) {
return queryInForChunk(columns, nestedSQL, fieldValues,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
Map fieldValues, int limit, long offset) {
return queryInForChunk(columns, nestedSQL, fieldValues,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
Map fieldValues, String orderBy, int limit) {
return queryInForChunk(columns, nestedSQL, fieldValues, null, null,
orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
Map fieldValues, String orderBy, int limit,
long offset) {
return queryInForChunk(columns, nestedSQL, fieldValues, null, null,
orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
Map fieldValues, String groupBy, String having,
String orderBy, int limit) {
return queryInForChunk(false, columns, nestedSQL, fieldValues, groupBy,
having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
Map fieldValues, String groupBy, String having,
String orderBy, int limit, long offset) {
return queryInForChunk(false, columns, nestedSQL, fieldValues, groupBy,
having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, Map fieldValues, int limit) {
return queryInForChunk(distinct, columns, nestedSQL, fieldValues,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, Map fieldValues, int limit,
long offset) {
return queryInForChunk(distinct, columns, nestedSQL, fieldValues,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, Map fieldValues, String orderBy,
int limit) {
return queryInForChunk(distinct, columns, nestedSQL, fieldValues, null,
null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, Map fieldValues, String orderBy,
int limit, long offset) {
return queryInForChunk(distinct, columns, nestedSQL, fieldValues, null,
null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, Map fieldValues, String groupBy,
String having, String orderBy, int limit) {
return queryInForChunk(distinct, columns, nestedSQL, null, fieldValues,
groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param fieldValues
* field values
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, Map fieldValues, String groupBy,
String having, String orderBy, int limit, long offset) {
return queryInForChunk(distinct, columns, nestedSQL, null, fieldValues,
groupBy, having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
Map fieldValues, int limit) {
return queryInForChunk(nestedSQL, nestedArgs, fieldValues,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
Map fieldValues, int limit, long offset) {
return queryInForChunk(nestedSQL, nestedArgs, fieldValues,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
Map fieldValues, String orderBy, int limit) {
return queryInForChunk(nestedSQL, nestedArgs, fieldValues, null, null,
orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
Map fieldValues, String orderBy, int limit,
long offset) {
return queryInForChunk(nestedSQL, nestedArgs, fieldValues, null, null,
orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
Map fieldValues, String groupBy, String having,
String orderBy, int limit) {
return queryInForChunk(false, nestedSQL, nestedArgs, fieldValues,
groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
Map fieldValues, String groupBy, String having,
String orderBy, int limit, long offset) {
return queryInForChunk(false, nestedSQL, nestedArgs, fieldValues,
groupBy, having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, Map fieldValues, int limit) {
return queryInForChunk(distinct, nestedSQL, nestedArgs, fieldValues,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, Map fieldValues, int limit,
long offset) {
return queryInForChunk(distinct, nestedSQL, nestedArgs, fieldValues,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, Map fieldValues,
String orderBy, int limit) {
return queryInForChunk(distinct, nestedSQL, nestedArgs, fieldValues,
null, null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, Map fieldValues,
String orderBy, int limit, long offset) {
return queryInForChunk(distinct, nestedSQL, nestedArgs, fieldValues,
null, null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, Map fieldValues,
String groupBy, String having, String orderBy, int limit) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
nestedArgs, fieldValues, groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, Map fieldValues,
String groupBy, String having, String orderBy, int limit,
long offset) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
nestedArgs, fieldValues, groupBy, having, orderBy, limit,
offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, Map fieldValues, int limit) {
return queryInForChunk(columns, nestedSQL, nestedArgs, fieldValues,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, Map fieldValues, int limit,
long offset) {
return queryInForChunk(columns, nestedSQL, nestedArgs, fieldValues,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, Map fieldValues,
String orderBy, int limit) {
return queryInForChunk(columns, nestedSQL, nestedArgs, fieldValues,
null, null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, Map fieldValues,
String orderBy, int limit, long offset) {
return queryInForChunk(columns, nestedSQL, nestedArgs, fieldValues,
null, null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, Map fieldValues,
String groupBy, String having, String orderBy, int limit) {
return queryInForChunk(false, columns, nestedSQL, nestedArgs,
fieldValues, groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, Map fieldValues,
String groupBy, String having, String orderBy, int limit,
long offset) {
return queryInForChunk(false, columns, nestedSQL, nestedArgs,
fieldValues, groupBy, having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs,
Map fieldValues, int limit) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs,
fieldValues, table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs,
Map fieldValues, int limit, long offset) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs,
fieldValues, table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs,
Map fieldValues, String orderBy, int limit) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs,
fieldValues, null, null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs,
Map fieldValues, String orderBy, int limit,
long offset) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs,
fieldValues, null, null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs,
Map fieldValues, String groupBy, String having,
String orderBy, int limit) {
String where = buildWhere(fieldValues.entrySet());
String[] whereArgs = buildWhereArgs(fieldValues.values());
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, where,
whereArgs, groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param fieldValues
* field values
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs,
Map fieldValues, String groupBy, String having,
String orderBy, int limit, long offset) {
String where = buildWhere(fieldValues.entrySet());
String[] whereArgs = buildWhereArgs(fieldValues.values());
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, where,
whereArgs, groupBy, having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunkWhere(String nestedSQL, String[] nestedArgs,
String where, int limit) {
return queryInForChunk(nestedSQL, nestedArgs, where,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunkWhere(String nestedSQL, String[] nestedArgs,
String where, int limit, long offset) {
return queryInForChunk(nestedSQL, nestedArgs, where,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
String where, String orderBy, int limit) {
return queryInForChunk(nestedSQL, nestedArgs, where, null, null,
orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
String where, String orderBy, int limit, long offset) {
return queryInForChunk(nestedSQL, nestedArgs, where, null, null,
orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
String where, String groupBy, String having, String orderBy,
int limit) {
return queryInForChunk(false, nestedSQL, nestedArgs, where, groupBy,
having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
String where, String groupBy, String having, String orderBy,
int limit, long offset) {
return queryInForChunk(false, nestedSQL, nestedArgs, where, groupBy,
having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunkWhere(boolean distinct, String nestedSQL,
String[] nestedArgs, String where, int limit) {
return queryInForChunk(distinct, nestedSQL, nestedArgs, where,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunkWhere(boolean distinct, String nestedSQL,
String[] nestedArgs, String where, int limit, long offset) {
return queryInForChunk(distinct, nestedSQL, nestedArgs, where,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, String where, String orderBy, int limit) {
return queryInForChunk(distinct, nestedSQL, nestedArgs, where, null,
null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, String where, String orderBy, int limit,
long offset) {
return queryInForChunk(distinct, nestedSQL, nestedArgs, where, null,
null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, String where, String groupBy, String having,
String orderBy, int limit) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
nestedArgs, where, groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, String where, String groupBy, String having,
String orderBy, int limit, long offset) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
nestedArgs, where, groupBy, having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunkWhere(String[] columns, String nestedSQL,
String[] nestedArgs, String where, int limit) {
return queryInForChunk(columns, nestedSQL, nestedArgs, where,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunkWhere(String[] columns, String nestedSQL,
String[] nestedArgs, String where, int limit, long offset) {
return queryInForChunk(columns, nestedSQL, nestedArgs, where,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, String where, String orderBy, int limit) {
return queryInForChunk(columns, nestedSQL, nestedArgs, where, null,
null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, String where, String orderBy, int limit,
long offset) {
return queryInForChunk(columns, nestedSQL, nestedArgs, where, null,
null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, String where, String groupBy, String having,
String orderBy, int limit) {
return queryInForChunk(false, columns, nestedSQL, nestedArgs, where,
groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, String where, String groupBy, String having,
String orderBy, int limit, long offset) {
return queryInForChunk(false, columns, nestedSQL, nestedArgs, where,
groupBy, having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunkWhere(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String where, int limit) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, where,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunkWhere(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String where, int limit,
long offset) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, where,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String where, String orderBy,
int limit) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, where,
null, null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String where, String orderBy,
int limit, long offset) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, where,
null, null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String where, String groupBy,
String having, String orderBy, int limit) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, where,
null, groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String where, String groupBy,
String having, String orderBy, int limit, long offset) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, where,
null, groupBy, having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunkWhere(String nestedSQL, String where,
int limit) {
return queryInForChunk(nestedSQL, where, table.getPkColumnName(),
limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunkWhere(String nestedSQL, String where,
int limit, long offset) {
return queryInForChunk(nestedSQL, where, table.getPkColumnName(), limit,
offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String where,
String orderBy, int limit) {
return queryInForChunk(nestedSQL, where, null, null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String where,
String orderBy, int limit, long offset) {
return queryInForChunk(nestedSQL, where, null, null, orderBy, limit,
offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String where,
String groupBy, String having, String orderBy, int limit) {
return queryInForChunk(false, nestedSQL, where, groupBy, having,
orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String where,
String groupBy, String having, String orderBy, int limit,
long offset) {
return queryInForChunk(false, nestedSQL, where, groupBy, having,
orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunkWhere(boolean distinct, String nestedSQL,
String where, int limit) {
return queryInForChunk(distinct, nestedSQL, where,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunkWhere(boolean distinct, String nestedSQL,
String where, int limit, long offset) {
return queryInForChunk(distinct, nestedSQL, where,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String where, String orderBy, int limit) {
return queryInForChunk(distinct, nestedSQL, where, null, null, orderBy,
limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String where, String orderBy, int limit, long offset) {
return queryInForChunk(distinct, nestedSQL, where, null, null, orderBy,
limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String where, String groupBy, String having, String orderBy,
int limit) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
where, groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String where, String groupBy, String having, String orderBy,
int limit, long offset) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
where, groupBy, having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunkWhere(String[] columns, String nestedSQL,
String where, int limit) {
return queryInForChunk(columns, nestedSQL, where,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunkWhere(String[] columns, String nestedSQL,
String where, int limit, long offset) {
return queryInForChunk(columns, nestedSQL, where,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String where, String orderBy, int limit) {
return queryInForChunk(columns, nestedSQL, where, null, null, orderBy,
limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String where, String orderBy, int limit, long offset) {
return queryInForChunk(columns, nestedSQL, where, null, null, orderBy,
limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String where, String groupBy, String having, String orderBy,
int limit) {
return queryInForChunk(false, columns, nestedSQL, where, groupBy,
having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String where, String groupBy, String having, String orderBy,
int limit, long offset) {
return queryInForChunk(false, columns, nestedSQL, where, groupBy,
having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunkWhere(boolean distinct, String[] columns,
String nestedSQL, String where, int limit) {
return queryInForChunk(distinct, columns, nestedSQL, where,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunkWhere(boolean distinct, String[] columns,
String nestedSQL, String where, int limit, long offset) {
return queryInForChunk(distinct, columns, nestedSQL, where,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String where, String orderBy, int limit) {
return queryInForChunk(distinct, columns, nestedSQL, where, null, null,
orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String where, String orderBy, int limit,
long offset) {
return queryInForChunk(distinct, columns, nestedSQL, where, null, null,
orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String where, String groupBy, String having,
String orderBy, int limit) {
return queryInForChunk(distinct, columns, nestedSQL, null, where, null,
groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String where, String groupBy, String having,
String orderBy, int limit, long offset) {
return queryInForChunk(distinct, columns, nestedSQL, null, where, null,
groupBy, having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String where,
String[] whereArgs, int limit) {
return queryInForChunk(nestedSQL, where, whereArgs,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String where,
String[] whereArgs, int limit, long offset) {
return queryInForChunk(nestedSQL, where, whereArgs,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String where,
String[] whereArgs, String orderBy, int limit) {
return queryInForChunk(nestedSQL, where, whereArgs, null, null, orderBy,
limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String where,
String[] whereArgs, String orderBy, int limit, long offset) {
return queryInForChunk(nestedSQL, where, whereArgs, null, null, orderBy,
limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String where,
String[] whereArgs, String groupBy, String having, String orderBy,
int limit) {
return queryInForChunk(false, nestedSQL, where, whereArgs, groupBy,
having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String where,
String[] whereArgs, String groupBy, String having, String orderBy,
int limit, long offset) {
return queryInForChunk(false, nestedSQL, where, whereArgs, groupBy,
having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String where, String[] whereArgs, int limit) {
return queryInForChunk(distinct, nestedSQL, where, whereArgs,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String where, String[] whereArgs, int limit, long offset) {
return queryInForChunk(distinct, nestedSQL, where, whereArgs,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String where, String[] whereArgs, String orderBy, int limit) {
return queryInForChunk(distinct, nestedSQL, where, whereArgs, null,
null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String where, String[] whereArgs, String orderBy, int limit,
long offset) {
return queryInForChunk(distinct, nestedSQL, where, whereArgs, null,
null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String where, String[] whereArgs, String groupBy, String having,
String orderBy, int limit) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
where, whereArgs, groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String where, String[] whereArgs, String groupBy, String having,
String orderBy, int limit, long offset) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
where, whereArgs, groupBy, having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String where, String[] whereArgs, int limit) {
return queryInForChunk(columns, nestedSQL, where, whereArgs,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String where, String[] whereArgs, int limit, long offset) {
return queryInForChunk(columns, nestedSQL, where, whereArgs,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String where, String[] whereArgs, String orderBy, int limit) {
return queryInForChunk(columns, nestedSQL, where, whereArgs, null, null,
orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String where, String[] whereArgs, String orderBy, int limit,
long offset) {
return queryInForChunk(columns, nestedSQL, where, whereArgs, null, null,
orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String where, String[] whereArgs, String groupBy, String having,
String orderBy, int limit) {
return queryInForChunk(false, columns, nestedSQL, where, whereArgs,
groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String where, String[] whereArgs, String groupBy, String having,
String orderBy, int limit, long offset) {
return queryInForChunk(false, columns, nestedSQL, where, whereArgs,
groupBy, having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String where, String[] whereArgs, int limit) {
return queryInForChunk(distinct, columns, nestedSQL, where, whereArgs,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String where, String[] whereArgs, int limit,
long offset) {
return queryInForChunk(distinct, columns, nestedSQL, where, whereArgs,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String where, String[] whereArgs, String orderBy,
int limit) {
return queryInForChunk(distinct, columns, nestedSQL, where, whereArgs,
null, null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String where, String[] whereArgs, String orderBy,
int limit, long offset) {
return queryInForChunk(distinct, columns, nestedSQL, where, whereArgs,
null, null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String where, String[] whereArgs, String groupBy,
String having, String orderBy, int limit) {
return queryInForChunk(distinct, columns, nestedSQL, null, where,
whereArgs, groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String where, String[] whereArgs, String groupBy,
String having, String orderBy, int limit, long offset) {
return queryInForChunk(distinct, columns, nestedSQL, null, where,
whereArgs, groupBy, having, orderBy, limit, offset);
}
/**
* Query for idordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
String where, String[] whereArgs, int limit) {
return queryInForChunk(nestedSQL, nestedArgs, where, whereArgs,
table.getPkColumnName(), limit);
}
/**
* Query for idordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
String where, String[] whereArgs, int limit, long offset) {
return queryInForChunk(nestedSQL, nestedArgs, where, whereArgs,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
String where, String[] whereArgs, String orderBy, int limit) {
return queryInForChunk(nestedSQL, nestedArgs, where, whereArgs, null,
null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
String where, String[] whereArgs, String orderBy, int limit,
long offset) {
return queryInForChunk(nestedSQL, nestedArgs, where, whereArgs, null,
null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
String where, String[] whereArgs, String groupBy, String having,
String orderBy, int limit) {
return queryInForChunk(false, nestedSQL, nestedArgs, where, whereArgs,
groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String nestedSQL, String[] nestedArgs,
String where, String[] whereArgs, String groupBy, String having,
String orderBy, int limit, long offset) {
return queryInForChunk(false, nestedSQL, nestedArgs, where, whereArgs,
groupBy, having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs, int limit) {
return queryInForChunk(distinct, nestedSQL, nestedArgs, where,
whereArgs, table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs, int limit,
long offset) {
return queryInForChunk(distinct, nestedSQL, nestedArgs, where,
whereArgs, table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs,
String orderBy, int limit) {
return queryInForChunk(distinct, nestedSQL, nestedArgs, where,
whereArgs, null, null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs,
String orderBy, int limit, long offset) {
return queryInForChunk(distinct, nestedSQL, nestedArgs, where,
whereArgs, null, null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs,
String groupBy, String having, String orderBy, int limit) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
nestedArgs, where, whereArgs, groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs,
String groupBy, String having, String orderBy, int limit,
long offset) {
return queryInForChunk(distinct, table.getColumnNames(), nestedSQL,
nestedArgs, where, whereArgs, groupBy, having, orderBy, limit,
offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs, int limit) {
return queryInForChunk(columns, nestedSQL, nestedArgs, where, whereArgs,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs, int limit,
long offset) {
return queryInForChunk(columns, nestedSQL, nestedArgs, where, whereArgs,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs,
String orderBy, int limit) {
return queryInForChunk(columns, nestedSQL, nestedArgs, where, whereArgs,
null, null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs,
String orderBy, int limit, long offset) {
return queryInForChunk(columns, nestedSQL, nestedArgs, where, whereArgs,
null, null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs,
String groupBy, String having, String orderBy, int limit) {
return queryInForChunk(false, columns, nestedSQL, nestedArgs, where,
whereArgs, groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs,
String groupBy, String having, String orderBy, int limit,
long offset) {
return queryInForChunk(false, columns, nestedSQL, nestedArgs, where,
whereArgs, groupBy, having, orderBy, limit, offset);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String where,
String[] whereArgs, int limit) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, where,
whereArgs, table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String where,
String[] whereArgs, int limit, long offset) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, where,
whereArgs, table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String where,
String[] whereArgs, String orderBy, int limit) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, where,
whereArgs, null, null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String where,
String[] whereArgs, String orderBy, int limit, long offset) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, where,
whereArgs, null, null, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String where,
String[] whereArgs, String groupBy, String having, String orderBy,
int limit) {
String whereClause = buildWhereIn(nestedSQL, where);
String[] args = buildWhereInArgs(nestedArgs, whereArgs);
return queryForChunk(distinct, columns, whereClause, args, groupBy,
having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String where,
String[] whereArgs, String groupBy, String having, String orderBy,
int limit, long offset) {
String whereClause = buildWhereIn(nestedSQL, where);
String[] args = buildWhereInArgs(nestedArgs, whereArgs);
return queryForChunk(distinct, columns, whereClause, args, groupBy,
having, orderBy, limit, offset);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs,
String limit) {
return queryInForChunk(false, columns, nestedSQL, nestedArgs, where,
whereArgs, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs,
String orderBy, String limit) {
return queryInForChunk(false, columns, nestedSQL, nestedArgs, where,
whereArgs, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(String[] columns, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs,
String groupBy, String having, String orderBy, String limit) {
return queryInForChunk(false, columns, nestedSQL, nestedArgs, where,
whereArgs, groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String where,
String[] whereArgs, String limit) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, where,
whereArgs, null, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String where,
String[] whereArgs, String orderBy, String limit) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, where,
whereArgs, null, null, orderBy, limit);
}
/**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs, String where,
String[] whereArgs, String groupBy, String having, String orderBy,
String limit) {
String whereClause = buildWhereIn(nestedSQL, where);
String[] args = buildWhereInArgs(nestedArgs, whereArgs);
return queryForChunk(distinct, columns, whereClause, args, groupBy,
having, orderBy, limit);
}
/**
* Get the count in the nested SQL query
*
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @return count
* @since 3.4.0
*/
public int countIn(String nestedSQL, String[] nestedArgs, String where,
String[] whereArgs) {
return countIn(false, null, nestedSQL, nestedArgs, where, whereArgs);
}
/**
* Get the count in the nested SQL query
*
* @param column
* count column name
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @return count
* @since 4.0.0
*/
public int countIn(String column, String nestedSQL, String[] nestedArgs,
String where, String[] whereArgs) {
return countIn(false, column, nestedSQL, nestedArgs, where, whereArgs);
}
/**
* Get the count in the nested SQL query
*
* @param distinct
* distinct column values
* @param column
* count column name
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL args
* @param where
* where clause
* @param whereArgs
* where arguments
* @return count
* @since 4.0.0
*/
public int countIn(boolean distinct, String column, String nestedSQL,
String[] nestedArgs, String where, String[] whereArgs) {
String whereClause = buildWhereIn(nestedSQL, where);
String[] args = buildWhereInArgs(nestedArgs, whereArgs);
return count(distinct, column, whereClause, args);
}
/**
* Query for rows
*
* @param where
* where clause
* @return result
* @since 3.4.0
*/
public TResult query(String where) {
return query(false, where);
}
/**
* Query for rows
*
* @param distinct
* distinct rows
* @param where
* where clause
* @return result
* @since 4.0.0
*/
public TResult query(boolean distinct, String where) {
return query(distinct, table.getColumnNames(), where);
}
/**
* Query for rows
*
* @param columns
* columns
* @param where
* where clause
* @return result
* @since 3.5.0
*/
public TResult query(String[] columns, String where) {
return query(false, columns, where);
}
/**
* Query for rows
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param where
* where clause
* @return result
* @since 4.0.0
*/
public TResult query(boolean distinct, String[] columns, String where) {
return query(distinct, columns, where, new String[] {});
}
/**
* Query for rows
*
* @param where
* where clause
* @param whereArgs
* where arguments
* @return result
*/
public TResult query(String where, String[] whereArgs) {
return query(false, where, whereArgs);
}
/**
* Query for rows
*
* @param distinct
* distinct rows
* @param where
* where clause
* @param whereArgs
* where arguments
* @return result
* @since 4.0.0
*/
public TResult query(boolean distinct, String where, String[] whereArgs) {
return query(distinct, table.getColumnNames(), where, whereArgs);
}
/**
* Query for rows
*
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @return result
* @since 3.5.0
*/
public TResult query(String[] columns, String where, String[] whereArgs) {
return query(false, columns, where, whereArgs);
}
/**
* Query for rows
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @return result
* @since 4.0.0
*/
public TResult query(boolean distinct, String[] columns, String where,
String[] whereArgs) {
TResult result = userDb.query(distinct, getTableName(), columns, where,
whereArgs, null, null, null);
prepareResult(result);
return result;
}
/**
* Query SQL for rows
*
* @param where
* where clause
* @return SQL
* @since 3.4.0
*/
public String querySQL(String where) {
return querySQL(false, where);
}
/**
* Query SQL for rows
*
* @param distinct
* distinct rows
* @param where
* where clause
* @return SQL
* @since 4.0.0
*/
public String querySQL(boolean distinct, String where) {
return querySQL(distinct, table.getColumnNames(), where);
}
/**
* Query SQL for row ids
*
* @param where
* where clause
* @return SQL
* @since 3.4.0
*/
public String queryIdsSQL(String where) {
return queryIdsSQL(false, where);
}
/**
* Query SQL for row ids
*
* @param distinct
* distinct rows
* @param where
* where clause
* @return SQL
* @since 4.0.0
*/
public String queryIdsSQL(boolean distinct, String where) {
return querySQL(distinct, new String[] { table.getPkColumnName() },
where);
}
/**
* Query SQL for rows
*
* @param columns
* columns
* @param where
* where clause
* @return SQL
* @since 3.4.0
*/
public String querySQL(String[] columns, String where) {
return querySQL(false, columns, where);
}
/**
* Query SQL for rows
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param where
* where clause
* @return SQL
* @since 4.0.0
*/
public String querySQL(boolean distinct, String[] columns, String where) {
return userDb.querySQL(distinct, getTableName(), columns, where, null,
null, null);
}
/**
* Query for rows
*
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @return result
*/
public TResult query(String where, String[] whereArgs, String groupBy,
String having, String orderBy) {
return query(false, where, whereArgs, groupBy, having, orderBy);
}
/**
* Query for rows
*
* @param distinct
* distinct rows
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @return result
* @since 4.0.0
*/
public TResult query(boolean distinct, String where, String[] whereArgs,
String groupBy, String having, String orderBy) {
return query(distinct, table.getColumnNames(), where, whereArgs,
groupBy, having, orderBy);
}
/**
* Query for rows
*
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @return result
* @since 3.5.0
*/
public TResult query(String[] columns, String where, String[] whereArgs,
String groupBy, String having, String orderBy) {
return query(false, columns, where, whereArgs, groupBy, having,
orderBy);
}
/**
* Query for rows
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @return result
* @since 4.0.0
*/
public TResult query(boolean distinct, String[] columns, String where,
String[] whereArgs, String groupBy, String having, String orderBy) {
TResult result = userDb.query(distinct, getTableName(), columns, where,
whereArgs, groupBy, having, orderBy);
prepareResult(result);
return result;
}
/**
* Query for rows
*
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* limit
* @return result
*/
public TResult query(String where, String[] whereArgs, String groupBy,
String having, String orderBy, String limit) {
return query(false, where, whereArgs, groupBy, having, orderBy, limit);
}
/**
* Query for rows
*
* @param distinct
* distinct rows
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* limit
* @return result
* @since 4.0.0
*/
public TResult query(boolean distinct, String where, String[] whereArgs,
String groupBy, String having, String orderBy, String limit) {
return query(distinct, table.getColumnNames(), where, whereArgs,
groupBy, having, orderBy, limit);
}
/**
* Query for rows
*
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* limit
* @return result
* @since 3.5.0
*/
public TResult query(String[] columns, String where, String[] whereArgs,
String groupBy, String having, String orderBy, String limit) {
return query(false, columns, where, whereArgs, groupBy, having, orderBy,
limit);
}
/**
* Query for rows
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* limit
* @return result
* @since 4.0.0
*/
public TResult query(boolean distinct, String[] columns, String where,
String[] whereArgs, String groupBy, String having, String orderBy,
String limit) {
TResult result = userDb.query(distinct, getTableName(), columns, where,
whereArgs, groupBy, having, orderBy, limit);
prepareResult(result);
return result;
}
/**
* Query for rows
*
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* limit
* @return result
* @since 6.2.0
*/
public TResult query(String[] columns, String where, String[] whereArgs,
String orderBy, String limit) {
return query(false, columns, where, whereArgs, orderBy, limit);
}
/**
* Query for rows
*
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* limit
* @return result
* @since 6.2.0
*/
public TResult query(String[] columns, String where, String[] whereArgs,
String limit) {
return query(false, columns, where, whereArgs, limit);
}
/**
* Query for rows
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* limit
* @return result
* @since 6.2.0
*/
public TResult query(boolean distinct, String[] columns, String where,
String[] whereArgs, String orderBy, String limit) {
return query(distinct, columns, where, whereArgs, null, null, orderBy,
limit);
}
/**
* Query for rows
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* limit
* @return result
* @since 6.2.0
*/
public TResult query(boolean distinct, String[] columns, String where,
String[] whereArgs, String limit) {
return query(distinct, columns, where, whereArgs, null, limit);
}
/**
* Query for id ordered rows starting at the offset and returning no more
* than the limit.
*
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(int limit) {
return queryForChunk(false, limit);
}
/**
* Query for id ordered rows starting at the offset and returning no more
* than the limit.
*
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 3.1.0
*/
public TResult queryForChunk(int limit, long offset) {
return queryForChunk(false, limit, offset);
}
/**
* Query for id ordered rows starting at the offset and returning no more
* than the limit.
*
* @param distinct
* distinct rows
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(boolean distinct, int limit) {
return queryForChunk(distinct, table.getColumnNames(), limit);
}
/**
* Query for id ordered rows starting at the offset and returning no more
* than the limit.
*
* @param distinct
* distinct rows
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 4.0.0
*/
public TResult queryForChunk(boolean distinct, int limit, long offset) {
return queryForChunk(distinct, table.getColumnNames(), limit, offset);
}
/**
* Query for id ordered rows starting at the offset and returning no more
* than the limit.
*
* @param columns
* columns
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(String[] columns, int limit) {
return queryForChunk(false, columns, limit);
}
/**
* Query for id ordered rows starting at the offset and returning no more
* than the limit.
*
* @param columns
* columns
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 3.5.0
*/
public TResult queryForChunk(String[] columns, int limit, long offset) {
return queryForChunk(false, columns, limit, offset);
}
/**
* Query for id ordered rows starting at the offset and returning no more
* than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(boolean distinct, String[] columns,
int limit) {
return queryForChunk(distinct, columns, null, null, limit);
}
/**
* Query for id ordered rows starting at the offset and returning no more
* than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 4.0.0
*/
public TResult queryForChunk(boolean distinct, String[] columns, int limit,
long offset) {
return queryForChunk(distinct, columns, null, null, limit, offset);
}
/**
* Query for id ordered rows starting at the offset and returning no more
* than the limit.
*
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(String where, String[] whereArgs, int limit) {
return queryForChunk(false, where, whereArgs, limit);
}
/**
* Query for id ordered rows starting at the offset and returning no more
* than the limit.
*
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 3.4.0
*/
public TResult queryForChunk(String where, String[] whereArgs, int limit,
long offset) {
return queryForChunk(false, where, whereArgs, limit, offset);
}
/**
* Query for id ordered rows starting at the offset and returning no more
* than the limit.
*
* @param distinct
* distinct rows
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(boolean distinct, String where,
String[] whereArgs, int limit) {
return queryForChunk(distinct, table.getColumnNames(), where, whereArgs,
limit);
}
/**
* Query for id ordered rows starting at the offset and returning no more
* than the limit.
*
* @param distinct
* distinct rows
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 4.0.0
*/
public TResult queryForChunk(boolean distinct, String where,
String[] whereArgs, int limit, long offset) {
return queryForChunk(distinct, table.getColumnNames(), where, whereArgs,
limit, offset);
}
/**
* Query for id ordered rows starting at the offset and returning no more
* than the limit.
*
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(String[] columns, String where,
String[] whereArgs, int limit) {
return queryForChunk(false, columns, where, whereArgs, limit);
}
/**
* Query for id ordered rows starting at the offset and returning no more
* than the limit.
*
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 3.5.0
*/
public TResult queryForChunk(String[] columns, String where,
String[] whereArgs, int limit, long offset) {
return queryForChunk(false, columns, where, whereArgs, limit, offset);
}
/**
* Query for id ordered rows starting at the offset and returning no more
* than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(boolean distinct, String[] columns,
String where, String[] whereArgs, int limit) {
return queryForChunk(distinct, columns, where, whereArgs,
table.getPkColumnName(), limit);
}
/**
* Query for id ordered rows starting at the offset and returning no more
* than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 4.0.0
*/
public TResult queryForChunk(boolean distinct, String[] columns,
String where, String[] whereArgs, int limit, long offset) {
return queryForChunk(distinct, columns, where, whereArgs,
table.getPkColumnName(), limit, offset);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(String orderBy, int limit) {
return queryForChunk(false, orderBy, limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 3.1.0
*/
public TResult queryForChunk(String orderBy, int limit, long offset) {
return queryForChunk(false, orderBy, limit, offset);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(boolean distinct, String orderBy, int limit) {
return queryForChunk(distinct, table.getColumnNames(), orderBy, limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 4.0.0
*/
public TResult queryForChunk(boolean distinct, String orderBy, int limit,
long offset) {
return queryForChunk(distinct, table.getColumnNames(), orderBy, limit,
offset);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param columns
* columns
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(String[] columns, String orderBy, int limit) {
return queryForChunk(false, columns, orderBy, limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param columns
* columns
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 3.5.0
*/
public TResult queryForChunk(String[] columns, String orderBy, int limit,
long offset) {
return queryForChunk(false, columns, orderBy, limit, offset);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(boolean distinct, String[] columns,
String orderBy, int limit) {
return queryForChunk(distinct, columns, null, null, null, null, orderBy,
limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 4.0.0
*/
public TResult queryForChunk(boolean distinct, String[] columns,
String orderBy, int limit, long offset) {
return queryForChunk(distinct, columns, null, new String[] {}, null,
null, orderBy, limit, offset);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(String where, String[] whereArgs,
String orderBy, int limit) {
return queryForChunk(false, where, whereArgs, orderBy, limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 3.4.0
*/
public TResult queryForChunk(String where, String[] whereArgs,
String orderBy, int limit, long offset) {
return queryForChunk(false, where, whereArgs, orderBy, limit, offset);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(boolean distinct, String where,
String[] whereArgs, String orderBy, int limit) {
return queryForChunk(distinct, table.getColumnNames(), where, whereArgs,
orderBy, limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 4.0.0
*/
public TResult queryForChunk(boolean distinct, String where,
String[] whereArgs, String orderBy, int limit, long offset) {
return queryForChunk(distinct, table.getColumnNames(), where, whereArgs,
orderBy, limit, offset);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(String[] columns, String where,
String[] whereArgs, String orderBy, int limit) {
return queryForChunk(false, columns, where, whereArgs, orderBy, limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 3.5.0
*/
public TResult queryForChunk(String[] columns, String where,
String[] whereArgs, String orderBy, int limit, long offset) {
return queryForChunk(false, columns, where, whereArgs, orderBy, limit,
offset);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(boolean distinct, String[] columns,
String where, String[] whereArgs, String orderBy, int limit) {
return queryForChunk(distinct, columns, where, whereArgs, null, null,
orderBy, limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 4.0.0
*/
public TResult queryForChunk(boolean distinct, String[] columns,
String where, String[] whereArgs, String orderBy, int limit,
long offset) {
return queryForChunk(distinct, columns, where, whereArgs, null, null,
orderBy, limit, offset);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(String groupBy, String having, String orderBy,
int limit) {
return queryForChunk(false, groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(String groupBy, String having, String orderBy,
int limit, long offset) {
return queryForChunk(false, groupBy, having, orderBy, limit, offset);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(boolean distinct, String groupBy,
String having, String orderBy, int limit) {
return queryForChunk(distinct, table.getColumnNames(), groupBy, having,
orderBy, limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(boolean distinct, String groupBy,
String having, String orderBy, int limit, long offset) {
return queryForChunk(distinct, table.getColumnNames(), groupBy, having,
orderBy, limit, offset);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param columns
* columns
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(String[] columns, String groupBy,
String having, String orderBy, int limit) {
return queryForChunk(false, columns, groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param columns
* columns
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(String[] columns, String groupBy,
String having, String orderBy, int limit, long offset) {
return queryForChunk(false, columns, groupBy, having, orderBy, limit,
offset);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(boolean distinct, String[] columns,
String groupBy, String having, String orderBy, int limit) {
return queryForChunk(distinct, columns, null, null, null, null, orderBy,
limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(boolean distinct, String[] columns,
String groupBy, String having, String orderBy, int limit,
long offset) {
return queryForChunk(distinct, columns, null, new String[] {}, null,
null, orderBy, limit, offset);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(String where, String[] whereArgs,
String groupBy, String having, String orderBy, int limit) {
return queryForChunk(false, where, whereArgs, groupBy, having, orderBy,
limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 3.4.0
*/
public TResult queryForChunk(String where, String[] whereArgs,
String groupBy, String having, String orderBy, int limit,
long offset) {
return queryForChunk(false, where, whereArgs, groupBy, having, orderBy,
limit, offset);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(boolean distinct, String where,
String[] whereArgs, String groupBy, String having, String orderBy,
int limit) {
return queryForChunk(distinct, table.getColumnNames(), where, whereArgs,
groupBy, having, orderBy, limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 4.0.0
*/
public TResult queryForChunk(boolean distinct, String where,
String[] whereArgs, String groupBy, String having, String orderBy,
int limit, long offset) {
return queryForChunk(distinct, table.getColumnNames(), where, whereArgs,
groupBy, having, orderBy, limit, offset);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(String[] columns, String where,
String[] whereArgs, String groupBy, String having, String orderBy,
int limit) {
return queryForChunk(false, columns, where, whereArgs, groupBy, having,
orderBy, limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 3.5.0
*/
public TResult queryForChunk(String[] columns, String where,
String[] whereArgs, String groupBy, String having, String orderBy,
int limit, long offset) {
return queryForChunk(false, columns, where, whereArgs, groupBy, having,
orderBy, limit, offset);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(boolean distinct, String[] columns,
String where, String[] whereArgs, String groupBy, String having,
String orderBy, int limit) {
return query(distinct, columns, where, whereArgs, groupBy, having,
orderBy, String.valueOf(limit));
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @param offset
* chunk query offset
* @return result
* @since 4.0.0
*/
public TResult queryForChunk(boolean distinct, String[] columns,
String where, String[] whereArgs, String groupBy, String having,
String orderBy, int limit, long offset) {
return query(distinct, columns, where, whereArgs, groupBy, having,
orderBy, buildLimit(limit, offset));
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(String[] columns, String where,
String[] whereArgs, String limit) {
return queryForChunk(false, columns, where, whereArgs, limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(String[] columns, String where,
String[] whereArgs, String orderBy, String limit) {
return queryForChunk(false, columns, where, whereArgs, orderBy, limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(String[] columns, String where,
String[] whereArgs, String groupBy, String having, String orderBy,
String limit) {
return queryForChunk(false, columns, where, whereArgs, groupBy, having,
orderBy, limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(boolean distinct, String[] columns,
String where, String[] whereArgs, String limit) {
return queryForChunk(distinct, columns, where, whereArgs, null, limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(boolean distinct, String[] columns,
String where, String[] whereArgs, String orderBy, String limit) {
return queryForChunk(distinct, columns, where, whereArgs, null, null,
orderBy, limit);
}
/**
* Query for ordered rows starting at the offset and returning no more than
* the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param where
* where clause
* @param whereArgs
* where arguments
* @param groupBy
* group by
* @param having
* having
* @param orderBy
* order by
* @param limit
* chunk limit
* @return result
* @since 6.2.0
*/
public TResult queryForChunk(boolean distinct, String[] columns,
String where, String[] whereArgs, String groupBy, String having,
String orderBy, String limit) {
return query(distinct, columns, where, whereArgs, groupBy, having,
orderBy, limit);
}
/**
* Build a limit String with the limit and offset
*
* @param limit
* limit
* @param offset
* offset
* @return limit
* @since 3.1.0
*/
public String buildLimit(int limit, long offset) {
return offset + "," + limit;
}
/**
* Begin a transaction
*
* @since 3.3.0
*/
public abstract void beginTransaction();
/**
* End a transaction successfully
*
* @since 3.3.0
*/
public void endTransaction() {
endTransaction(true);
}
/**
* Fail a transaction
*
* @since 3.3.0
*/
public void failTransaction() {
endTransaction(false);
}
/**
* End a transaction
*
* @param successful
* true if the transaction was successful, false to rollback or
* not commit
* @since 3.3.0
*/
public abstract void endTransaction(boolean successful);
/**
* End a transaction as successful and begin a new transaction
*
* @since 3.3.0
*/
public void endAndBeginTransaction() {
endTransaction();
beginTransaction();
}
/**
* Commit changes on the connection
*
* @since 3.3.0
*/
public abstract void commit();
/**
* Determine if currently within a transaction
*
* @return true if in transaction
*
* @since 3.3.0
*/
public abstract boolean inTransaction();
/**
* Update the row
*
* @param row
* row
* @return number of rows affected, should be 0 or 1
*/
public abstract int update(TRow row);
/**
* Delete the row
*
* @param row
* row
* @return number of rows affected, should be 0 or 1 unless the table has
* duplicate rows in it
*/
public int delete(TRow row) {
int numDeleted;
if (row.hasId()) {
numDeleted = deleteById(row.getId());
} else {
numDeleted = delete(buildValueWhere(row.getAsMap()),
buildWhereArgs(row.getValues()));
}
return numDeleted;
}
/**
* Delete a row by id
*
* @param id
* id
* @return number of rows affected, should be 0 or 1
*/
public int deleteById(long id) {
return db.delete(getTableName(), getPkWhere(id), getPkWhereArgs(id));
}
/**
* Delete rows matching the where clause
*
* @param whereClause
* where clause
* @param whereArgs
* where arguments
* @return deleted count
*/
public int delete(String whereClause, String[] whereArgs) {
return db.delete(getTableName(), whereClause, whereArgs);
}
/**
* Delete rows matching the field values
*
* @param fieldValues
* field values
* @return deleted count
* @since 3.0.2
*/
public int delete(Map fieldValues) {
String whereClause = buildWhere(fieldValues.entrySet());
String[] whereArgs = buildWhereArgs(fieldValues.values());
return delete(whereClause, whereArgs);
}
/**
* Delete all rows
*
* @return deleted count
* @since 3.0.2
*/
public int deleteAll() {
return delete(null, null);
}
/**
* Creates a new row, same as calling {@link #insert(UserCoreRow)}
*
* @param row
* row
* @return row id
*/
public long create(TRow row) {
return insert(row);
}
/**
* Inserts a new row
*
* @param row
* row
* @return row id
*/
public abstract long insert(TRow row);
/**
* Get the primary key where clause
*
* @param id
* id
* @return primary key where clause
*/
protected String getPkWhere(long id) {
return buildWhere(table.getPkColumnName(), id);
}
/**
* Get the primary key where args
*
* @param id
* id
* @return primary key where args
*/
protected String[] getPkWhereArgs(long id) {
return buildWhereArgs(id);
}
/**
* Build where (or selection) statement from the fields
*
* @param fields
* fields
* @return where clause
*/
public String buildWhere(Set> fields) {
StringBuilder selection = new StringBuilder();
for (Map.Entry field : fields) {
if (selection.length() > 0) {
selection.append(" AND ");
}
selection.append(buildWhere(field.getKey(), field.getValue()));
}
return selection.toString();
}
/**
* Build where (or selection) statement from the fields
*
* @param fields
* fields
* @return where clause
*/
public String buildValueWhere(Set> fields) {
StringBuilder selection = new StringBuilder();
for (Map.Entry field : fields) {
if (selection.length() > 0) {
selection.append(" AND ");
}
selection.append(buildWhere(field.getKey(), field.getValue()));
}
return selection.toString();
}
/**
* Build where (or selection) statement for a single field
*
* @param field
* field name
* @param value
* field value
* @return where clause
*/
public String buildWhere(String field, Object value) {
return buildWhere(field, value, "=");
}
/**
* Build where (or selection) LIKE statement for a single field
*
* @param field
* field name
* @param value
* field value
* @return where clause
* @since 3.0.1
*/
public String buildWhereLike(String field, Object value) {
return buildWhere(field, value, "LIKE");
}
/**
* Build where (or selection) statement for a single field using the
* provided operation
*
* @param field
* field
* @param value
* value
* @param operation
* operation
* @return where clause
*/
public String buildWhere(String field, Object value, String operation) {
return CoreSQLUtils.quoteWrap(field) + " "
+ (value != null ? operation + " ?" : "IS NULL");
}
/**
* Build where (or selection) statement for a single field being null
*
* @param field
* field
* @return where clause
* @since 6.6.7
*/
public String buildWhereNull(String field) {
return CoreSQLUtils.quoteWrap(field) + " IS NULL";
}
/**
* Build where (or selection) statement for a single field
*
* @param field
* field name
* @param value
* column value
* @return where clause
*/
public String buildWhere(String field, ColumnValue value) {
String where;
if (value != null) {
if (value.getValue() != null && value.getTolerance() != null) {
if (!(value.getValue() instanceof Number)) {
throw new GeoPackageException(
"Field value is not a number and can not use a tolerance, Field: "
+ field + ", Value: " + value);
}
String quotedField = CoreSQLUtils.quoteWrap(field);
where = quotedField + " >= ? AND " + quotedField + " <= ?";
} else {
where = buildWhere(field, value.getValue());
}
} else {
where = buildWhereNull(field);
}
return where;
}
/**
* Build where (or selection) LIKE statement for a single field
*
* @param field
* field name
* @param value
* column value
* @return where clause
* @since 3.0.1
*/
public String buildWhereLike(String field, ColumnValue value) {
String where;
if (value != null) {
if (value.getTolerance() != null) {
throw new GeoPackageException(
"Field value tolerance not supported for LIKE query, Field: "
+ field + ", Value: " + ", Tolerance: "
+ value.getTolerance());
}
where = buildWhereLike(field, value.getValue());
} else {
where = buildWhereNull(field);
}
return where;
}
/**
* Build where (or selection) args for the values
*
* @param values
* values
* @return where args
*/
public String[] buildWhereArgs(Collection