-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add some kind of db driver concept (protocol-based) #10
Comments
I'm working on sqlite support and schema generation is indeed a bit different:
I also see that it doesn't support SET CONSTRAINTS ALL DEFERRED and array_agg (which someone mentioned in another issue about sql server) I also see that you've been working on better Postgres support, but you seem to have created another ns for that. What would you like to see ? Different namespaces for each database types (H2, postgres, sqlite etc.) Or some kind of protocol like the vendor adapter that you did for the constraints ? |
Honestly I created the branch because I only ever use postgresql, and just needed to be able to make that work well for a project I'm doing. I don't have the time to maintain a general SQL driver system, or to even design it. There are a number of issues that you'll run into:
Given all of those, it might actually be easier to just make different namespaces, refactor what code is actually reusable in all of them, extract the db specific stuff, and make the new nses. Of course, that refactoring needs to use all-new nses, so we don't make a breaking change to the lib. All the existing nses need to work as-is. So the refactored code would probably just be copied to a new place (if it needs to change, and referenced if not). |
Thanks for the pointers. I don't want to be too ambitious, so I'll just make it work for sqlite in a new ns first and then we'll see. |
Things like schema generation and such need to do different things based on the real database type. It would be nice to have a protocol-based driver that could be used to isolate these deps.
The text was updated successfully, but these errors were encountered: