Class MySqlCatalog
- java.lang.Object
-
- org.apache.flink.table.catalog.AbstractCatalog
-
- org.apache.flink.connector.jdbc.catalog.AbstractJdbcCatalog
-
- org.apache.flink.connector.jdbc.databases.mysql.catalog.MySqlCatalog
-
- All Implemented Interfaces:
org.apache.flink.table.catalog.Catalog
@Internal public class MySqlCatalog extends AbstractJdbcCatalog
Catalog for MySQL.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.connector.jdbc.catalog.AbstractJdbcCatalog
baseUrl, defaultUrl, pwd, userClassLoader, username
-
-
Constructor Summary
Constructors Constructor Description MySqlCatalog(ClassLoader userClassLoader, String catalogName, String defaultDatabase, String username, String pwd, String baseUrl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.flink.table.types.DataTypefromJDBCType(org.apache.flink.table.catalog.ObjectPath tablePath, ResultSetMetaData metadata, int colIndex)Converts MySQL type to FlinkDataType.protected StringgetSchemaName(org.apache.flink.table.catalog.ObjectPath tablePath)protected StringgetSchemaTableName(org.apache.flink.table.catalog.ObjectPath tablePath)protected StringgetTableName(org.apache.flink.table.catalog.ObjectPath tablePath)List<String>listDatabases()List<String>listTables(String databaseName)booleantableExists(org.apache.flink.table.catalog.ObjectPath tablePath)-
Methods inherited from class org.apache.flink.connector.jdbc.catalog.AbstractJdbcCatalog
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
-
Methods inherited from class org.apache.flink.table.catalog.AbstractCatalog
getDefaultDatabase, getName
-
-
-
-
Method Detail
-
listDatabases
public List<String> listDatabases() throws org.apache.flink.table.catalog.exceptions.CatalogException
- Throws:
org.apache.flink.table.catalog.exceptions.CatalogException
-
listTables
public List<String> listTables(String databaseName) throws org.apache.flink.table.catalog.exceptions.DatabaseNotExistException, org.apache.flink.table.catalog.exceptions.CatalogException
- Throws:
org.apache.flink.table.catalog.exceptions.DatabaseNotExistExceptionorg.apache.flink.table.catalog.exceptions.CatalogException
-
tableExists
public boolean tableExists(org.apache.flink.table.catalog.ObjectPath tablePath) throws org.apache.flink.table.catalog.exceptions.CatalogException- Throws:
org.apache.flink.table.catalog.exceptions.CatalogException
-
fromJDBCType
protected org.apache.flink.table.types.DataType fromJDBCType(org.apache.flink.table.catalog.ObjectPath tablePath, ResultSetMetaData metadata, int colIndex) throws SQLExceptionConverts MySQL type to FlinkDataType.- Overrides:
fromJDBCTypein classAbstractJdbcCatalog- Throws:
SQLException
-
getTableName
protected String getTableName(org.apache.flink.table.catalog.ObjectPath tablePath)
- Overrides:
getTableNamein classAbstractJdbcCatalog
-
getSchemaName
protected String getSchemaName(org.apache.flink.table.catalog.ObjectPath tablePath)
- Overrides:
getSchemaNamein classAbstractJdbcCatalog
-
getSchemaTableName
protected String getSchemaTableName(org.apache.flink.table.catalog.ObjectPath tablePath)
- Overrides:
getSchemaTableNamein classAbstractJdbcCatalog
-
-