Skip to content
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

Implementing database driver #72

Open
lierdakil opened this issue Aug 26, 2017 · 1 comment
Open

Implementing database driver #72

lierdakil opened this issue Aug 26, 2017 · 1 comment

Comments

@lierdakil
Copy link

Sorry if it's a wrong place to ask this kind of question, but I figured I could just as well ask directly.

So I have an HDBC driver to Microsoft SQL Server (based heavily on https://github.com/denisenkom/hsmssql, but with a few changes), which works well enough for my current needs. Now I want to bind groundhog to it, because using raw SQL isn't much fun at all. The question is, where do I begin? Database.Groundhog.Generic seems relevant, but at first glance it's unclear how exactly.

Looking at existing drivers, it would seem I need to define a few instances, like PersistBackendConn, DbDescriptor, etc, but there seems to be quite a lot of those, and it's not clear if all of those are mandatory, or only some.

Any pointers are appreciated.

@lykahb
Copy link
Owner

lykahb commented Aug 27, 2017

It would be great to have a new driver. From a high-level perspective, a driver consists of a connection datatype, connection functions, and the instances. SchemaAnalyzer and migrations are not mandatory. For a basic driver you would need DbDescriptor, SqlDb, and PersistBackendConn implementations. They are similar across the databases and address the syntactical differences.

Copying a bunch of code from an existing driver, such as MySQL and replacing the low-level binding calls with hsmssql ones would be a good starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants