source:
python/trunk/Doc/includes/sqlite3/parse_colnames.py
Last change on this file was 2, checked in by , 15 years ago | |
---|---|
|
|
File size: 235 bytes |
Line | |
---|---|
1 | import sqlite3 |
2 | import datetime |
3 | |
4 | con = sqlite3.connect(":memory:", detect_types=sqlite3.PARSE_COLNAMES) |
5 | cur = con.cursor() |
6 | cur.execute('select ? as "x [timestamp]"', (datetime.datetime.now(),)) |
7 | dt = cur.fetchone()[0] |
8 | print dt, type(dt) |
Note:
See TracBrowser
for help on using the repository browser.