Mercurial > hg > monetdb-java
comparison src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java @ 338:98018e38994b
Correct getNumericFunctions() which incorrectly returned functions 'code' and 'space' as numeric functions.
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Wed, 25 Sep 2019 19:16:07 +0200 (2019-09-25) |
parents | e8962bdaa206 |
children | 54137aeb1f92 |
comparison
equal
deleted
inserted
replaced
337:55735963f605 | 338:98018e38994b |
---|---|
403 | 403 |
404 @Override | 404 @Override |
405 public String getNumericFunctions() { | 405 public String getNumericFunctions() { |
406 final String match = | 406 final String match = |
407 "('tinyint','smallint','int','bigint','hugeint','decimal','double','real'))" + | 407 "('tinyint','smallint','int','bigint','hugeint','decimal','double','real'))" + |
408 " AND \"type\" = 1" + // only scalar functions, note that code(int) and space(int) will also be listed as string functions | 408 " AND \"type\" = 1" + // only scalar functions |
409 // exclude functions which do not work | 409 // exclude functions which do not work or belong to string functions (code(int) and space(int)) |
410 " AND f.\"name\" NOT IN ('not_uniques','rotate_xor_hash'))" + | 410 " AND f.\"name\" NOT IN ('code','not_uniques','rotate_xor_hash','space'))" + |
411 // include specific functions which have no 1st arg (pi()) or it is not numeric | 411 // include specific functions which have no 1st arg (pi()) or it is not numeric |
412 " OR f.\"name\" IN ('alpha','degrees','fuse','ms_round','ms_str','ms_trunc','pi','radians')"; | 412 " OR f.\"name\" IN ('alpha','degrees','fuse','ms_round','ms_str','ms_trunc','pi','radians')"; |
413 return getConcatenatedStringFromQuery(FunctionsSelect + FunctionsWhere + match + OrFunctionsMaxMin + FunctionsOrderBy1); | 413 return getConcatenatedStringFromQuery(FunctionsSelect + FunctionsWhere + match + OrFunctionsMaxMin + FunctionsOrderBy1); |
414 } | 414 } |
415 | 415 |