Skip to content

Conversation

@trueqbit
Copy link
Collaborator

  • Introduced a connection control struct as an aggregate of options. This opens the way for various options and modes to establish a database connection, and can be used to make certain assumption in a multi-threading environment. E.g. make_storage("", connection_control{.open_forever = true});. Also see PR #1392 : Add support for SQLite VFS and open mode flags #1393.
  • An 'on open' callback can now be specified in a declarative way to the make_storage() call. This finally solves the issue that in-memory databases didn't call the 'on open' callback. E.g. make_storage("", on_open([](sqlite3* db) {}));.
  • Reordered members of the connection holder. This will be important for upcoming multi-threading improvements (see PR Threadsafe connection #1395), avoiding false L1 cache sharing.

* Introduced a connection control struct as an aggregate of options. This opens the way for various options and modes to establish a database connection.
* An 'on open' callback can now be specified in a declarative way to the `make_storage()` call. This finally solves the issue that in-memory databases didn't call the 'on open' callback.
* Reordered members of the connection holder. This will be important for upcoming multi-threading improvements, avoiding false L1 cache sharing.
@trueqbit trueqbit requested a review from fnc12 February 16, 2025 13:46
@trueqbit trueqbit linked an issue Feb 16, 2025 that may be closed by this pull request
Older compilers such as Visual C++ 16.11 [msvc 1929] choke on deeply nested alias template expressions and can be made happy by unraveling these expressions.
@trueqbit trueqbit requested a review from fnc12 February 18, 2025 16:57
@trueqbit trueqbit merged commit 6249684 into dev Feb 19, 2025
3 checks passed
@trueqbit trueqbit deleted the connection_control branch February 19, 2025 09:38
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.

on_open is never called for in memory storage

3 participants