def _get_epochs(self):
import sqlite3 as dbdrv
dbconn = dbdrv.connect(self._sqlite_file)
q = "SELECT min(ts) from ac"
cur = dbconn.cursor()
cur.execute(q)
dfirst_epoch = cur.fetchall()[0][0]
cur.close()
q = "SELECT max(ts) from ac"
cur = dbconn.cursor()
cur.execute(q)
dlast_epoch = cur.fetchall()[0][0]
cur.close()
return (dfirst_epoch, dlast_epoch)
评论列表
文章目录