rewrite SQLite in-memory database docs for concurrency
Rewrote the "Using a Memory Database in Multiple Threads" section
in the pysqlite dialect docs to lead with the fundamental constraint
that a :memory: database is scoped to a single connection, and is
not suitable for concurrent use without shared cache or full
serialization.
Added a new "Using a Shared-Cache Memory Database" subsection
recommending the file::memory:?cache=shared&uri=true URI approach,
which gives each checkout its own DBAPI connection with independent
transaction state while sharing one in-memory database. Documented
process-global scoping and named databases for isolation.
Demoted the StaticPool approach to a secondary subsection with a
prominent warning about its single-connection limitation and silent
data loss under concurrent sessions.
Added a corresponding "Using a Memory Database with Multiple
Coroutines" section to the aiosqlite dialect docs, cross-referencing
the pysqlite shared-cache documentation.
References: #13428, #6987
Change-Id: Ic07c5a2a564e8eca19e596267f61051a2aaa0258
(cherry picked from commit
702a7f11dd8a9d3dae30048aa3d2fc0197330d88)