Interface Table<R extends Table.Row>
-
- Type Parameters:
R
- The row type this table uses
- All Known Implementing Classes:
PGTypeTable
public interface Table<R extends Table.Row>
A system table object. Providing a POJO type for the row and some matching SQL and a list of instances can be fetched from the database with no other work. This is used for system queries.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Table.Row
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description R
createRow(Context context, ResultBatch resultBatch, int rowIdx)
Creates and instance of the row type of this table.static <T> T
getFieldOfRow(ResultBatch resultBatch, int rowIdx, int fieldIdx, Context context, Class<T> targetType)
String
getSQL(Version currentVersion)
Returns the SQL that is needed to load all rows of this table.default List<R>
query(BasicContext context, String queryTxt, long timeout, Object... params)
-
-
-
Method Detail
-
getSQL
String getSQL(Version currentVersion)
Returns the SQL that is needed to load all rows of this table.- Parameters:
currentVersion
- Current version of the server that will execute it- Returns:
- SQL text of the query
-
createRow
R createRow(Context context, ResultBatch resultBatch, int rowIdx) throws IOException
Creates and instance of the row type of this table.- Returns:
- An instance of the table's row type
- Throws:
IOException
-
query
default List<R> query(BasicContext context, String queryTxt, long timeout, Object... params) throws IOException
- Throws:
IOException
-
getFieldOfRow
static <T> T getFieldOfRow(ResultBatch resultBatch, int rowIdx, int fieldIdx, Context context, Class<T> targetType) throws IOException
- Throws:
IOException
-
-