forked from orbit-oss/flask
Merge pull request #625 from soulseekah/master
Use sqlite3.Row factory in Flaskr (#588)
This commit is contained in:
commit
3fdcefbcda
2 changed files with 9 additions and 2 deletions
|
|
@ -76,6 +76,10 @@ dictionaries instead of tuples this can be used::
|
|||
|
||||
db.row_factory = make_dicts
|
||||
|
||||
Or even simpler::
|
||||
|
||||
db.row_factory = sqlite3.Row
|
||||
|
||||
Additionally it is a good idea to provide a query function that combines
|
||||
getting the cursor, executing and fetching the results::
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue