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

access to the sqlite3* pointer inside class database #31

Closed
mutantdeveloper opened this issue Apr 8, 2016 · 6 comments
Closed

access to the sqlite3* pointer inside class database #31

mutantdeveloper opened this issue Apr 8, 2016 · 6 comments

Comments

@mutantdeveloper
Copy link

There are many sqlite3 features that are not supported by sqlite3pp::database. As a workaround, it would be nice if user can use the internal sqlite3* pointer.

Some useful features that are not supported;

  1. sqlite3_changes(): tell how many rows are changed.
  2. sqlite3_extended_errcode(): can be used to route errors based on more detailed classification.
@iwongu
Copy link
Owner

iwongu commented Apr 19, 2016

What if we add the useful methods in database class like enable_foreign_keys() or error_code() instead of exposing internal pointer?

@iwongu
Copy link
Owner

iwongu commented Apr 19, 2016

Added the methods. Let me know if you need more methods like these.

d755c07

@iwongu iwongu closed this as completed Apr 19, 2016
@mutantdeveloper
Copy link
Author

adding methods is always good. But there are many sqlite3 functions that I am afraid won't all be supported in sqlite3pp any time soon. Exposing internal pointer is not neat, but who uses it should be at his own risk.

@iwongu
Copy link
Owner

iwongu commented Apr 19, 2016

Do you have a list of functions in mind? I still prefer hiding the internal pointer in private.

@mutantdeveloper
Copy link
Author

For now, I think changes() and extended_error_code() will be helpful

@iwongu
Copy link
Owner

iwongu commented Apr 19, 2016

As I wrote, they are already added in d755c07
Git-pull to see them.

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