From 2d2c0169d47a5345dada2c96b4a445c570f7c112 Mon Sep 17 00:00:00 2001 From: Harry Moreno Date: Fri, 8 Dec 2017 15:18:02 -0500 Subject: [PATCH] Fix docs, how to get db connection in pattern The docs are inaccurately suggestion a db connection would be available at `g.db`, after calling `get_db()` a connection will be available at `g._database` but even then I think instructing the user to use `get_db()` is the best way forward. --- docs/patterns/sqlite3.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/patterns/sqlite3.rst b/docs/patterns/sqlite3.rst index 15f38ea7..eecaaae8 100644 --- a/docs/patterns/sqlite3.rst +++ b/docs/patterns/sqlite3.rst @@ -67,7 +67,7 @@ the application context by hand:: Easy Querying ------------- -Now in each request handling function you can access `g.db` to get the +Now in each request handling function you can access `get_db()` to get the current open database connection. To simplify working with SQLite, a row factory function is useful. It is executed for every result returned from the database to convert the result. For instance, in order to get