Mercurial > hg > monetdb-java
comparison src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java @ 186:4767b005a531
Making variables private where possible.
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Thu, 12 Oct 2017 18:33:54 +0200 (2017-10-12) |
parents | 4959b85b981c |
children | 1296dbcc4958 |
comparison
equal
deleted
inserted
replaced
185:91f2bab75b9b | 186:4767b005a531 |
---|---|
475 // for debug: System.out.println("SQL query: " + query + "\nResult string: " + sb.toString()); | 475 // for debug: System.out.println("SQL query: " + query + "\nResult string: " + sb.toString()); |
476 return sb.toString(); | 476 return sb.toString(); |
477 } | 477 } |
478 | 478 |
479 // SQL query parts shared by four get<Type>Functions() below | 479 // SQL query parts shared by four get<Type>Functions() below |
480 private final static String FunctionsSelect = "SELECT DISTINCT \"name\" FROM \"sys\".\"functions\" "; | 480 private static final String FunctionsSelect = "SELECT DISTINCT \"name\" FROM \"sys\".\"functions\" "; |
481 private final static String FunctionsWhere = "WHERE \"id\" IN (SELECT \"func_id\" FROM \"sys\".\"args\" WHERE \"number\" = 1 AND \"name\" = 'arg_1' AND \"type\" IN "; | 481 private static final String FunctionsWhere = "WHERE \"id\" IN (SELECT \"func_id\" FROM \"sys\".\"args\" WHERE \"number\" = 1 AND \"name\" = 'arg_1' AND \"type\" IN "; |
482 // Scalar functions sql_max(x, y) and sql_min(x, y) are defined in sys.args only for type 'any'. | 482 // Scalar functions sql_max(x, y) and sql_min(x, y) are defined in sys.args only for type 'any'. |
483 // Easiest way to include them in the Num, Str and TimeDate lists is to add them explicitly via UNION SQL: | 483 // Easiest way to include them in the Num, Str and TimeDate lists is to add them explicitly via UNION SQL: |
484 private final static String AddFunctionsMaxMin = " UNION SELECT 'sql_max' UNION SELECT 'sql_min'"; | 484 private static final String AddFunctionsMaxMin = " UNION SELECT 'sql_max' UNION SELECT 'sql_min'"; |
485 private final static String FunctionsOrderBy1 = " ORDER BY 1"; | 485 private static final String FunctionsOrderBy1 = " ORDER BY 1"; |
486 | 486 |
487 @Override | 487 @Override |
488 public String getNumericFunctions() { | 488 public String getNumericFunctions() { |
489 String match = | 489 String match = |
490 "('tinyint', 'smallint', 'int', 'bigint', 'hugeint', 'decimal', 'double', 'real') )" + | 490 "('tinyint', 'smallint', 'int', 'bigint', 'hugeint', 'decimal', 'double', 'real') )" + |
2617 | 2617 |
2618 return executeMetaDataQuery(query.toString()); | 2618 return executeMetaDataQuery(query.toString()); |
2619 } | 2619 } |
2620 | 2620 |
2621 | 2621 |
2622 private final static String keyQuery = | 2622 private static final String keyQuery = |
2623 "SELECT cast(null AS varchar(1)) AS \"PKTABLE_CAT\", " + | 2623 "SELECT cast(null AS varchar(1)) AS \"PKTABLE_CAT\", " + |
2624 "\"pkschema\".\"name\" AS \"PKTABLE_SCHEM\", " + | 2624 "\"pkschema\".\"name\" AS \"PKTABLE_SCHEM\", " + |
2625 "\"pktable\".\"name\" AS \"PKTABLE_NAME\", " + | 2625 "\"pktable\".\"name\" AS \"PKTABLE_NAME\", " + |
2626 "\"pkkeycol\".\"name\" AS \"PKCOLUMN_NAME\", " + | 2626 "\"pkkeycol\".\"name\" AS \"PKCOLUMN_NAME\", " + |
2627 "cast(null AS varchar(1)) AS \"FKTABLE_CAT\", " + | 2627 "cast(null AS varchar(1)) AS \"FKTABLE_CAT\", " + |