Home | History | Annotate | Download | only in sqlite3
      1 import sqlite3
      2 
      3 con = sqlite3.connect(":memory:")
      4 con.row_factory = sqlite3.Row
      5 
      6 cur = con.cursor()
      7 cur.execute("select 'John' as name, 42 as age")
      8 for row in cur:
      9     assert row[0] == row["name"]
     10     assert row["name"] == row["nAmE"]
     11     assert row[1] == row["age"]
     12     assert row[1] == row["AgE"]
     13