-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Abstract database interface and sqlite implementation #3541
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
Conversation
|
Seems like the pybind smart_holder feature is only available in 3.0.0. I cannot make the python bindings work without it though. @sarlinpe FYI |
…h/database-interface
…h/database-interface
paulinus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. It is large, i hope i did not miss errors, but i imagine most would already be caught by the compiler since a lot of it was variable to pointer changes.
On the wrapper side, is it the case that you finally did not need to use py::trampoline_self_life_support because the Database objects are returned using shared pointers rather than unique pointers? I'm not familiar enough with wrapping abstract classes to understand if it is needed.
Yes, without the trampoline support (introduced by Pybind11 3.X), this was not easily possible. |
Introduces an abstract interface for the database, so we can support different implementations (e.g., Postgres/MySQL, key-value stores, etc.). New implementations can be registered statically.