Closed fradav closed 7 years ago
Check https://github.com/iwongu/sqlite3pp/commit/2285e1ba3e6437ed382a0945e39d6b0b34820e1e out. You can use like the following code.
// sqlite3* pdb;
sqlite3pp::database db(sqlite3pp::ext::borrow(pdb);
I'm trying to keep the construction using sqlite* from the basic sqlite3pp.h. In most cases, you might need sqlite3ppext.h to use function or aggregate to build extensions anyway.
It's a start but I need to if-elsify the import of sqlite3.h in order to compile the extension, see my PR.
https://github.com/iwongu/sqlite3pp/pull/46 is merged into master branch to support loadable extension. Thanks for great feature suggestion!
this is required by the loadext doc: see there When we load an extension, the database handler is already there before we can call any
sqlite3pp::database
constructor, hence the assignement overload withsqlite3*
.There is still some boilerplate to manage to make the extension loadable: