Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
python
/
cpython3
/
b942d28bf5b62e1823b91a7b3986e120ec9763bc
/
.
/
Doc
/
lib
/
sqlite3
/
parse_colnames.py
blob: fcded00f3c29560f5310d20e4956192bc3f612ee [
file
] [
log
] [
blame
]
import
sqlite3
import
datetime
con
=
sqlite3
.
connect
(
":memory:"
,
detect_types
=
sqlite3
.
PARSE_COLNAMES
)
cur
=
con
.
cursor
()
cur
.
execute
(
'select ? as "x [timestamp]"'
,
(
datetime
.
datetime
.
now
(),))
dt
=
cur
.
fetchone
()[
0
]
print
dt
,
type
(
dt
)