Class UserCoreDao<TColumn extends UserColumn,​TTable extends UserTable<TColumn>,​TRow extends UserCoreRow<TColumn,​TTable>,​TResult extends UserCoreResult<TColumn,​TTable,​TRow>>

  • Type Parameters:
    TColumn - column type
    TTable - table type
    TRow - row type
    TResult - result type

    public abstract class UserCoreDao<TColumn extends UserColumn,​TTable extends UserTable<TColumn>,​TRow extends UserCoreRow<TColumn,​TTable>,​TResult extends UserCoreResult<TColumn,​TTable,​TRow>>
    extends Object
    Abstract User DAO for reading user tables
    Author:
    osbornb
    • Field Detail

      • projection

        protected Projection projection
        Projection
    • Method Detail

      • newRow

        public abstract TRow newRow()
        Get a new empty row
        Returns:
        row
      • getBoundingBox

        public abstract BoundingBox getBoundingBox()
        Get the bounding box of the user table data
        Returns:
        bounding box of user table data
        Since:
        1.1.0
      • getBoundingBox

        public abstract BoundingBox getBoundingBox​(Projection projection)
        Get the bounding box of the user table data
        Parameters:
        projection - desired projection
        Returns:
        bounding box of user table data
        Since:
        3.1.0
      • projectBoundingBox

        public BoundingBox projectBoundingBox​(BoundingBox boundingBox,
                                              Projection projection)
        Project the provided bounding box in the declared projection to the user DAO projection
        Parameters:
        boundingBox - bounding box
        projection - projection
        Returns:
        projected bounding box
        Since:
        3.1.0
      • prepareResult

        protected abstract TResult prepareResult​(TResult result)
        Prepare the result before returning
        Parameters:
        result - result
        Returns:
        prepared result
        Since:
        2.0.0
      • getDatabase

        public String getDatabase()
        Get the database
        Returns:
        database
      • createDao

        public <D extends GeoPackageDao<O,​?>,​O> D createDao​(Class<O> clazz)
        Create a GeoPackage DAO
        Type Parameters:
        D - DAO type
        O - DAO object type
        Parameters:
        clazz - DAO class type
        Returns:
        GeoPackage DAO
        Since:
        4.0.0
      • getTableName

        public String getTableName()
        Get the table name
        Returns:
        table name
      • getTable

        public TTable getTable()
        Get the table
        Returns:
        table
      • getColumns

        public List<TColumn> getColumns()
        Get the table columns
        Returns:
        columns
        Since:
        3.5.0
      • getColumnNames

        public String[] getColumnNames()
        Get the table column names
        Returns:
        column names
        Since:
        3.5.0
      • columnCount

        public int columnCount()
        Get the column count
        Returns:
        column count
        Since:
        3.5.0
      • getContents

        public Contents getContents()
        Get the contents
        Returns:
        contents
        Since:
        3.3.0
      • getProjection

        public Projection getProjection()
        Get the projection
        Returns:
        projection
      • isPkModifiable

        public boolean isPkModifiable()
        Is the primary key modifiable
        Returns:
        true if the primary key is modifiable
        Since:
        4.0.0
      • setPkModifiable

        public void setPkModifiable​(boolean pkModifiable)
        Set if the primary key can be modified
        Parameters:
        pkModifiable - primary key modifiable flag
        Since:
        4.0.0
      • isValueValidation

        public boolean isValueValidation()
        Is value validation against column types enabled
        Returns:
        true if values are validated against column types
        Since:
        4.0.0
      • setValueValidation

        public void setValueValidation​(boolean valueValidation)
        Set if values should validated against column types
        Parameters:
        valueValidation - value validation flag
        Since:
        4.0.0
      • dropTable

        public void dropTable()
        Drop the user table
      • rawQuery

        public TResult rawQuery​(String sql)
        Raw query
        Parameters:
        sql - SQL
        Returns:
        result
        Since:
        3.5.0
      • rawQuery

        public TResult rawQuery​(String sql,
                                String[] selectionArgs)
        Raw query
        Parameters:
        sql - SQL
        selectionArgs - selection args
        Returns:
        result
        Since:
        3.5.0
      • queryForAll

        public TResult queryForAll()
        Query for all rows
        Returns:
        result
      • query

        public TResult query()
        Query for all rows
        Returns:
        result
        Since:
        3.5.0
      • query

        public TResult query​(boolean distinct)
        Query for all rows
        Parameters:
        distinct - distinct rows
        Returns:
        result
        Since:
        4.0.0
      • query

        public TResult query​(String[] columns)
        Query for all rows
        Parameters:
        columns - columns
        Returns:
        result
        Since:
        3.5.0
      • query

        public TResult query​(boolean distinct,
                             String[] columns)
        Query for all rows
        Parameters:
        distinct - distinct rows
        columns - columns
        Returns:
        result
        Since:
        4.0.0
      • queryAs

        public TResult queryAs​(String[] 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.
        Parameters:
        columnsAs - columns as values
        Returns:
        result
        Since:
        3.5.0
      • queryAs

        public TResult queryAs​(boolean distinct,
                               String[] 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.
        Parameters:
        distinct - distinct rows
        columnsAs - columns as values
        Returns:
        result
        Since:
        4.0.0
      • query

        public TResult query​(String[] columns,
                             String[] 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.
        Parameters:
        columns - columns
        columnsAs - columns as values
        Returns:
        result
        Since:
        3.5.0
      • query

        public TResult query​(boolean distinct,
                             String[] columns,
                             String[] 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.
        Parameters:
        distinct - distinct rows
        columns - columns
        columnsAs - columns as values
        Returns:
        result
        Since:
        4.0.0
      • querySQL

        public String querySQL()
        Query SQL for all rows
        Returns:
        SQL
        Since:
        3.4.0
      • querySQL

        public String querySQL​(boolean distinct)
        Query SQL for all rows
        Parameters:
        distinct - distinct rows
        Returns:
        SQL
        Since:
        4.0.0
      • queryIdsSQL

        public String queryIdsSQL()
        Query SQL for all row ids
        Returns:
        SQL
        Since:
        3.4.0
      • queryIdsSQL

        public String queryIdsSQL​(boolean distinct)
        Query SQL for all row ids
        Parameters:
        distinct - distinct rows
        Returns:
        SQL
        Since:
        4.0.0
      • querySQL

        public String querySQL​(String[] columns)
        Query SQL for all rows
        Parameters:
        columns - columns
        Returns:
        SQL
        Since:
        3.4.0
      • querySQL

        public String querySQL​(boolean distinct,
                               String[] columns)
        Query SQL for all rows
        Parameters:
        distinct - distinct rows
        columns - columns
        Returns:
        SQL
        Since:
        4.0.0
      • queryForEq

        public TResult queryForEq​(String fieldName,
                                  Object value)
        Query for the row where the field equals the value
        Parameters:
        fieldName - field name
        value - value
        Returns:
        result
      • queryForEq

        public TResult queryForEq​(boolean distinct,
                                  String fieldName,
                                  Object value)
        Query for the row where the field equals the value
        Parameters:
        distinct - distinct rows
        fieldName - field name
        value - value
        Returns:
        result
        Since:
        4.0.0
      • queryForEq

        public TResult queryForEq​(String[] columns,
                                  String fieldName,
                                  Object value)
        Query for the row where the field equals the value
        Parameters:
        columns - columns
        fieldName - field name
        value - value
        Returns:
        result
        Since:
        3.5.0
      • queryForEq

        public TResult queryForEq​(boolean distinct,
                                  String[] columns,
                                  String fieldName,
                                  Object value)
        Query for the row where the field equals the value
        Parameters:
        distinct - distinct rows
        columns - columns
        fieldName - field name
        value - value
        Returns:
        result
        Since:
        4.0.0
      • countForEq

        public int countForEq​(String fieldName,
                              Object value)
        Count where the field equals the value
        Parameters:
        fieldName - field name
        value - value
        Returns:
        count
        Since:
        3.5.0
      • countForEq

        public int countForEq​(String column,
                              String fieldName,
                              Object value)
        Count where the field equals the value
        Parameters:
        column - count column name
        fieldName - field name
        value - value
        Returns:
        count
        Since:
        4.0.0
      • countForEq

        public int countForEq​(boolean distinct,
                              String column,
                              String fieldName,
                              Object value)
        Count where the field equals the value
        Parameters:
        distinct - distinct column values
        column - count column name
        fieldName - field name
        value - value
        Returns:
        count
        Since:
        4.0.0
      • queryForEq

        public TResult queryForEq​(String fieldName,
                                  Object value,
                                  String groupBy,
                                  String having,
                                  String orderBy)
        Query for the row where the field equals the value
        Parameters:
        fieldName - field name
        value - value
        groupBy - group by
        having - having
        orderBy - order by
        Returns:
        result
      • queryForEq

        public TResult queryForEq​(boolean distinct,
                                  String fieldName,
                                  Object value,
                                  String groupBy,
                                  String having,
                                  String orderBy)
        Query for the row where the field equals the value
        Parameters:
        distinct - distinct rows
        fieldName - field name
        value - value
        groupBy - group by
        having - having
        orderBy - order by
        Returns:
        result
        Since:
        4.0.0
      • queryForEq

        public TResult queryForEq​(String[] columns,
                                  String fieldName,
                                  Object value,
                                  String groupBy,
                                  String having,
                                  String orderBy)
        Query for the row where the field equals the value
        Parameters:
        columns - columns
        fieldName - field name
        value - value
        groupBy - group by
        having - having
        orderBy - order by
        Returns:
        result
        Since:
        3.5.0
      • queryForEq

        public TResult queryForEq​(boolean distinct,
                                  String[] columns,
                                  String fieldName,
                                  Object value,
                                  String groupBy,
                                  String having,
                                  String orderBy)
        Query for the row where the field equals the value
        Parameters:
        distinct - distinct rows
        columns - columns
        fieldName - field name
        value - value
        groupBy - group by
        having - having
        orderBy - order by
        Returns:
        result
        Since:
        4.0.0
      • countForEq

        public int countForEq​(String fieldName,
                              Object value,
                              String groupBy,
                              String having,
                              String orderBy)
        Count where the field equals the value
        Parameters:
        fieldName - field name
        value - value
        groupBy - group by
        having - having
        orderBy - order by
        Returns:
        count
        Since:
        3.5.0
      • countForEq

        public int countForEq​(String column,
                              String fieldName,
                              Object value,
                              String groupBy,
                              String having,
                              String orderBy)
        Count where the field equals the value
        Parameters:
        column - count column name
        fieldName - field name
        value - value
        groupBy - group by
        having - having
        orderBy - order by
        Returns:
        count
        Since:
        4.0.0
      • countForEq

        public int countForEq​(boolean distinct,
                              String column,
                              String fieldName,
                              Object value,
                              String groupBy,
                              String having,
                              String orderBy)
        Count where the field equals the value
        Parameters:
        distinct - distinct column values
        column - count column name
        fieldName - field name
        value - value
        groupBy - group by
        having - having
        orderBy - order by
        Returns:
        count
        Since:
        4.0.0
      • queryForEq

        public TResult queryForEq​(String fieldName,
                                  ColumnValue value)
        Query for the row where the field equals the value
        Parameters:
        fieldName - field name
        value - column value
        Returns:
        result
      • queryForEq

        public TResult queryForEq​(boolean distinct,
                                  String fieldName,
                                  ColumnValue value)
        Query for the row where the field equals the value
        Parameters:
        distinct - distinct rows
        fieldName - field name
        value - column value
        Returns:
        result
        Since:
        4.0.0
      • queryForEq

        public TResult queryForEq​(String[] columns,
                                  String fieldName,
                                  ColumnValue value)
        Query for the row where the field equals the value
        Parameters:
        columns - columns
        fieldName - field name
        value - column value
        Returns:
        result
        Since:
        3.5.0
      • queryForEq

        public TResult queryForEq​(boolean distinct,
                                  String[] columns,
                                  String fieldName,
                                  ColumnValue value)
        Query for the row where the field equals the value
        Parameters:
        distinct - distinct rows
        columns - columns
        fieldName - field name
        value - column value
        Returns:
        result
        Since:
        4.0.0
      • countForEq

        public int countForEq​(String fieldName,
                              ColumnValue value)
        Count where the field equals the value
        Parameters:
        fieldName - field name
        value - column value
        Returns:
        count
        Since:
        3.5.0
      • countForEq

        public int countForEq​(String column,
                              String fieldName,
                              ColumnValue value)
        Count where the field equals the value
        Parameters:
        column - count column name
        fieldName - field name
        value - column value
        Returns:
        count
        Since:
        4.0.0
      • countForEq

        public int countForEq​(boolean distinct,
                              String column,
                              String fieldName,
                              ColumnValue value)
        Count where the field equals the value
        Parameters:
        distinct - distinct column values
        column - count column name
        fieldName - field name
        value - column value
        Returns:
        count
        Since:
        4.0.0
      • queryForLike

        public TResult queryForLike​(String fieldName,
                                    Object value)
        Query for the row where the field is like the value
        Parameters:
        fieldName - field name
        value - value
        Returns:
        result
        Since:
        3.0.1
      • queryForLike

        public TResult queryForLike​(boolean distinct,
                                    String fieldName,
                                    Object value)
        Query for the row where the field is like the value
        Parameters:
        distinct - distinct rows
        fieldName - field name
        value - value
        Returns:
        result
        Since:
        4.0.0
      • queryForLike

        public TResult queryForLike​(String[] columns,
                                    String fieldName,
                                    Object value)
        Query for the row where the field is like the value
        Parameters:
        columns - columns
        fieldName - field name
        value - value
        Returns:
        result
        Since:
        3.5.0
      • queryForLike

        public TResult queryForLike​(boolean distinct,
                                    String[] columns,
                                    String fieldName,
                                    Object value)
        Query for the row where the field is like the value
        Parameters:
        distinct - distinct rows
        columns - columns
        fieldName - field name
        value - value
        Returns:
        result
        Since:
        4.0.0
      • countForLike

        public int countForLike​(String fieldName,
                                Object value)
        Count where the field is like the value
        Parameters:
        fieldName - field name
        value - value
        Returns:
        count
        Since:
        3.5.0
      • countForLike

        public int countForLike​(String column,
                                String fieldName,
                                Object value)
        Count where the field is like the value
        Parameters:
        column - count column name
        fieldName - field name
        value - value
        Returns:
        count
        Since:
        4.0.0
      • countForLike

        public int countForLike​(boolean distinct,
                                String column,
                                String fieldName,
                                Object value)
        Count where the field is like the value
        Parameters:
        distinct - distinct column values
        column - count column name
        fieldName - field name
        value - value
        Returns:
        count
        Since:
        4.0.0
      • queryForLike

        public TResult queryForLike​(String fieldName,
                                    Object value,
                                    String groupBy,
                                    String having,
                                    String orderBy)
        Query for the row where the field equals the value
        Parameters:
        fieldName - field name
        value - value
        groupBy - group by statement
        having - having statement
        orderBy - order by statement
        Returns:
        result
        Since:
        3.0.1
      • queryForLike

        public TResult queryForLike​(boolean distinct,
                                    String fieldName,
                                    Object value,
                                    String groupBy,
                                    String having,
                                    String orderBy)
        Query for the row where the field equals the value
        Parameters:
        distinct - distinct rows
        fieldName - field name
        value - value
        groupBy - group by statement
        having - having statement
        orderBy - order by statement
        Returns:
        result
        Since:
        4.0.0
      • queryForLike

        public TResult queryForLike​(String[] columns,
                                    String fieldName,
                                    Object value,
                                    String groupBy,
                                    String having,
                                    String orderBy)
        Query for the row where the field equals the value
        Parameters:
        columns - columns
        fieldName - field name
        value - value
        groupBy - group by statement
        having - having statement
        orderBy - order by statement
        Returns:
        result
        Since:
        3.5.0
      • queryForLike

        public TResult queryForLike​(boolean distinct,
                                    String[] columns,
                                    String fieldName,
                                    Object value,
                                    String groupBy,
                                    String having,
                                    String orderBy)
        Query for the row where the field equals the value
        Parameters:
        distinct - distinct rows
        columns - columns
        fieldName - field name
        value - value
        groupBy - group by statement
        having - having statement
        orderBy - order by statement
        Returns:
        result
        Since:
        4.0.0
      • countForLike

        public int countForLike​(String fieldName,
                                Object value,
                                String groupBy,
                                String having,
                                String orderBy)
        Count where the field equals the value
        Parameters:
        fieldName - field name
        value - value
        groupBy - group by statement
        having - having statement
        orderBy - order by statement
        Returns:
        count
        Since:
        3.5.0
      • countForLike

        public int countForLike​(String column,
                                String fieldName,
                                Object value,
                                String groupBy,
                                String having,
                                String orderBy)
        Count where the field equals the value
        Parameters:
        column - count column name
        fieldName - field name
        value - value
        groupBy - group by statement
        having - having statement
        orderBy - order by statement
        Returns:
        count
        Since:
        4.0.0
      • countForLike

        public int countForLike​(boolean distinct,
                                String column,
                                String fieldName,
                                Object value,
                                String groupBy,
                                String having,
                                String orderBy)
        Count where the field equals the value
        Parameters:
        distinct - distinct column values
        column - count column name
        fieldName - field name
        value - value
        groupBy - group by statement
        having - having statement
        orderBy - order by statement
        Returns:
        count
        Since:
        4.0.0
      • queryForLike

        public TResult queryForLike​(String fieldName,
                                    ColumnValue value)
        Query for the row where the field is like the value
        Parameters:
        fieldName - field name
        value - column value
        Returns:
        result
        Since:
        3.0.1
      • queryForLike

        public TResult queryForLike​(boolean distinct,
                                    String fieldName,
                                    ColumnValue value)
        Query for the row where the field is like the value
        Parameters:
        distinct - distinct rows
        fieldName - field name
        value - column value
        Returns:
        result
        Since:
        4.0.0
      • queryForLike

        public TResult queryForLike​(String[] columns,
                                    String fieldName,
                                    ColumnValue value)
        Query for the row where the field is like the value
        Parameters:
        columns - columns
        fieldName - field name
        value - column value
        Returns:
        result
        Since:
        3.5.0
      • queryForLike

        public TResult queryForLike​(boolean distinct,
                                    String[] columns,
                                    String fieldName,
                                    ColumnValue value)
        Query for the row where the field is like the value
        Parameters:
        distinct - distinct rows
        columns - columns
        fieldName - field name
        value - column value
        Returns:
        result
        Since:
        4.0.0
      • countForLike

        public int countForLike​(String fieldName,
                                ColumnValue value)
        Count where the field is like the value
        Parameters:
        fieldName - field name
        value - column value
        Returns:
        count
        Since:
        3.5.0
      • countForLike

        public int countForLike​(String column,
                                String fieldName,
                                ColumnValue value)
        Count where the field is like the value
        Parameters:
        column - count column name
        fieldName - field name
        value - column value
        Returns:
        count
        Since:
        4.0.0
      • countForLike

        public int countForLike​(boolean distinct,
                                String column,
                                String fieldName,
                                ColumnValue value)
        Count where the field is like the value
        Parameters:
        distinct - distinct column values
        column - count column name
        fieldName - field name
        value - column value
        Returns:
        count
        Since:
        4.0.0
      • queryForFieldValues

        public TResult queryForFieldValues​(Map<String,​Object> fieldValues)
        Query for the row where all fields match their values
        Parameters:
        fieldValues - field values
        Returns:
        result
      • queryForFieldValues

        public TResult queryForFieldValues​(boolean distinct,
                                           Map<String,​Object> fieldValues)
        Query for the row where all fields match their values
        Parameters:
        distinct - distinct rows
        fieldValues - field values
        Returns:
        result
        Since:
        4.0.0
      • queryForFieldValues

        public TResult queryForFieldValues​(String[] columns,
                                           Map<String,​Object> fieldValues)
        Query for the row where all fields match their values
        Parameters:
        columns - columns
        fieldValues - field values
        Returns:
        result
        Since:
        3.5.0
      • queryForFieldValues

        public TResult queryForFieldValues​(boolean distinct,
                                           String[] columns,
                                           Map<String,​Object> fieldValues)
        Query for the row where all fields match their values
        Parameters:
        distinct - distinct rows
        columns - columns
        fieldValues - field values
        Returns:
        result
        Since:
        4.0.0
      • countForFieldValues

        public int countForFieldValues​(Map<String,​Object> fieldValues)
        Count where all fields match their values
        Parameters:
        fieldValues - field values
        Returns:
        count
        Since:
        3.5.0
      • countForFieldValues

        public int countForFieldValues​(String column,
                                       Map<String,​Object> fieldValues)
        Count where all fields match their values
        Parameters:
        column - count column name
        fieldValues - field values
        Returns:
        count
        Since:
        4.0.0
      • countForFieldValues

        public int countForFieldValues​(boolean distinct,
                                       String column,
                                       Map<String,​Object> fieldValues)
        Count where all fields match their values
        Parameters:
        distinct - distinct column values
        column - count column name
        fieldValues - field values
        Returns:
        count
        Since:
        4.0.0
      • queryForValueFieldValues

        public TResult queryForValueFieldValues​(Map<String,​ColumnValue> fieldValues)
        Query for the row where all fields match their values
        Parameters:
        fieldValues - field values
        Returns:
        result
      • queryForValueFieldValues

        public TResult queryForValueFieldValues​(boolean distinct,
                                                Map<String,​ColumnValue> fieldValues)
        Query for the row where all fields match their values
        Parameters:
        distinct - distinct rows
        fieldValues - field values
        Returns:
        result
        Since:
        4.0.0
      • queryForValueFieldValues

        public TResult queryForValueFieldValues​(String[] columns,
                                                Map<String,​ColumnValue> fieldValues)
        Query for the row where all fields match their values
        Parameters:
        columns - columns
        fieldValues - field values
        Returns:
        result
        Since:
        3.5.0
      • queryForValueFieldValues

        public TResult queryForValueFieldValues​(boolean distinct,
                                                String[] columns,
                                                Map<String,​ColumnValue> fieldValues)
        Query for the row where all fields match their values
        Parameters:
        distinct - distinct rows
        columns - columns
        fieldValues - field values
        Returns:
        result
        Since:
        4.0.0
      • countForValueFieldValues

        public int countForValueFieldValues​(Map<String,​ColumnValue> fieldValues)
        Count where all fields match their values
        Parameters:
        fieldValues - field values
        Returns:
        count
        Since:
        3.5.0
      • countForValueFieldValues

        public int countForValueFieldValues​(String column,
                                            Map<String,​ColumnValue> fieldValues)
        Count where all fields match their values
        Parameters:
        column - count column name
        fieldValues - field values
        Returns:
        count
        Since:
        4.0.0
      • countForValueFieldValues

        public int countForValueFieldValues​(boolean distinct,
                                            String column,
                                            Map<String,​ColumnValue> fieldValues)
        Count where all fields match their values
        Parameters:
        distinct - distinct column values
        column - count column name
        fieldValues - field values
        Returns:
        count
        Since:
        4.0.0
      • queryForId

        public TResult queryForId​(long id)
        Query for the row with the provided id
        Parameters:
        id - id
        Returns:
        result
      • queryForId

        public TResult queryForId​(boolean distinct,
                                  long id)
        Query for the row with the provided id
        Parameters:
        distinct - distinct rows
        id - id
        Returns:
        result
        Since:
        4.0.0
      • queryForId

        public TResult queryForId​(String[] columns,
                                  long id)
        Query for the row with the provided id
        Parameters:
        columns - columns
        id - id
        Returns:
        result
        Since:
        3.5.0
      • queryForId

        public TResult queryForId​(boolean distinct,
                                  String[] columns,
                                  long id)
        Query for the row with the provided id
        Parameters:
        distinct - distinct rows
        columns - columns
        id - id
        Returns:
        result
        Since:
        4.0.0
      • queryForIdRow

        public TRow queryForIdRow​(long id)
        Query for the row with the provided id
        Parameters:
        id - id
        Returns:
        row
      • queryForIdRow

        public TRow queryForIdRow​(boolean distinct,
                                  long id)
        Query for the row with the provided id
        Parameters:
        distinct - distinct rows
        id - id
        Returns:
        row
        Since:
        4.0.0
      • queryForIdRow

        public TRow queryForIdRow​(String[] columns,
                                  long id)
        Query for the row with the provided id
        Parameters:
        columns - columns
        id - id
        Returns:
        row
        Since:
        3.5.0
      • queryForIdRow

        public TRow queryForIdRow​(boolean distinct,
                                  String[] columns,
                                  long id)
        Query for the row with the provided id
        Parameters:
        distinct - distinct rows
        columns - columns
        id - id
        Returns:
        row
        Since:
        4.0.0
      • queryIn

        public TResult queryIn​(String nestedSQL)
        Query for ids in the nested SQL query
        Parameters:
        nestedSQL - nested SQL
        Returns:
        result
        Since:
        3.4.0
      • queryIn

        public TResult queryIn​(boolean distinct,
                               String nestedSQL)
        Query for ids in the nested SQL query
        Parameters:
        distinct - distinct rows
        nestedSQL - nested SQL
        Returns:
        result
        Since:
        4.0.0
      • queryIn

        public TResult queryIn​(String[] columns,
                               String nestedSQL)
        Query for ids in the nested SQL query
        Parameters:
        columns - columns
        nestedSQL - nested SQL
        Returns:
        result
        Since:
        3.5.0
      • queryIn

        public TResult queryIn​(boolean distinct,
                               String[] columns,
                               String nestedSQL)
        Query for ids in the nested SQL query
        Parameters:
        distinct - distinct rows
        columns - columns
        nestedSQL - nested SQL
        Returns:
        result
        Since:
        4.0.0
      • countIn

        public int countIn​(String nestedSQL)
        Get the count in the nested SQL query
        Parameters:
        nestedSQL - nested SQL
        Returns:
        count
        Since:
        3.4.0
      • countColumnIn

        public int countColumnIn​(String column,
                                 String nestedSQL)
        Get the count in the nested SQL query
        Parameters:
        column - count column name
        nestedSQL - nested SQL
        Returns:
        count
        Since:
        4.0.0
      • countIn

        public int countIn​(boolean distinct,
                           String column,
                           String nestedSQL)
        Get the count in the nested SQL query
        Parameters:
        distinct - distinct column values
        column - count column name
        nestedSQL - nested SQL
        Returns:
        count
        Since:
        4.0.0
      • queryIn

        public TResult queryIn​(String nestedSQL,
                               String[] nestedArgs)
        Query for ids in the nested SQL query
        Parameters:
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        Returns:
        result
        Since:
        3.4.0
      • queryIn

        public TResult queryIn​(boolean distinct,
                               String nestedSQL,
                               String[] nestedArgs)
        Query for ids in the nested SQL query
        Parameters:
        distinct - distinct rows
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        Returns:
        result
        Since:
        4.0.0
      • queryIn

        public TResult queryIn​(String[] columns,
                               String nestedSQL,
                               String[] nestedArgs)
        Query for ids in the nested SQL query
        Parameters:
        columns - columns
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        Returns:
        result
        Since:
        3.5.0
      • queryIn

        public TResult queryIn​(boolean distinct,
                               String[] columns,
                               String nestedSQL,
                               String[] nestedArgs)
        Query for ids in the nested SQL query
        Parameters:
        distinct - distinct rows
        columns - columns
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        Returns:
        result
        Since:
        4.0.0
      • countIn

        public int countIn​(String nestedSQL,
                           String[] nestedArgs)
        Get the count in the nested SQL query
        Parameters:
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        Returns:
        count
        Since:
        3.4.0
      • countColumnIn

        public int countColumnIn​(String column,
                                 String nestedSQL,
                                 String[] nestedArgs)
        Get the count in the nested SQL query
        Parameters:
        column - count column name
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        Returns:
        count
        Since:
        4.0.0
      • countIn

        public int countIn​(boolean distinct,
                           String column,
                           String nestedSQL,
                           String[] nestedArgs)
        Get the count in the nested SQL query
        Parameters:
        distinct - distinct column values
        column - count column name
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        Returns:
        count
        Since:
        4.0.0
      • queryIn

        public TResult queryIn​(String nestedSQL,
                               Map<String,​Object> fieldValues)
        Query for ids in the nested SQL query
        Parameters:
        nestedSQL - nested SQL
        fieldValues - field values
        Returns:
        result
        Since:
        3.4.0
      • queryIn

        public TResult queryIn​(boolean distinct,
                               String nestedSQL,
                               Map<String,​Object> fieldValues)
        Query for ids in the nested SQL query
        Parameters:
        distinct - distinct rows
        nestedSQL - nested SQL
        fieldValues - field values
        Returns:
        result
        Since:
        4.0.0
      • queryIn

        public TResult queryIn​(String[] columns,
                               String nestedSQL,
                               Map<String,​Object> fieldValues)
        Query for ids in the nested SQL query
        Parameters:
        columns - columns
        nestedSQL - nested SQL
        fieldValues - field values
        Returns:
        result
        Since:
        3.5.0
      • queryIn

        public TResult queryIn​(boolean distinct,
                               String[] columns,
                               String nestedSQL,
                               Map<String,​Object> fieldValues)
        Query for ids in the nested SQL query
        Parameters:
        distinct - distinct rows
        columns - columns
        nestedSQL - nested SQL
        fieldValues - field values
        Returns:
        result
        Since:
        4.0.0
      • countIn

        public int countIn​(String nestedSQL,
                           Map<String,​Object> fieldValues)
        Get the count in the nested SQL query
        Parameters:
        nestedSQL - nested SQL
        fieldValues - field values
        Returns:
        count
        Since:
        3.4.0
      • countIn

        public int countIn​(String column,
                           String nestedSQL,
                           Map<String,​Object> fieldValues)
        Get the count in the nested SQL query
        Parameters:
        column - count column name
        nestedSQL - nested SQL
        fieldValues - field values
        Returns:
        count
        Since:
        4.0.0
      • countIn

        public int countIn​(boolean distinct,
                           String column,
                           String nestedSQL,
                           Map<String,​Object> fieldValues)
        Get the count in the nested SQL query
        Parameters:
        distinct - distinct column values
        column - count column name
        nestedSQL - nested SQL
        fieldValues - field values
        Returns:
        count
        Since:
        4.0.0
      • queryIn

        public TResult queryIn​(String nestedSQL,
                               String[] nestedArgs,
                               Map<String,​Object> fieldValues)
        Query for ids in the nested SQL query
        Parameters:
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        fieldValues - field values
        Returns:
        result
        Since:
        3.4.0
      • queryIn

        public TResult queryIn​(boolean distinct,
                               String nestedSQL,
                               String[] nestedArgs,
                               Map<String,​Object> fieldValues)
        Query for ids in the nested SQL query
        Parameters:
        distinct - distinct rows
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        fieldValues - field values
        Returns:
        result
        Since:
        4.0.0
      • queryIn

        public TResult queryIn​(String[] columns,
                               String nestedSQL,
                               String[] nestedArgs,
                               Map<String,​Object> fieldValues)
        Query for ids in the nested SQL query
        Parameters:
        columns - columns
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        fieldValues - field values
        Returns:
        result
        Since:
        3.5.0
      • queryIn

        public TResult queryIn​(boolean distinct,
                               String[] columns,
                               String nestedSQL,
                               String[] nestedArgs,
                               Map<String,​Object> fieldValues)
        Query for ids in the nested SQL query
        Parameters:
        distinct - distinct rows
        columns - columns
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        fieldValues - field values
        Returns:
        result
        Since:
        4.0.0
      • countIn

        public int countIn​(String nestedSQL,
                           String[] nestedArgs,
                           Map<String,​Object> fieldValues)
        Get the count in the nested SQL query
        Parameters:
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        fieldValues - field values
        Returns:
        count
        Since:
        3.4.0
      • countIn

        public int countIn​(String column,
                           String nestedSQL,
                           String[] nestedArgs,
                           Map<String,​Object> fieldValues)
        Get the count in the nested SQL query
        Parameters:
        column - count column name
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        fieldValues - field values
        Returns:
        count
        Since:
        4.0.0
      • countIn

        public int countIn​(boolean distinct,
                           String column,
                           String nestedSQL,
                           String[] nestedArgs,
                           Map<String,​Object> fieldValues)
        Get the count in the nested SQL query
        Parameters:
        distinct - distinct column values
        column - count column name
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        fieldValues - field values
        Returns:
        count
        Since:
        4.0.0
      • queryIn

        public TResult queryIn​(String nestedSQL,
                               String[] nestedArgs,
                               String where)
        Query for ids in the nested SQL query
        Parameters:
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        where - where clause
        Returns:
        result
        Since:
        3.4.0
      • queryIn

        public TResult queryIn​(boolean distinct,
                               String nestedSQL,
                               String[] nestedArgs,
                               String where)
        Query for ids in the nested SQL query
        Parameters:
        distinct - distinct rows
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        where - where clause
        Returns:
        result
        Since:
        4.0.0
      • queryIn

        public TResult queryIn​(String[] columns,
                               String nestedSQL,
                               String[] nestedArgs,
                               String where)
        Query for ids in the nested SQL query
        Parameters:
        columns - columns
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        where - where clause
        Returns:
        result
        Since:
        3.5.0
      • queryIn

        public TResult queryIn​(boolean distinct,
                               String[] columns,
                               String nestedSQL,
                               String[] nestedArgs,
                               String where)
        Query for ids in the nested SQL query
        Parameters:
        distinct - distinct rows
        columns - columns
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        where - where clause
        Returns:
        result
        Since:
        4.0.0
      • countIn

        public int countIn​(String nestedSQL,
                           String[] nestedArgs,
                           String where)
        Get the count in the nested SQL query
        Parameters:
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        where - where clause
        Returns:
        count
        Since:
        3.4.0
      • countIn

        public int countIn​(String column,
                           String nestedSQL,
                           String[] nestedArgs,
                           String where)
        Get the count in the nested SQL query
        Parameters:
        column - count column name
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        where - where clause
        Returns:
        count
        Since:
        4.0.0
      • countIn

        public int countIn​(boolean distinct,
                           String column,
                           String nestedSQL,
                           String[] nestedArgs,
                           String where)
        Get the count in the nested SQL query
        Parameters:
        distinct - distinct column values
        column - count column name
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        where - where clause
        Returns:
        count
        Since:
        4.0.0
      • queryIn

        public TResult queryIn​(String nestedSQL,
                               String where)
        Query for ids in the nested SQL query
        Parameters:
        nestedSQL - nested SQL
        where - where clause
        Returns:
        result
        Since:
        3.4.0
      • queryIn

        public TResult queryIn​(boolean distinct,
                               String nestedSQL,
                               String where)
        Query for ids in the nested SQL query
        Parameters:
        distinct - distinct rows
        nestedSQL - nested SQL
        where - where clause
        Returns:
        result
        Since:
        4.0.0
      • queryIn

        public TResult queryIn​(String[] columns,
                               String nestedSQL,
                               String where)
        Query for ids in the nested SQL query
        Parameters:
        columns - columns
        nestedSQL - nested SQL
        where - where clause
        Returns:
        result
        Since:
        3.5.0
      • queryIn

        public TResult queryIn​(boolean distinct,
                               String[] columns,
                               String nestedSQL,
                               String where)
        Query for ids in the nested SQL query
        Parameters:
        distinct - distinct rows
        columns - columns
        nestedSQL - nested SQL
        where - where clause
        Returns:
        result
        Since:
        4.0.0
      • countIn

        public int countIn​(String nestedSQL,
                           String where)
        Get the count in the nested SQL query
        Parameters:
        nestedSQL - nested SQL
        where - where clause
        Returns:
        count
        Since:
        3.4.0
      • countIn

        public int countIn​(String column,
                           String nestedSQL,
                           String where)
        Get the count in the nested SQL query
        Parameters:
        column - count column name
        nestedSQL - nested SQL
        where - where clause
        Returns:
        count
        Since:
        4.0.0
      • countIn

        public int countIn​(boolean distinct,
                           String column,
                           String nestedSQL,
                           String where)
        Get the count in the nested SQL query
        Parameters:
        distinct - distinct column values
        column - count column name
        nestedSQL - nested SQL
        where - where clause
        Returns:
        count
        Since:
        4.0.0
      • queryIn

        public TResult queryIn​(String nestedSQL,
                               String where,
                               String[] whereArgs)
        Query for ids in the nested SQL query
        Parameters:
        nestedSQL - nested SQL
        where - where clause
        whereArgs - where arguments
        Returns:
        result
        Since:
        3.4.0
      • queryIn

        public TResult queryIn​(boolean distinct,
                               String nestedSQL,
                               String where,
                               String[] whereArgs)
        Query for ids in the nested SQL query
        Parameters:
        distinct - distinct rows
        nestedSQL - nested SQL
        where - where clause
        whereArgs - where arguments
        Returns:
        result
        Since:
        4.0.0
      • queryIn

        public TResult queryIn​(String[] columns,
                               String nestedSQL,
                               String where,
                               String[] whereArgs)
        Query for ids in the nested SQL query
        Parameters:
        columns - columns
        nestedSQL - nested SQL
        where - where clause
        whereArgs - where arguments
        Returns:
        result
        Since:
        3.5.0
      • queryIn

        public TResult queryIn​(boolean distinct,
                               String[] columns,
                               String nestedSQL,
                               String where,
                               String[] whereArgs)
        Query for ids in the nested SQL query
        Parameters:
        distinct - distinct rows
        columns - columns
        nestedSQL - nested SQL
        where - where clause
        whereArgs - where arguments
        Returns:
        result
        Since:
        4.0.0
      • countIn

        public int countIn​(String nestedSQL,
                           String where,
                           String[] whereArgs)
        Get the count in the nested SQL query
        Parameters:
        nestedSQL - nested SQL
        where - where clause
        whereArgs - where arguments
        Returns:
        count
        Since:
        3.4.0
      • countIn

        public int countIn​(String column,
                           String nestedSQL,
                           String where,
                           String[] whereArgs)
        Get the count in the nested SQL query
        Parameters:
        column - count column name
        nestedSQL - nested SQL
        where - where clause
        whereArgs - where arguments
        Returns:
        count
        Since:
        4.0.0
      • countIn

        public int countIn​(boolean distinct,
                           String column,
                           String nestedSQL,
                           String where,
                           String[] whereArgs)
        Get the count in the nested SQL query
        Parameters:
        distinct - distinct column values
        column - count column name
        nestedSQL - nested SQL
        where - where clause
        whereArgs - where arguments
        Returns:
        count
        Since:
        4.0.0
      • queryIn

        public TResult queryIn​(String nestedSQL,
                               String[] nestedArgs,
                               String where,
                               String[] whereArgs)
        Query for ids in the nested SQL query
        Parameters:
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        where - where clause
        whereArgs - where arguments
        Returns:
        result
        Since:
        3.4.0
      • queryIn

        public TResult queryIn​(boolean distinct,
                               String nestedSQL,
                               String[] nestedArgs,
                               String where,
                               String[] whereArgs)
        Query for ids in the nested SQL query
        Parameters:
        distinct - distinct rows
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        where - where clause
        whereArgs - where arguments
        Returns:
        result
        Since:
        4.0.0
      • queryIn

        public TResult queryIn​(String[] columns,
                               String nestedSQL,
                               String[] nestedArgs,
                               String where,
                               String[] whereArgs)
        Query for ids in the nested SQL query
        Parameters:
        columns - columns
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        where - where clause
        whereArgs - where arguments
        Returns:
        result
        Since:
        3.5.0
      • queryIn

        public TResult queryIn​(boolean distinct,
                               String[] columns,
                               String nestedSQL,
                               String[] nestedArgs,
                               String where,
                               String[] whereArgs)
        Query for ids in the nested SQL query
        Parameters:
        distinct - distinct rows
        columns - columns
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        where - where clause
        whereArgs - where arguments
        Returns:
        result
        Since:
        4.0.0
      • countIn

        public int countIn​(String nestedSQL,
                           String[] nestedArgs,
                           String where,
                           String[] whereArgs)
        Get the count in the nested SQL query
        Parameters:
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        where - where clause
        whereArgs - where arguments
        Returns:
        count
        Since:
        3.4.0
      • countIn

        public int countIn​(String column,
                           String nestedSQL,
                           String[] nestedArgs,
                           String where,
                           String[] whereArgs)
        Get the count in the nested SQL query
        Parameters:
        column - count column name
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        where - where clause
        whereArgs - where arguments
        Returns:
        count
        Since:
        4.0.0
      • countIn

        public int countIn​(boolean distinct,
                           String column,
                           String nestedSQL,
                           String[] nestedArgs,
                           String where,
                           String[] whereArgs)
        Get the count in the nested SQL query
        Parameters:
        distinct - distinct column values
        column - count column name
        nestedSQL - nested SQL
        nestedArgs - nested SQL args
        where - where clause
        whereArgs - where arguments
        Returns:
        count
        Since:
        4.0.0
      • query

        public TResult query​(String where)
        Query for rows
        Parameters:
        where - where clause
        Returns:
        result
        Since:
        3.4.0
      • query

        public TResult query​(boolean distinct,
                             String where)
        Query for rows
        Parameters:
        distinct - distinct rows
        where - where clause
        Returns:
        result
        Since:
        4.0.0
      • query

        public TResult query​(String[] columns,
                             String where)
        Query for rows
        Parameters:
        columns - columns
        where - where clause
        Returns:
        result
        Since:
        3.5.0
      • query

        public TResult query​(boolean distinct,
                             String[] columns,
                             String where)
        Query for rows
        Parameters:
        distinct - distinct rows
        columns - columns
        where - where clause
        Returns:
        result
        Since:
        4.0.0
      • query

        public TResult query​(String where,
                             String[] whereArgs)
        Query for rows
        Parameters:
        where - where clause
        whereArgs - where arguments
        Returns:
        result
      • query

        public TResult query​(boolean distinct,
                             String where,
                             String[] whereArgs)
        Query for rows
        Parameters:
        distinct - distinct rows
        where - where clause
        whereArgs - where arguments
        Returns:
        result
        Since:
        4.0.0
      • query

        public TResult query​(String[] columns,
                             String where,
                             String[] whereArgs)
        Query for rows
        Parameters:
        columns - columns
        where - where clause
        whereArgs - where arguments
        Returns:
        result
        Since:
        3.5.0
      • query

        public TResult query​(boolean distinct,
                             String[] columns,
                             String where,
                             String[] whereArgs)
        Query for rows
        Parameters:
        distinct - distinct rows
        columns - columns
        where - where clause
        whereArgs - where arguments
        Returns:
        result
        Since:
        4.0.0
      • querySQL

        public String querySQL​(String where)
        Query SQL for rows
        Parameters:
        where - where clause
        Returns:
        SQL
        Since:
        3.4.0
      • querySQL

        public String querySQL​(boolean distinct,
                               String where)
        Query SQL for rows
        Parameters:
        distinct - distinct rows
        where - where clause
        Returns:
        SQL
        Since:
        4.0.0
      • queryIdsSQL

        public String queryIdsSQL​(String where)
        Query SQL for row ids
        Parameters:
        where - where clause
        Returns:
        SQL
        Since:
        3.4.0
      • queryIdsSQL

        public String queryIdsSQL​(boolean distinct,
                                  String where)
        Query SQL for row ids
        Parameters:
        distinct - distinct rows
        where - where clause
        Returns:
        SQL
        Since:
        4.0.0
      • querySQL

        public String querySQL​(String[] columns,
                               String where)
        Query SQL for rows
        Parameters:
        columns - columns
        where - where clause
        Returns:
        SQL
        Since:
        3.4.0
      • querySQL

        public String querySQL​(boolean distinct,
                               String[] columns,
                               String where)
        Query SQL for rows
        Parameters:
        distinct - distinct rows
        columns - columns
        where - where clause
        Returns:
        SQL
        Since:
        4.0.0
      • query

        public TResult query​(String where,
                             String[] whereArgs,
                             String groupBy,
                             String having,
                             String orderBy)
        Query for rows
        Parameters:
        where - where clause
        whereArgs - where arguments
        groupBy - group by
        having - having
        orderBy - order by
        Returns:
        result
      • query

        public TResult query​(boolean distinct,
                             String where,
                             String[] whereArgs,
                             String groupBy,
                             String having,
                             String orderBy)
        Query for rows
        Parameters:
        distinct - distinct rows
        where - where clause
        whereArgs - where arguments
        groupBy - group by
        having - having
        orderBy - order by
        Returns:
        result
        Since:
        4.0.0
      • query

        public TResult query​(String[] columns,
                             String where,
                             String[] whereArgs,
                             String groupBy,
                             String having,
                             String orderBy)
        Query for rows
        Parameters:
        columns - columns
        where - where clause
        whereArgs - where arguments
        groupBy - group by
        having - having
        orderBy - order by
        Returns:
        result
        Since:
        3.5.0
      • query

        public TResult query​(boolean distinct,
                             String[] columns,
                             String where,
                             String[] whereArgs,
                             String groupBy,
                             String having,
                             String orderBy)
        Query for rows
        Parameters:
        distinct - distinct rows
        columns - columns
        where - where clause
        whereArgs - where arguments
        groupBy - group by
        having - having
        orderBy - order by
        Returns:
        result
        Since:
        4.0.0
      • query

        public TResult query​(String where,
                             String[] whereArgs,
                             String groupBy,
                             String having,
                             String orderBy,
                             String limit)
        Query for rows
        Parameters:
        where - where clause
        whereArgs - where arguments
        groupBy - group by
        having - having
        orderBy - order by
        limit - limit
        Returns:
        result
      • query

        public TResult query​(boolean distinct,
                             String where,
                             String[] whereArgs,
                             String groupBy,
                             String having,
                             String orderBy,
                             String limit)
        Query for rows
        Parameters:
        distinct - distinct rows
        where - where clause
        whereArgs - where arguments
        groupBy - group by
        having - having
        orderBy - order by
        limit - limit
        Returns:
        result
        Since:
        4.0.0
      • query

        public TResult query​(String[] columns,
                             String where,
                             String[] whereArgs,
                             String groupBy,
                             String having,
                             String orderBy,
                             String limit)
        Query for rows
        Parameters:
        columns - columns
        where - where clause
        whereArgs - where arguments
        groupBy - group by
        having - having
        orderBy - order by
        limit - limit
        Returns:
        result
        Since:
        3.5.0
      • query

        public TResult query​(boolean distinct,
                             String[] columns,
                             String where,
                             String[] whereArgs,
                             String groupBy,
                             String having,
                             String orderBy,
                             String limit)
        Query for rows
        Parameters:
        distinct - distinct rows
        columns - columns
        where - where clause
        whereArgs - where arguments
        groupBy - group by
        having - having
        orderBy - order by
        limit - limit
        Returns:
        result
        Since:
        4.0.0
      • queryForChunk

        public TResult queryForChunk​(int limit,
                                     long offset)
        Query for id ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        3.1.0
      • queryForChunk

        public TResult queryForChunk​(boolean distinct,
                                     int limit,
                                     long offset)
        Query for id ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        distinct - distinct rows
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        4.0.0
      • queryForChunk

        public TResult queryForChunk​(String[] columns,
                                     int limit,
                                     long offset)
        Query for id ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        columns - columns
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        3.5.0
      • queryForChunk

        public TResult queryForChunk​(boolean distinct,
                                     String[] columns,
                                     int limit,
                                     long offset)
        Query for id ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        distinct - distinct rows
        columns - columns
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        4.0.0
      • queryForChunk

        public TResult queryForChunk​(String where,
                                     String[] whereArgs,
                                     int limit,
                                     long offset)
        Query for id ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        where - where clause
        whereArgs - where arguments
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        3.4.0
      • queryForChunk

        public TResult queryForChunk​(boolean distinct,
                                     String where,
                                     String[] whereArgs,
                                     int limit,
                                     long offset)
        Query for id ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        distinct - distinct rows
        where - where clause
        whereArgs - where arguments
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        4.0.0
      • queryForChunk

        public TResult queryForChunk​(String[] columns,
                                     String where,
                                     String[] whereArgs,
                                     int limit,
                                     long offset)
        Query for id ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        columns - columns
        where - where clause
        whereArgs - where arguments
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        3.5.0
      • queryForChunk

        public TResult queryForChunk​(boolean distinct,
                                     String[] columns,
                                     String where,
                                     String[] whereArgs,
                                     int limit,
                                     long offset)
        Query for id ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        distinct - distinct rows
        columns - columns
        where - where clause
        whereArgs - where arguments
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        4.0.0
      • queryForChunk

        public TResult queryForChunk​(String orderBy,
                                     int limit,
                                     long offset)
        Query for ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        orderBy - order by
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        3.1.0
      • queryForChunk

        public TResult queryForChunk​(boolean distinct,
                                     String orderBy,
                                     int limit,
                                     long offset)
        Query for ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        distinct - distinct rows
        orderBy - order by
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        4.0.0
      • queryForChunk

        public TResult queryForChunk​(String[] columns,
                                     String orderBy,
                                     int limit,
                                     long offset)
        Query for ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        columns - columns
        orderBy - order by
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        3.5.0
      • queryForChunk

        public TResult queryForChunk​(boolean distinct,
                                     String[] columns,
                                     String orderBy,
                                     int limit,
                                     long offset)
        Query for ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        distinct - distinct rows
        columns - columns
        orderBy - order by
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        4.0.0
      • queryForChunk

        public TResult queryForChunk​(String where,
                                     String[] whereArgs,
                                     String orderBy,
                                     int limit,
                                     long offset)
        Query for ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        where - where clause
        whereArgs - where arguments
        orderBy - order by
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        3.4.0
      • queryForChunk

        public TResult queryForChunk​(boolean distinct,
                                     String where,
                                     String[] whereArgs,
                                     String orderBy,
                                     int limit,
                                     long offset)
        Query for ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        distinct - distinct rows
        where - where clause
        whereArgs - where arguments
        orderBy - order by
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        4.0.0
      • queryForChunk

        public TResult queryForChunk​(String[] columns,
                                     String where,
                                     String[] whereArgs,
                                     String orderBy,
                                     int limit,
                                     long offset)
        Query for ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        columns - columns
        where - where clause
        whereArgs - where arguments
        orderBy - order by
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        3.5.0
      • queryForChunk

        public TResult queryForChunk​(boolean distinct,
                                     String[] columns,
                                     String where,
                                     String[] whereArgs,
                                     String orderBy,
                                     int limit,
                                     long offset)
        Query for ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        distinct - distinct rows
        columns - columns
        where - where clause
        whereArgs - where arguments
        orderBy - order by
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        4.0.0
      • queryForChunk

        public TResult queryForChunk​(String where,
                                     String[] whereArgs,
                                     String groupBy,
                                     String having,
                                     String orderBy,
                                     int limit,
                                     long offset)
        Query for ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        where - where clause
        whereArgs - where arguments
        groupBy - group by
        having - having
        orderBy - order by
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        3.4.0
      • queryForChunk

        public TResult queryForChunk​(boolean distinct,
                                     String where,
                                     String[] whereArgs,
                                     String groupBy,
                                     String having,
                                     String orderBy,
                                     int limit,
                                     long offset)
        Query for ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        distinct - distinct rows
        where - where clause
        whereArgs - where arguments
        groupBy - group by
        having - having
        orderBy - order by
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        4.0.0
      • queryForChunk

        public TResult queryForChunk​(String[] columns,
                                     String where,
                                     String[] whereArgs,
                                     String groupBy,
                                     String having,
                                     String orderBy,
                                     int limit,
                                     long offset)
        Query for ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        columns - columns
        where - where clause
        whereArgs - where arguments
        groupBy - group by
        having - having
        orderBy - order by
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        3.5.0
      • queryForChunk

        public TResult queryForChunk​(boolean distinct,
                                     String[] columns,
                                     String where,
                                     String[] whereArgs,
                                     String groupBy,
                                     String having,
                                     String orderBy,
                                     int limit,
                                     long offset)
        Query for ordered rows starting at the offset and returning no more than the limit.
        Parameters:
        distinct - distinct rows
        columns - columns
        where - where clause
        whereArgs - where arguments
        groupBy - group by
        having - having
        orderBy - order by
        limit - chunk limit
        offset - chunk query offset
        Returns:
        result
        Since:
        4.0.0
      • buildLimit

        public String buildLimit​(int limit,
                                 long offset)
        Build a limit String with the limit and offset
        Parameters:
        limit - limit
        offset - offset
        Returns:
        limit
        Since:
        3.1.0
      • beginTransaction

        public abstract void beginTransaction()
        Begin a transaction
        Since:
        3.3.0
      • endTransaction

        public void endTransaction()
        End a transaction successfully
        Since:
        3.3.0
      • failTransaction

        public void failTransaction()
        Fail a transaction
        Since:
        3.3.0
      • endTransaction

        public abstract void endTransaction​(boolean successful)
        End a transaction
        Parameters:
        successful - true if the transaction was successful, false to rollback or not commit
        Since:
        3.3.0
      • endAndBeginTransaction

        public void endAndBeginTransaction()
        End a transaction as successful and begin a new transaction
        Since:
        3.3.0
      • commit

        public abstract void commit()
        Commit changes on the connection
        Since:
        3.3.0
      • inTransaction

        public abstract boolean inTransaction()
        Determine if currently within a transaction
        Returns:
        true if in transaction
        Since:
        3.3.0
      • update

        public abstract int update​(TRow row)
        Update the row
        Parameters:
        row - row
        Returns:
        number of rows affected, should be 0 or 1
      • delete

        public int delete​(TRow row)
        Delete the row
        Parameters:
        row - row
        Returns:
        number of rows affected, should be 0 or 1 unless the table has duplicate rows in it
      • deleteById

        public int deleteById​(long id)
        Delete a row by id
        Parameters:
        id - id
        Returns:
        number of rows affected, should be 0 or 1
      • delete

        public int delete​(String whereClause,
                          String[] whereArgs)
        Delete rows matching the where clause
        Parameters:
        whereClause - where clause
        whereArgs - where arguments
        Returns:
        deleted count
      • delete

        public int delete​(Map<String,​Object> fieldValues)
        Delete rows matching the field values
        Parameters:
        fieldValues - field values
        Returns:
        deleted count
        Since:
        3.0.2
      • deleteAll

        public int deleteAll()
        Delete all rows
        Returns:
        deleted count
        Since:
        3.0.2
      • create

        public long create​(TRow row)
        Creates a new row, same as calling insert(UserCoreRow)
        Parameters:
        row - row
        Returns:
        row id
      • insert

        public abstract long insert​(TRow row)
        Inserts a new row
        Parameters:
        row - row
        Returns:
        row id
      • getPkWhere

        protected String getPkWhere​(long id)
        Get the primary key where clause
        Parameters:
        id - id
        Returns:
        primary key where clause
      • getPkWhereArgs

        protected String[] getPkWhereArgs​(long id)
        Get the primary key where args
        Parameters:
        id - id
        Returns:
        primary key where args
      • buildWhere

        public String buildWhere​(Set<Map.Entry<String,​Object>> fields)
        Build where (or selection) statement from the fields
        Parameters:
        fields - fields
        Returns:
        where clause
      • buildValueWhere

        public String buildValueWhere​(Set<Map.Entry<String,​ColumnValue>> fields)
        Build where (or selection) statement from the fields
        Parameters:
        fields - fields
        Returns:
        where clause
      • buildWhere

        public String buildWhere​(String field,
                                 Object value)
        Build where (or selection) statement for a single field
        Parameters:
        field - field name
        value - field value
        Returns:
        where clause
      • buildWhereLike

        public String buildWhereLike​(String field,
                                     Object value)
        Build where (or selection) LIKE statement for a single field
        Parameters:
        field - field name
        value - field value
        Returns:
        where clause
        Since:
        3.0.1
      • buildWhere

        public String buildWhere​(String field,
                                 Object value,
                                 String operation)
        Build where (or selection) statement for a single field using the provided operation
        Parameters:
        field - field
        value - value
        operation - operation
        Returns:
        where clause
      • buildWhere

        public String buildWhere​(String field,
                                 ColumnValue value)
        Build where (or selection) statement for a single field
        Parameters:
        field - field name
        value - column value
        Returns:
        where clause
      • buildWhereLike

        public String buildWhereLike​(String field,
                                     ColumnValue value)
        Build where (or selection) LIKE statement for a single field
        Parameters:
        field - field name
        value - column value
        Returns:
        where clause
        Since:
        3.0.1
      • buildWhereArgs

        public String[] buildWhereArgs​(Collection<Object> values)
        Build where (or selection) args for the values
        Parameters:
        values - values
        Returns:
        where args
      • buildWhereArgs

        public String[] buildWhereArgs​(Object[] values)
        Build where (or selection) args for the values
        Parameters:
        values - values
        Returns:
        where args
      • buildValueWhereArgs

        public String[] buildValueWhereArgs​(Collection<ColumnValue> values)
        Build where (or selection) args for the values
        Parameters:
        values - values
        Returns:
        where args
      • buildWhereArgs

        public String[] buildWhereArgs​(Object value)
        Build where (or selection) args for the value
        Parameters:
        value - value
        Returns:
        where args
      • buildWhereArgs

        public String[] buildWhereArgs​(ColumnValue value)
        Build where (or selection) args for the value
        Parameters:
        value - value
        Returns:
        where args
      • buildWhereIn

        public String buildWhereIn​(String nestedSQL,
                                   String where)
        Build where statement for ids in the nested SQL query
        Parameters:
        nestedSQL - nested SQL
        where - where clause
        Returns:
        where clause
        Since:
        3.4.0
      • buildWhereInArgs

        public String[] buildWhereInArgs​(String[] nestedArgs,
                                         String[] whereArgs)
        Build where args for ids in the nested SQL query
        Parameters:
        nestedArgs - nested SQL args
        whereArgs - where arguments
        Returns:
        where args
        Since:
        3.4.0
      • count

        public int count()
        Get the total count
        Returns:
        count
      • count

        public int count​(String where)
        Get the count
        Parameters:
        where - where clause
        Returns:
        count
        Since:
        3.4.0
      • count

        public int count​(String where,
                         String[] args)
        Get the count
        Parameters:
        where - where clause
        args - where arguments
        Returns:
        count
      • countColumn

        public int countColumn​(String column)
        Get a count of results
        Parameters:
        column - column name
        Returns:
        count
        Since:
        4.0.0
      • count

        public int count​(boolean distinct,
                         String column)
        Get a count of results
        Parameters:
        distinct - distinct column values
        column - column name
        Returns:
        count
        Since:
        4.0.0
      • count

        public int count​(String column,
                         String where)
        Get a count of results
        Parameters:
        column - column name
        where - where clause
        Returns:
        count
        Since:
        4.0.0
      • count

        public int count​(String column,
                         String where,
                         String[] args)
        Get a count of results
        Parameters:
        column - column name
        where - where clause
        args - arguments
        Returns:
        count
        Since:
        4.0.0
      • count

        public int count​(boolean distinct,
                         String column,
                         String where)
        Get a count of results
        Parameters:
        distinct - distinct column values
        column - column name
        where - where clause
        Returns:
        count
        Since:
        4.0.0
      • count

        public int count​(boolean distinct,
                         String column,
                         String where,
                         String[] args)
        Get a count of results
        Parameters:
        distinct - distinct column values
        column - column name
        where - where clause
        args - arguments
        Returns:
        count
        Since:
        4.0.0
      • min

        public <T> T min​(String column)
        Get the min result of the column
        Type Parameters:
        T - return type
        Parameters:
        column - column name
        Returns:
        min or null
        Since:
        4.0.0
      • min

        public <T> T min​(String column,
                         String where,
                         String[] args)
        Get the min result of the column
        Type Parameters:
        T - return type
        Parameters:
        column - column name
        where - where clause
        args - where arugments
        Returns:
        min or null
        Since:
        4.0.0
      • max

        public <T> T max​(String column)
        Get the max result of the column
        Type Parameters:
        T - return type
        Parameters:
        column - column name
        Returns:
        max or null
        Since:
        4.0.0
      • max

        public <T> T max​(String column,
                         String where,
                         String[] args)
        Get the max result of the column
        Type Parameters:
        T - return type
        Parameters:
        column - column name
        where - where clause
        args - where arguments
        Returns:
        max or null
        Since:
        4.0.0
      • querySingleResult

        public Object querySingleResult​(String sql,
                                        String[] args)
        Query the SQL for a single result object in the first column
        Parameters:
        sql - sql statement
        args - sql arguments
        Returns:
        single result object
        Since:
        3.1.0
      • querySingleTypedResult

        public <T> T querySingleTypedResult​(String sql,
                                            String[] args)
        Query the SQL for a single result typed object in the first column
        Type Parameters:
        T - result value type
        Parameters:
        sql - sql statement
        args - sql arguments
        Returns:
        single result object
        Since:
        3.1.0
      • querySingleResult

        public Object querySingleResult​(String sql,
                                        String[] args,
                                        GeoPackageDataType dataType)
        Query the SQL for a single result object in the first column with the expected data type
        Parameters:
        sql - sql statement
        args - sql arguments
        dataType - GeoPackage data type
        Returns:
        single result object
        Since:
        3.1.0
      • querySingleTypedResult

        public <T> T querySingleTypedResult​(String sql,
                                            String[] args,
                                            GeoPackageDataType dataType)
        Query the SQL for a single result typed object in the first column with the expected data type
        Type Parameters:
        T - result value type
        Parameters:
        sql - sql statement
        args - sql arguments
        dataType - GeoPackage data type
        Returns:
        single result object
        Since:
        3.1.0
      • querySingleResult

        public Object querySingleResult​(String sql,
                                        String[] args,
                                        int column)
        Query the SQL for a single result object
        Parameters:
        sql - sql statement
        args - arguments
        column - column index
        Returns:
        result, null if no result
        Since:
        3.1.0
      • querySingleTypedResult

        public <T> T querySingleTypedResult​(String sql,
                                            String[] args,
                                            int column)
        Query the SQL for a single result typed object
        Type Parameters:
        T - result value type
        Parameters:
        sql - sql statement
        args - arguments
        column - column index
        Returns:
        result, null if no result
        Since:
        3.1.0
      • querySingleResult

        public Object querySingleResult​(String sql,
                                        String[] args,
                                        int column,
                                        GeoPackageDataType dataType)
        Query the SQL for a single result object with the expected data type
        Parameters:
        sql - sql statement
        args - arguments
        column - column index
        dataType - GeoPackage data type
        Returns:
        result, null if no result
        Since:
        3.1.0
      • querySingleTypedResult

        public <T> T querySingleTypedResult​(String sql,
                                            String[] args,
                                            int column,
                                            GeoPackageDataType dataType)
        Query the SQL for a single result typed object with the expected data type
        Type Parameters:
        T - result value type
        Parameters:
        sql - sql statement
        args - arguments
        column - column index
        dataType - GeoPackage data type
        Returns:
        result, null if no result
        Since:
        3.1.0
      • querySingleColumnResults

        public List<Object> querySingleColumnResults​(String sql,
                                                     String[] args)
        Query for values from the first column
        Parameters:
        sql - sql statement
        args - sql arguments
        Returns:
        single column values
        Since:
        3.1.0
      • querySingleColumnTypedResults

        public <T> List<T> querySingleColumnTypedResults​(String sql,
                                                         String[] args)
        Query for typed values from the first column
        Type Parameters:
        T - result value type
        Parameters:
        sql - sql statement
        args - sql arguments
        Returns:
        single column values
        Since:
        3.1.0
      • querySingleColumnResults

        public List<Object> querySingleColumnResults​(String sql,
                                                     String[] args,
                                                     GeoPackageDataType dataType)
        Query for values from the first column
        Parameters:
        sql - sql statement
        args - arguments
        dataType - GeoPackage data type
        Returns:
        single column results
        Since:
        3.1.0
      • querySingleColumnTypedResults

        public <T> List<T> querySingleColumnTypedResults​(String sql,
                                                         String[] args,
                                                         GeoPackageDataType dataType)
        Query for typed values from the first column
        Type Parameters:
        T - result value type
        Parameters:
        sql - sql statement
        args - arguments
        dataType - GeoPackage data type
        Returns:
        single column results
        Since:
        3.1.0
      • querySingleColumnResults

        public List<Object> querySingleColumnResults​(String sql,
                                                     String[] args,
                                                     int column)
        Query for values from a single column
        Parameters:
        sql - sql statement
        args - arguments
        column - column index
        Returns:
        single column results
        Since:
        3.1.0
      • querySingleColumnTypedResults

        public <T> List<T> querySingleColumnTypedResults​(String sql,
                                                         String[] args,
                                                         int column)
        Query for typed values from a single column
        Type Parameters:
        T - result value type
        Parameters:
        sql - sql statement
        args - arguments
        column - column index
        Returns:
        single column results
        Since:
        3.1.0
      • querySingleColumnResults

        public List<Object> querySingleColumnResults​(String sql,
                                                     String[] args,
                                                     int column,
                                                     GeoPackageDataType dataType)
        Query for values from a single column
        Parameters:
        sql - sql statement
        args - arguments
        column - column index
        dataType - GeoPackage data type
        Returns:
        single column results
        Since:
        3.1.0
      • querySingleColumnTypedResults

        public <T> List<T> querySingleColumnTypedResults​(String sql,
                                                         String[] args,
                                                         int column,
                                                         GeoPackageDataType dataType)
        Query for typed values from a single column
        Type Parameters:
        T - result value type
        Parameters:
        sql - sql statement
        args - arguments
        column - column index
        dataType - GeoPackage data type
        Returns:
        single column results
        Since:
        3.1.0
      • querySingleColumnResults

        public List<Object> querySingleColumnResults​(String sql,
                                                     String[] args,
                                                     int column,
                                                     Integer limit)
        Query for values from a single column up to the limit
        Parameters:
        sql - sql statement
        args - arguments
        limit - result row limit
        column - column index
        Returns:
        single column results
        Since:
        3.1.0
      • querySingleColumnTypedResults

        public <T> List<T> querySingleColumnTypedResults​(String sql,
                                                         String[] args,
                                                         int column,
                                                         Integer limit)
        Query for typed values from a single column up to the limit
        Type Parameters:
        T - result value type
        Parameters:
        sql - sql statement
        args - arguments
        limit - result row limit
        column - column index
        Returns:
        single column results
        Since:
        3.1.0
      • querySingleColumnResults

        public List<Object> querySingleColumnResults​(String sql,
                                                     String[] args,
                                                     int column,
                                                     GeoPackageDataType dataType,
                                                     Integer limit)
        Query for values from a single column up to the limit
        Parameters:
        sql - sql statement
        args - arguments
        column - column index
        dataType - GeoPackage data type
        limit - result row limit
        Returns:
        single column results
        Since:
        3.1.0
      • querySingleColumnTypedResults

        public <T> List<T> querySingleColumnTypedResults​(String sql,
                                                         String[] args,
                                                         int column,
                                                         GeoPackageDataType dataType,
                                                         Integer limit)
        Query for typed values from a single column up to the limit
        Type Parameters:
        T - result value type
        Parameters:
        sql - sql statement
        args - arguments
        column - column index
        dataType - GeoPackage data type
        limit - result row limit
        Returns:
        single column results
        Since:
        3.1.0
      • queryResults

        public List<List<Object>> queryResults​(String sql,
                                               String[] args)
        Query for values
        Parameters:
        sql - sql statement
        args - arguments
        Returns:
        results
        Since:
        3.1.0
      • queryTypedResults

        public <T> List<List<T>> queryTypedResults​(String sql,
                                                   String[] args)
        Query for typed values
        Type Parameters:
        T - result value type
        Parameters:
        sql - sql statement
        args - arguments
        Returns:
        results
        Since:
        3.1.0
      • queryResults

        public List<List<Object>> queryResults​(String sql,
                                               String[] args,
                                               GeoPackageDataType[] dataTypes)
        Query for values
        Parameters:
        sql - sql statement
        args - arguments
        dataTypes - column data types
        Returns:
        results
        Since:
        3.1.0
      • queryTypedResults

        public <T> List<List<T>> queryTypedResults​(String sql,
                                                   String[] args,
                                                   GeoPackageDataType[] dataTypes)
        Query for typed values
        Type Parameters:
        T - result value type
        Parameters:
        sql - sql statement
        args - arguments
        dataTypes - column data types
        Returns:
        results
        Since:
        3.1.0
      • querySingleRowResults

        public List<Object> querySingleRowResults​(String sql,
                                                  String[] args)
        Query for string values in a single (first) row
        Parameters:
        sql - sql statement
        args - arguments
        Returns:
        single row results
        Since:
        3.1.0
      • querySingleRowTypedResults

        public <T> List<T> querySingleRowTypedResults​(String sql,
                                                      String[] args)
        Query for string typed values in a single (first) row
        Type Parameters:
        T - result value type
        Parameters:
        sql - sql statement
        args - arguments
        Returns:
        single row results
        Since:
        3.1.0
      • querySingleRowResults

        public List<Object> querySingleRowResults​(String sql,
                                                  String[] args,
                                                  GeoPackageDataType[] dataTypes)
        Query for values in a single (first) row
        Parameters:
        sql - sql statement
        args - arguments
        dataTypes - column data types
        Returns:
        single row results
        Since:
        3.1.0
      • querySingleRowTypedResults

        public <T> List<T> querySingleRowTypedResults​(String sql,
                                                      String[] args,
                                                      GeoPackageDataType[] dataTypes)
        Query for typed values in a single (first) row
        Type Parameters:
        T - result value type
        Parameters:
        sql - sql statement
        args - arguments
        dataTypes - column data types
        Returns:
        single row results
        Since:
        3.1.0
      • queryResults

        public List<List<Object>> queryResults​(String sql,
                                               String[] args,
                                               Integer limit)
        Query for values
        Parameters:
        sql - sql statement
        args - arguments
        limit - result row limit
        Returns:
        results
        Since:
        3.1.0
      • queryTypedResults

        public <T> List<List<T>> queryTypedResults​(String sql,
                                                   String[] args,
                                                   Integer limit)
        Query for typed values
        Type Parameters:
        T - result value type
        Parameters:
        sql - sql statement
        args - arguments
        limit - result row limit
        Returns:
        results
        Since:
        3.1.0
      • queryResults

        public List<List<Object>> queryResults​(String sql,
                                               String[] args,
                                               GeoPackageDataType[] dataTypes,
                                               Integer limit)
        Query for values up to the limit
        Parameters:
        sql - sql statement
        args - arguments
        dataTypes - column data types
        limit - result row limit
        Returns:
        results
        Since:
        3.1.0
      • queryTypedResults

        public <T> List<List<T>> queryTypedResults​(String sql,
                                                   String[] args,
                                                   GeoPackageDataType[] dataTypes,
                                                   Integer limit)
        Query for typed values up to the limit
        Type Parameters:
        T - result value type
        Parameters:
        sql - sql statement
        args - arguments
        dataTypes - column data types
        limit - result row limit
        Returns:
        results
        Since:
        3.1.0
      • getZoomLevel

        public int getZoomLevel()
        Get the approximate zoom level of where the bounding box of the user data fits into the world
        Returns:
        zoom level
        Since:
        1.1.0
      • buildColumnsAsNull

        public String[] buildColumnsAsNull​(List<TColumn> columns)
        Build "columns as" values for the table columns with the specified columns as null
        Parameters:
        columns - columns to include as null
        Returns:
        "columns as" values
        Since:
        2.0.0
      • buildColumnsAs

        public String[] buildColumnsAs​(List<TColumn> columns,
                                       String value)
        Build "columns as" values for the table columns with the specified columns as the specified value
        Parameters:
        columns - columns to include as value
        value - "columns as" value for specified columns
        Returns:
        "columns as" values
        Since:
        2.0.0
      • buildColumnsAsNull

        public String[] buildColumnsAsNull​(String[] columns)
        Build "columns as" values for the table columns with the specified columns as null
        Parameters:
        columns - columns to include as null
        Returns:
        "columns as" values
        Since:
        2.0.0
      • buildColumnsAs

        public String[] buildColumnsAs​(String[] columns,
                                       String value)
        Build "columns as" values for the table columns with the specified columns as the specified value
        Parameters:
        columns - columns to include as value
        value - "columns as" value for specified columns
        Returns:
        "columns as" values
        Since:
        2.0.0
      • buildColumnsAs

        public String[] buildColumnsAs​(List<TColumn> columns,
                                       String[] values)
        Build "columns as" values for the table columns with the specified columns as the specified values
        Parameters:
        columns - columns to include as value
        values - "columns as" values for specified columns
        Returns:
        "columns as" values
        Since:
        2.0.0
      • buildColumnsAs

        public String[] buildColumnsAs​(String[] columns,
                                       String[] values)
        Build "columns as" values for the table columns with the specified columns as the specified values
        Parameters:
        columns - columns to include as value
        values - "columns as" values for specified columns
        Returns:
        "columns as" values
        Since:
        2.0.0
      • buildColumnsAs

        public String[] buildColumnsAs​(Map<String,​String> columns)
        Build "columns as" values for the table column to value mapping
        Parameters:
        columns - mapping between columns and values
        Returns:
        "columns as" values
        Since:
        2.0.0
      • addColumn

        public void addColumn​(TColumn column)
        Add a new column
        Parameters:
        column - new column
        Since:
        3.3.0
      • renameColumn

        public void renameColumn​(TColumn column,
                                 String newColumnName)
        Rename column
        Parameters:
        column - column
        newColumnName - new column name
        Since:
        3.3.0
      • renameColumn

        public void renameColumn​(String columnName,
                                 String newColumnName)
        Rename column
        Parameters:
        columnName - column name
        newColumnName - new column name
        Since:
        3.3.0
      • renameColumn

        public void renameColumn​(int index,
                                 String newColumnName)
        Rename column
        Parameters:
        index - column index
        newColumnName - new column name
        Since:
        3.3.0
      • renameTableColumn

        protected void renameTableColumn​(String columnName,
                                         String newColumnName)
        Rename a table column
        Parameters:
        columnName - column name
        newColumnName - new column name
        Since:
        3.3.0
      • dropColumn

        public void dropColumn​(TColumn column)
        Drop a column
        Parameters:
        column - column
        Since:
        3.3.0
      • dropColumn

        public void dropColumn​(int index)
        Drop a column
        Parameters:
        index - column index
        Since:
        3.3.0
      • dropColumn

        public void dropColumn​(String columnName)
        Drop a column
        Parameters:
        columnName - column name
        Since:
        3.3.0
      • dropColumns

        public void dropColumns​(Collection<TColumn> columns)
        Drop columns
        Parameters:
        columns - columns
        Since:
        3.3.0
      • dropColumnIndexes

        public void dropColumnIndexes​(Collection<Integer> indexes)
        Drop columns
        Parameters:
        indexes - column indexes
        Since:
        3.3.0
      • dropColumnNames

        public void dropColumnNames​(Collection<String> columnNames)
        Drop columns
        Parameters:
        columnNames - column names
        Since:
        3.3.0
      • alterColumn

        public void alterColumn​(TColumn column)
        Alter a column
        Parameters:
        column - column
        Since:
        3.3.0
      • alterColumns

        public void alterColumns​(Collection<TColumn> columns)
        Alter columns
        Parameters:
        columns - columns
        Since:
        3.3.0