Class OracleSchemaUtils
- java.lang.Object
-
- org.apache.flink.cdc.connectors.oracle.utils.OracleSchemaUtils
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static io.debezium.jdbc.JdbcConnectioncreateOracleConnection(OracleSourceConfig sourceConfig)static SchemagetSchema(io.debezium.jdbc.JdbcConnection jdbcConnection, io.debezium.relational.TableId tableId)static List<String>getTablePks(io.debezium.jdbc.JdbcConnection jdbc, io.debezium.relational.TableId tableId)static SchemagetTableSchema(TableId tableId, OracleSourceConfig sourceConfig)static List<String>listDatabases(io.debezium.jdbc.JdbcConnection jdbc)static List<String>listDatabases(OracleSourceConfig sourceConfig)static List<TableId>listTables(io.debezium.jdbc.JdbcConnection jdbc, String schemaName)static List<TableId>listTables(OracleSourceConfig sourceConfig, String dbName)static StringremoveQuotes(String text)Removes leading and trailing double quote characters from the provided string.static ColumntoColumn(io.debezium.relational.Column column)static io.debezium.relational.TableIdtoDbzTableId(TableId tableId)static SchematoSchema(io.debezium.relational.Table table)
-
-
-
Method Detail
-
removeQuotes
public static String removeQuotes(String text)
Removes leading and trailing double quote characters from the provided string.Oracle table and column names are inherently stored in upper-case; however, if the objects are created using double-quotes, the case of the object name is retained. This method will adhere to those rules and will always return the name in upper-case unless the provided name is double-quoted in which the returned value will have the double-quotes removed and case retained.
- Parameters:
text- value to have double quotes removed- Returns:
- string that has had quotes removed
-
listTables
public static List<TableId> listTables(OracleSourceConfig sourceConfig, @Nullable String dbName)
-
listDatabases
public static List<String> listDatabases(OracleSourceConfig sourceConfig)
-
listDatabases
public static List<String> listDatabases(io.debezium.jdbc.JdbcConnection jdbc) throws SQLException
- Throws:
SQLException
-
listTables
public static List<TableId> listTables(io.debezium.jdbc.JdbcConnection jdbc, String schemaName) throws SQLException
- Throws:
SQLException
-
getTableSchema
public static Schema getTableSchema(TableId tableId, OracleSourceConfig sourceConfig)
-
toSchema
public static Schema toSchema(io.debezium.relational.Table table)
-
toColumn
public static Column toColumn(io.debezium.relational.Column column)
-
toDbzTableId
public static io.debezium.relational.TableId toDbzTableId(TableId tableId)
-
getSchema
public static Schema getSchema(io.debezium.jdbc.JdbcConnection jdbcConnection, io.debezium.relational.TableId tableId)
-
getTablePks
public static List<String> getTablePks(io.debezium.jdbc.JdbcConnection jdbc, io.debezium.relational.TableId tableId)
-
createOracleConnection
public static io.debezium.jdbc.JdbcConnection createOracleConnection(OracleSourceConfig sourceConfig)
-
-