Skip to content

Conversation

@ahojnnes
Copy link
Contributor

@ahojnnes ahojnnes commented Aug 6, 2025

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.

@ahojnnes
Copy link
Contributor Author

ahojnnes commented Aug 6, 2025

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

Copy link
Collaborator

@paulinus paulinus left a 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.

@ahojnnes
Copy link
Contributor Author

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.

@ahojnnes ahojnnes enabled auto-merge (squash) August 22, 2025 16:39
@ahojnnes ahojnnes merged commit f8edcca into main Aug 22, 2025
13 checks passed
@ahojnnes ahojnnes deleted the user/jsch/database-interface branch August 22, 2025 16:51
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

Successfully merging this pull request may close these issues.

3 participants