-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PypikaRepository can't be extended to support other db types #104
Comments
Hi @zznty thanks for taking the time to fill up an issue and sorry for the delay answering. Why do you think adding support for Mysql and Postgres will require to create tons of conditions and unnecessary complication of code? The only reason of using Pypika was that is a query builder that does all the translations required for the different databases behind the scenes. |
I see what you mean, so far I've only tested that it works with SQLite. Once we implement the tests of the other databases, we'll see if the changes are big enough to justify the need of another repository. If you want to contribute this feature, I'd say that you first start tweaking the I'm closing this issue as I feel it's a duplicated of #1, specifically it's the discussion of it's implementation. If you want, we can continue the discussion there |
Description
Currently we have
PypikaRepository
supporting just SQLlite with promised support for other types (MySQL, PostgreSQL),but to add this support we will need to create dedicated repository classes such as
PostgreSqlRepository
, because combining everything into one class will result in tons of conditions and unnecessary complication of code.Possible Solutions
PypikaRepository
toSQLliteRepository
, but can result in code duplication for generic pypika operations.PypikaRepository
and createSQLliteRepository
with SQLlite-related codeThe text was updated successfully, but these errors were encountered: