ClickHouse / ClickHouse/clickhouse-java
[jdbc-v2] JDBC Escaping
- Vorherrschende Sprache
- Java
- Sterne
- 1.6k
- Forks
- 636
- Ø Merge
- 2 T. 23 Std.
- Gemergte PRs (30 T.)
- 29
Beschreibung
### Description
JDBC escaping allows to write portable (really not) SQL statements that can be run with different JDBC drivers to get same affect. For example, `{ts 2025-02-20}` should be interpreted by driver as native function like `toTimestamp()` and other drivers should do similar way.
Current JDBC implementation
- does escaping always but should be controlled by `com.clickhouse.jdbc.StatementImpl#setEscapeProcessing`
- should be true for both Statement and PreparedStatement with according tests
- lacks of documentation https://clickhouse.com/docs/integrations/language-clients/java/jdbc
- done after prepared statement is parsed but should before (to not confuse parser :-))
There is a good explanation of how JDBC escaping works https://jdbc.postgresql.org/documentation/escapes/.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.