ClickHouse / ClickHouse/clickhouse-java
[jdbc-v2] JDBC Escaping
- Lenguaje dominante
- Java
- Estrellas
- 1.6k
- Forks
- 636
- Merge medio
- 2 d 23 h
- PR fusionados (30 d)
- 29
Descripción
### 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/.
Guía de contribución
Línea de trabajo
Comienza con com.clickhouse.jdbc.StatementImpl#setEscapeProcessing y sigue cómo se aplica el escape en relación con el análisis de prepared statements. Revisa la explicación del escape de JDBC y la documentación de integración de JDBC; después, añade cobertura tanto para Statement como para PreparedStatement. Se considera terminado cuando el escape es configurable, está habilitado para ambos tipos de statement y está documentado.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- database
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 48/100