Skip to content

Commit

Permalink
Implement getImportedKeys with empty ResultSet
Browse files Browse the repository at this point in the history
  • Loading branch information
joechu1 authored and findepi committed Mar 15, 2022
1 parent 892523d commit 8095a02
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,23 @@ public ResultSet getPrimaryKeys(String catalog, String schema, String table)
public ResultSet getImportedKeys(String catalog, String schema, String table)
throws SQLException
{
throw new SQLFeatureNotSupportedException("imported keys not supported");
String query = "SELECT " +
" CAST(NULL AS varchar) PKTABLE_CAT, " +
" CAST(NULL AS varchar) PKTABLE_SCHEM, " +
" CAST(NULL AS varchar) PKTABLE_NAME, " +
" CAST(NULL AS varchar) PKCOLUMN_NAME, " +
" CAST(NULL AS varchar) FKTABLE_CAT, " +
" CAST(NULL AS varchar) FKTABLE_SCHEM, " +
" CAST(NULL AS varchar) FKTABLE_NAME, " +
" CAST(NULL AS varchar) FKCOLUMN_NAME, " +
" CAST(NULL AS smallint) KEY_SEQ, " +
" CAST(NULL AS smallint) UPDATE_RULE, " +
" CAST(NULL AS smallint) DELETE_RULE, " +
" CAST(NULL AS varchar) FK_NAME, " +
" CAST(NULL AS varchar) PK_NAME, " +
" CAST(NULL AS smallint) DEFERRABILITY " +
"WHERE false";
return select(query);
}

@Override
Expand Down

0 comments on commit 8095a02

Please sign in to comment.