Skip to content

Commit

Permalink
[Fix][Connector] Support some issues with oracle (#396)
Browse files Browse the repository at this point in the history
* [Update][Connector] Support with oracle regular expression checking

* [Update][Connector] Support fetching the primary key of oracle
  • Loading branch information
bluesecret authored May 7, 2024
1 parent 7439f40 commit 321dc0a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public ResultSet getMetadataTables(DatabaseMetaData metaData, String catalog, St
return metaData.getTables(null,schema.toUpperCase(), null, TABLE_TYPES);
}

@Override
protected ResultSet getPrimaryKeys(DatabaseMetaData metaData, String catalog, String schema, String tableName) throws SQLException {
return metaData.getPrimaryKeys(null, schema.toUpperCase(), tableName);
}

@Override
public ResultSet getMetadataDatabases(Connection connection) throws SQLException {
java.sql.Statement stmt = connection.createStatement();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public Map<String, String> getDialectKeyMap() {
super.getDialectKeyMap();
dialectKeyMap.put(STRING_TYPE, "VARCHAR2");
dialectKeyMap.put(LIMIT_TOP_50_KEY, " rownum <= 50");
dialectKeyMap.put(REGEX_KEY, "regexp_like(${column},'${regexp}')");
dialectKeyMap.put(NOT_REGEX_KEY, "not regexp_like(${column},'${regexp}')");
dialectKeyMap.put(IF_CASE_KEY, "case when ${column} is null then 'NULL' else ${column}||'' end ");
return dialectKeyMap;
}
Expand Down

0 comments on commit 321dc0a

Please sign in to comment.