Pass strings by value for new and update, and std::move them:
need for rvalue reference overload of Writable::update_string
plain reference version must be kept as well
using blobs or vectors of int8 can be a high-performance alternative
so for the moment, it is not worth the added complexity
allow reading dropped fields in custom functions that are invoked before the
drop. Store data in a column vector, and clear the vector at the time of the
drop. Make sure field id is not reused. (make access function private, and
custom functions are friends)
check that vector range is OK in constructor of vector update
modularize code generation
Each module should have:
required include files
data structure for storing data
additional hidden table fields?
triggers (after/before insert/update/delete)
public methods
Possible to modularize:
indexes
sort functions
referential integrity
safety checks
incrementally updated group-by queries
use std::set and std::multiset for indexes? Might be better for strings.
Table options:
single_row: compiled to a simple struct, with simpler getters.
no_delete: allows more efficient indexing (+smaller code)
last N (for web access log) (last 0 = none)
Allow the user to write custom event-processing functions and store
information in custom data structures (for instance: collect statistics from
web access log without storing whole log in RAM).
better support for readonly connection (and client): separate types?
Pull-only connection (eg when serving a read-only file):
-> joedb_client does not offer transaction and push
-> reply with readonly flag during server handshake
-> bool is_pullonly() const in connection (and client)
joedb_server:
fuzzer
use coroutines
support running on multiple threads (requires mutex?)
OK to keep one thread busy when waiting for a lock, or computing SHA 256, …
thread_count = max(core_count, 2 * server_count)
Requires synchronization. Mutex for global stuff (connection, disconnection, interrupt, …)