private String catalogCond ( String columnName , String catalog ) { if ( catalog == null ) { /* Treat null catalog as current */ if ( connection . nullCatalogMeansCurrent ) { return "(ISNULL(database()) OR (" + columnName + " = database()))" ; } return "(1 = 1)" ; } if ( catalog . isEmpty ( ) ) { return "(ISNULL(database()) OR (" + columnName + " = database()))" ; } return "(" + columnName + " = " + escapeQuote ( catalog ) + ")" ; }
Generate part of the information schema query that restricts catalog names In the driver catalogs is the equivalent to MariaDB schemas .