I was looking at the implementation of
public NameSpaceTablesInformation getTables(Identifier catalog, Identifier
public TableInformation getTable(Identifier catalog, Identifier schema,
function and found a little bit of differences in the implementation part.
On looking at the comments, the way to go is:
// The table did not define an explicit namespace:
1) look in current namespace
2) look in default namespace
3) look in all namespaces - multiple hits is considered an error
I believe the same logic is also applied in getTables(Identifier catalog,
Identifier schema) function, except that the schemaFilter has been
initialized to "" instead of null.
Please refer to this piece of code
I checked the parameter definition of ResultSet getTables(String catalog,
String schemaPattern, String tableNamePattern, String types) throws
java.lang.String, java.lang.String, java.lang.String)
, which says
schemaPattern - a schema name pattern; must match the schema name as it is
stored in the database; "" retrieves those without a schema; null means
that the schema name should not be used to narrow the search
since the code checks for the condition that database support schemas, i
think it should be initialized to null instead of "".
Let me know your thoughts.
Someone asked me if I can supply the JSON Type as a separate module so that
it can be grabbed from Maven Central:
I wonder if we should supply a hibernate-extras where we include
- JSON Types
- ARRAY types
- Ipv4 Types
or any other features that cannot be added into the hibernate-core because
they are DB-specific.
Let me know what you think.