def delete_records(self, timestamp):
"""Deletes records older than the given epoch timestamp."""
timestamp = psycopg2.TimestampFromTicks(timestamp)
template = 'delete from %s where record_timestamp < %s'
command = template % (self.table_name, timestamp)
with self.connection.cursor() as cursor:
cursor.execute(command)
self.connection.commit()
gprs_database.py 文件源码
python
阅读 28
收藏 0
点赞 0
评论 0
评论列表
文章目录