Class Tables
- java.lang.Object
-
- com.impossibl.postgres.system.tables.Tables
-
public class Tables extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Tables()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <R extends Table.Row,T extends Table<R>>
java.util.List<R>convertRows(Context context, T table, ResultBatch results)
static java.lang.String
getSQL(java.lang.Object[] sqlData, Version currentVersion)
Helper function for matching a SQL query with a version.
-
-
-
Method Detail
-
getSQL
public static java.lang.String getSQL(java.lang.Object[] sqlData, Version currentVersion)
Helper function for matching a SQL query with a version.- Parameters:
sqlData
- An array of [Version, String] pairs to select fromcurrentVersion
- The requested version of SQL to retrieve- Returns:
- SQL text for the requested version
- Throws:
UnsupportedServerVersion
- if no match can be foundjava.lang.IllegalStateException
- if the sqlData pairs are ill formed
-
convertRows
public static <R extends Table.Row,T extends Table<R>> java.util.List<R> convertRows(Context context, T table, ResultBatch results) throws java.io.IOException
- Throws:
java.io.IOException
-
-