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.
* Clarify instructions about changing row_factory
When I was working through the tutorial, this was very confusing to me; so, I've added the code and clarification that would have helped me get through it faster.
* Clarify the nature of Row objects
* Rewrite code example for further clarity.
app.open_resource needs to get called with the correct mode param (python3
will read bytes [not str] if the wrong mode is used), add mode param docs.
rv.data is bytes, fix the data type we compare it with to be also bytes
As pointed out in issue #588 sqlite3.Row should be used instead of
using casting to dict(). Also altered the "Easy Querying" Patterns
example to include the more correct way to return rows as dicts.
Did not touch Tutorial examples ("Views"), as these are not up to
date with the current Flaskr code, and the "Show Entries" section
points out the "Easy Querying" section on how to convert to a
dict().