“A modern database interface for C++"
summary
A standards‑grade C++ database interface and a header‑only reference implementation live on GitHub, with working drivers for MySQL and SQLite and a growing test suite; it exposes row sets and polymorphic interface modes, uses shared_ptr reference types and policy templates, and supports connection pooling, type conversion, input/output binding and optional future ranges/variants support. A measured example shows array output binding cutting a 1,000‑row fetch from 203 ms to ~32 ms (100 rows) and down to single‑millisecond/microsecond ranges, and a polymorphic varargs path bloats compile output (tens of thousands of instantiations) requiring further work.
AI-written summary · about
chapters (47)
- 0:00WHY DO WE CARE
- 1:46PREVIOUS PROPOSAL WORK
- 2:00THE RELATIONAL MODEL
- 2:58THE CLIENT STACK
- 7:00COMPOSABLE
- 8:07DIRECT VS POLY
- 8:40THE TYPES
- 10:27DUAL METHOD STYLES
- 11:15FLEXIBLE
- 12:43WHY REFERENCE TYPES?
- 13:56DATABASE
- 15:14CONNECTION STRING
- 16:43TRANSACTIONS & SCOPE EXIT
- 17:28STATEMENT
- 19:09APPROACHES TO ROWSET TRAVERSAL / ACCESS
- 19:41ITERATORS!
- 20:07RANGE BASED FOR
- 21:58ITERATOR OVERHEAD
- 22:45STD LIBRARY ALGORITHM EXAMPLE 1
- 23:55ITERATOR ISSUES
- 24:39RANGES!
- 25:26RANGE SUPPORT
- 26:40RANGE OPTIMIZATIONS
- 27:40RANGES: PASS RANGE INSTEAD OF PAIR
- 28:16RANGE ADAPTORS
- 31:58FIELD ACCESSORS
- 32:48MORE EFFICIENT ROW FIELD INDEXING
- 34:34ROW LEVEL into
- 35:20INTO RANGE
- 35:47SERIALIZATION
- 36:48HANDLE ACCESSORS
- 38:17ARRAY OUTPUT BINDING
- 40:42CONTIGUOUS ARRAY BINDING
- 41:24DETACHED ROWSETS
- 43:12ARRAY INPUT BINDING
- 43:52TYPE CONVERSION
- 44:23POLICIES
- 45:05UTILITY EXAMPLE: JOIN
- 47:32JOIN ALGORITHMS
- 48:05POLYMORPHIC INTERFACE
- 49:01POLY: ADDING DRIVERS
- 49:20REFERENCE IMPLEMENTATION TEST SUITE
- 49:50IMPLEMENTATION DETAILS
- 50:42DRIVER INTERFACE
- 54:58NON-BLOCKING INTERFACE
- 55:56REFERENCE IMPLEMENTATION ROADMAP
- 56:50QUESTIONS
related talks
01h 03mPersisting C++ Classes in Relational Databases with ODB
49mC++20 ❤ SQL
55mIn-memory database with indices from scratch
05mSimple RPC Server for Database Access
17mFast database interfacing with MySQL.jl
36mCompile-time reflection, Serialization and ORM
45mdatabase/sql: the bad, the good and the ugly — developing a driver for YDB
30mShared Database Concurrency
