Skip to content
Myr

Merge pull request #2548 from morenoh149/patch-1

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fix docs, how to get db connection in pattern

authored by David Lord · committed by GitHub · parents d08d96a, 2d2c016 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/patterns/sqlite3.rst+1 added-1 removed
65 unmodified lines
6667Easy Querying68-------------6970Now in each request handling function you can access `g.db` to get the70Now in each request handling function you can access `get_db()` to get the71current open database connection. To simplify working with SQLite, a72row factory function is useful. It is executed for every result returned73from the database to convert the result. For instance, in order to get74dictionaries instead of tuples, this could be inserted into the ``get_db``
80 unmodified lines