Skip to content

Commit

Permalink
[#12291] Reference to database and/or server name in
Browse files Browse the repository at this point in the history
'master.sys.schemas' is not supported in this version of SQL Server.

Including:

- Added Azure SQL connection strings
- Added test script to JDBC
  • Loading branch information
lukaseder committed Aug 12, 2021
1 parent 1e17b3b commit d9c5ebc
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions jOOQ/src/main/java/org/jooq/impl/MetaImpl.java
Expand Up @@ -39,6 +39,7 @@

import static java.lang.Boolean.FALSE;
import static java.lang.Boolean.TRUE;
import static java.util.Arrays.asList;
// ...
// ...
// ...
Expand Down Expand Up @@ -114,7 +115,6 @@
import org.jooq.TableOptions.TableType;
import org.jooq.UniqueKey;
import org.jooq.conf.ParseUnknownFunctions;
import org.jooq.conf.SettingsTools;
import org.jooq.exception.DataAccessException;
import org.jooq.exception.DataDefinitionException;
import org.jooq.exception.DataTypeException;
Expand Down Expand Up @@ -281,18 +281,31 @@ public final List<Schema> getSchemas() {


if (!inverseSchemaCatalog) {
Result<Record> schemas = meta(meta -> dsl().fetch(
Result<Record> schemas = meta(meta -> {




















meta.getSchemas(),

// [#2681] Work around a flaw in the MySQL JDBC driver
SQLDataType.VARCHAR // TABLE_SCHEM
));
return dsl().fetch(meta.getSchemas(), VARCHAR); // TABLE_SCHEM
});

for (String name : schemas.getValues(0, String.class))
result.add(new MetaSchema(name, MetaCatalog.this));
Expand Down

0 comments on commit d9c5ebc

Please sign in to comment.