public final class ValidationSqliteUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ValidationSqliteUtil.ColumnDescription
Describes the table column.
|
Constructor and Description |
---|
ValidationSqliteUtil() |
Modifier and Type | Method and Description |
---|---|
static java.util.Map<java.lang.String,ValidationSqliteUtil.ColumnDescription> |
getTableSchema(java.sql.Connection connection,
java.lang.String attachedDbName,
java.lang.String tableName)
Returns a map of column names to column description for given SQLite table.
|
static boolean |
isHiddenColumnInTable(java.sql.Connection connection,
java.lang.String attachedDbName,
java.lang.String tableName,
java.lang.String hiddenColumnName)
Checks if hidden column exits in given SQLite table.
|
static java.lang.String |
sqliteColumnTypeName(int columnType)
Gets name of the given SQLite column type.
|
static int |
sqlTypeToSqliteType(int columnType)
Converts SQL type returned by ResultSetMetaData.getColumnType.
|
public static java.util.Map<java.lang.String,ValidationSqliteUtil.ColumnDescription> getTableSchema(java.sql.Connection connection, java.lang.String attachedDbName, java.lang.String tableName) throws java.sql.SQLException
connection
- Database connection to use.attachedDbName
- Attached database name if table is relocated in different database or null.tableName
- Name of the table to get column types of.java.sql.SQLException
- Throws in case of any SQLite error.public static boolean isHiddenColumnInTable(java.sql.Connection connection, java.lang.String attachedDbName, java.lang.String tableName, java.lang.String hiddenColumnName)
connection
- Database connection to use.attachedDbName
- Attached database name if table is relocated in different database or null.tableName
- Name of the table where to check hidden column.hiddenColumnName
- Name of hidden column to check.public static int sqlTypeToSqliteType(int columnType)
columnType
- SQL column type returned by ResultSetMetaData.getColumnType().public static java.lang.String sqliteColumnTypeName(int columnType)
columnType
- SQLite column type returned from sqlTypeToSqliteType.Last updated 2024-12-05 10:34:50