public class TableInfo extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CID
Index column
|
static int |
CID_INDEX
Index column index
|
static String |
DEFAULT_NULL
Default of NULL value
|
static String |
DFLT_VALUE
Default value column
|
static int |
DFLT_VALUE_INDEX
Default value column index
|
static String |
NAME
Name column
|
static int |
NAME_INDEX
Name column index
|
static String |
NOT_NULL
Not null column
|
static int |
NOT_NULL_INDEX
Not null column index
|
static String |
PK
Primary key column
|
static int |
PK_INDEX
Primary key column index
|
static String |
TYPE
Type column
|
static int |
TYPE_INDEX
Type column index
|
| Modifier and Type | Method and Description |
|---|---|
TableColumn |
getColumn(int index)
Get the column at the index
|
TableColumn |
getColumn(String name)
Get the column with the name
|
List<TableColumn> |
getColumns()
Get the columns
|
static GeoPackageDataType |
getDataType(String type)
Get the data type from the type value
|
static Object |
getDefaultValue(String defaultValue,
GeoPackageDataType type)
Get the default object value for the string default value with the data
type
|
static Object |
getDefaultValue(String defaultValue,
String type)
Get the default object value for the string default value and type
|
TableColumn |
getPrimaryKey()
Get the single or first primary key if one exists
|
List<TableColumn> |
getPrimaryKeys()
Get the primary key columns
|
String |
getTableName()
Get the table name
|
boolean |
hasColumn(String name)
Check if the table has the column
|
boolean |
hasPrimaryKey()
Check if the table has one or more primary keys
|
static TableInfo |
info(GeoPackageCoreConnection db,
String tableName)
Query for the table_info of the table name
|
int |
numColumns()
Number of columns
|
public static final String CID
public static final int CID_INDEX
public static final String NAME
public static final int NAME_INDEX
public static final String TYPE
public static final int TYPE_INDEX
public static final String NOT_NULL
public static final int NOT_NULL_INDEX
public static final String DFLT_VALUE
public static final int DFLT_VALUE_INDEX
public static final String PK
public static final int PK_INDEX
public static final String DEFAULT_NULL
public String getTableName()
public int numColumns()
public List<TableColumn> getColumns()
public TableColumn getColumn(int index)
index - column indexpublic boolean hasColumn(String name)
name - column namepublic TableColumn getColumn(String name)
name - column namepublic boolean hasPrimaryKey()
public List<TableColumn> getPrimaryKeys()
public TableColumn getPrimaryKey()
public static TableInfo info(GeoPackageCoreConnection db, String tableName)
db - connectiontableName - table namepublic static GeoPackageDataType getDataType(String type)
type - type valuepublic static Object getDefaultValue(String defaultValue, String type)
defaultValue - default valuetype - typepublic static Object getDefaultValue(String defaultValue, GeoPackageDataType type)
defaultValue - default valuetype - data typeCopyright © 2019 National Geospatial-Intelligence Agency. All rights reserved.