zio / zio-quill

Compile-time Language Integrated Queries for Scala
https://zio.dev/zio-quill
Apache License 2.0
2.15k stars 348 forks source link

Support a Generic JDBC Context #1272

Open deusaquilus opened 5 years ago

deusaquilus commented 5 years ago

Version: (e.g. 3.0.0-SNAPSHOT) Module: (e.g. quill-jdbc) Database: (e.g. any)

There are many big-data vendors that have a custom JDBC driver. Cloudera Impala, Apache Drill, Apache Phoenix, and Kylin to name a few. Some of them like MemSQL and Redshift use existing SQL Dialects (MySQL and Postgres respectively), others largely make their own. It would be great to have a GenericJdbcContext (and perhaps a GenericMonixJdbcContext) could be used together with any JDBC driver that could provide a datasource.

@getquill/maintainers

fwbrasil commented 5 years ago

The jdbc context is already generic. We just specialized it to fix the idiom and implement custom behaviors: https://github.com/getquill/quill/blob/master/quill-jdbc/src/main/scala/io/getquill/context/jdbc/JdbcContext.scala

deusaquilus commented 5 years ago

What I mean to say is, maybe we should allow instantiating it and add constructors.