⚲
Project
General
Profile
Sign in
Home
Projects
Help
Search
:
SIP SIMPLE Client SDK
All Projects
SIP SIMPLE Client SDK
Overview
Activity
News
Wiki
Download (472 Bytes)
DesignHistory
» querydb.py
Script for querying a SQLite with FTS3 database -
Adrian Georgescu
, 08/29/2010 01:33 PM
#!/usr/bin/python2.6
import
os
import
re
import
sqlite3
from
datetime
import
datetime
conn
=
sqlite3
.
connect
(
'data.db'
)
cursor
=
conn
.
cursor
()
start
=
datetime
.
now
()
cursor
.
execute
(
'SELECT rowid, * FROM sip_trace WHERE packet MATCH "4a14e48dbc421d5b3521d1247fdb41871248e96f"'
)
data
=
[]
while
True
:
rows
=
cursor
.
fetchmany
()
if
not
rows
:
break
for
row
in
rows
:
data
.
append
(
row
)
end
=
datetime
.
now
()
print
len
(
data
),
(
end
-
start
)
conn
.
close
()
« Previous
1
2
3
4
Next »
(2-2/4)
Loading...