@Internal public class MySqlCatalog extends AbstractJdbcCatalog
baseUrl, defaultUrl, pwd, userClassLoader, username
Constructor and Description |
---|
MySqlCatalog(ClassLoader userClassLoader,
String catalogName,
String defaultDatabase,
String username,
String pwd,
String baseUrl) |
Modifier and Type | Method and Description |
---|---|
protected DataType |
fromJDBCType(ObjectPath tablePath,
ResultSetMetaData metadata,
int colIndex)
Converts MySQL type to Flink
DataType . |
protected String |
getSchemaName(ObjectPath tablePath) |
protected String |
getSchemaTableName(ObjectPath tablePath) |
protected String |
getTableName(ObjectPath tablePath) |
List<String> |
listDatabases()
Get the names of all databases in this catalog.
|
List<String> |
listTables(String databaseName)
Get names of all tables and views under this database.
|
boolean |
tableExists(ObjectPath tablePath)
Check if a table or view exists in this catalog.
|
alterDatabase, alterFunction, alterPartition, alterPartitionColumnStatistics, alterPartitionStatistics, alterTable, alterTableColumnStatistics, alterTableStatistics, close, createDatabase, createFunction, createPartition, createTable, databaseExists, dropDatabase, dropFunction, dropPartition, dropTable, extractColumnValuesBySQL, functionExists, getBaseUrl, getDatabase, getFactory, getFunction, getPartition, getPartitionColumnStatistics, getPartitionStatistics, getPassword, getPrimaryKey, getTable, getTableColumnStatistics, getTableStatistics, getUsername, listFunctions, listPartitions, listPartitions, listPartitionsByFilter, listViews, open, partitionExists, renameTable
getDefaultDatabase, getName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bulkGetPartitionColumnStatistics, bulkGetPartitionStatistics, dropDatabase, getFunctionDefinitionFactory, getTableFactory, supportsManagedTable
public List<String> listDatabases() throws CatalogException
Catalog
CatalogException
- in case of any runtime exceptionpublic List<String> listTables(String databaseName) throws DatabaseNotExistException, CatalogException
Catalog
DatabaseNotExistException
- if the database does not existCatalogException
- in case of any runtime exceptionpublic boolean tableExists(ObjectPath tablePath) throws CatalogException
Catalog
tablePath
- Path of the table or viewCatalogException
- in case of any runtime exceptionprotected DataType fromJDBCType(ObjectPath tablePath, ResultSetMetaData metadata, int colIndex) throws SQLException
DataType
.fromJDBCType
in class AbstractJdbcCatalog
SQLException
protected String getTableName(ObjectPath tablePath)
getTableName
in class AbstractJdbcCatalog
protected String getSchemaName(ObjectPath tablePath)
getSchemaName
in class AbstractJdbcCatalog
protected String getSchemaTableName(ObjectPath tablePath)
getSchemaTableName
in class AbstractJdbcCatalog
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.