Class TableSchema
java.lang.Object
com.clickhouse.client.api.metadata.TableSchema
-
Constructor Summary
ConstructorsConstructorDescriptionTableSchema(String tableName, String query, String databaseName, Collection<ClickHouseColumn> columns) TableSchema(Collection<ClickHouseColumn> columns) -
Method Summary
Modifier and TypeMethodDescriptioncolumnIndexToName(int index) Takes absolute index (starting from 1) and return corresponding column.getColumnByIndex(int colIndex) Returns column by index.getColumnByName(String name) Returns unmodifiable collection of columns.getQuery()booleanindexToName(int index) Takes absolute index (starting from 0) and returns corresponding column.intnameToColumnIndex(String name) intnameToIndex(String name) toString()
-
Constructor Details
-
TableSchema
-
TableSchema
public TableSchema(String tableName, String query, String databaseName, Collection<ClickHouseColumn> columns)
-
-
Method Details
-
getColumns
Returns unmodifiable collection of columns.- Returns:
- - collection of columns in the table
-
getDatabaseName
-
getTableName
-
hasDefaults
public boolean hasDefaults() -
getQuery
-
getColumnByName
-
getColumnByIndex
Returns column by index. Index starts with 1.- Parameters:
colIndex- - column index;- Returns:
-
indexToName
Takes absolute index (starting from 0) and returns corresponding column.- Parameters:
index- - column index starting from 0- Returns:
- - column name
-
columnIndexToName
Takes absolute index (starting from 1) and return corresponding column. Equals toindexToName(index - 1.- Parameters:
index- - column index starting from 1- Returns:
- - column name.
-
nameToColumnIndex
-
nameToIndex
-
toString
-