String catalogCond(String columnName,String catalog){
  if (catalog == null && connection.nullCatalogMeansCurrent) {
    catalog="";
  }
  if (catalog == null) {
    return "(1 = 1)";
  }
  if (catalog.equals("")) {
    return "(ISNULL(database()) OR (" + columnName + " = database()))";
  }
  return "(" + columnName + " = "+ escapeQuote(catalog)+ ")";
}

String catalogCond ( String columnName , String catalog ) { if ( catalog == null && connection . nullCatalogMeansCurrent ) { catalog = "" ; } if ( catalog == null ) { return "(1 = 1)" ; } if ( catalog . equals ( "" ) ) { 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 mysql schemas .
