source: python/trunk/Doc/includes/sqlite3/parse_colnames.py

Last change on this file was 2, checked in by Yuri Dario, 15 years ago

Initial import for vendor code.

  • Property svn:eol-style set to native
File size: 235 bytes
Line 
1import sqlite3
2import datetime
3
4con = sqlite3.connect(":memory:", detect_types=sqlite3.PARSE_COLNAMES)
5cur = con.cursor()
6cur.execute('select ? as "x [timestamp]"', (datetime.datetime.now(),))
7dt = cur.fetchone()[0]
8print dt, type(dt)
Note: See TracBrowser for help on using the repository browser.