Mercurial > hg > monetdb-java
comparison src/main/java/org/monetdb/jdbc/MonetDriver.java.in @ 761:e1389c0ffb7c
A few more places where we can remove append() calls for static int values in construction of Strings.
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Thu, 29 Jun 2023 16:42:06 +0200 (22 months ago) |
parents | 3dd0d43014e8 |
children | a80c21fe7bb2 |
comparison
equal
deleted
inserted
replaced
760:f2f7039f93b1 | 761:e1389c0ffb7c |
---|---|
462 // first time, compose TypeMappping SQL string | 462 // first time, compose TypeMappping SQL string |
463 final StringBuilder val = new StringBuilder((typeMap.size() * (7 + 7 + 7 + 4)) + 14); | 463 final StringBuilder val = new StringBuilder((typeMap.size() * (7 + 7 + 7 + 4)) + 14); |
464 for (Entry<String, Integer> entry : typeMap.entrySet()) { | 464 for (Entry<String, Integer> entry : typeMap.entrySet()) { |
465 val.append(" WHEN '").append(entry.getKey()).append("' THEN ").append(entry.getValue().toString()); | 465 val.append(" WHEN '").append(entry.getKey()).append("' THEN ").append(entry.getValue().toString()); |
466 } | 466 } |
467 val.append(" ELSE ").append(Types.OTHER).append(" END"); | 467 val.append(" ELSE " + Types.OTHER + " END"); |
468 // as the typeMap is static, cache this SQL part for all next calls | 468 // as the typeMap is static, cache this SQL part for all next calls |
469 TypeMapppingSQL = val.toString(); | 469 TypeMapppingSQL = val.toString(); |
470 } | 470 } |
471 return "CASE " + column + TypeMapppingSQL; | 471 return "CASE " + column + TypeMapppingSQL; |
472 } | 472 } |