obsdb: Add func _get_positions()
This commit is contained in:
@@ -270,6 +270,14 @@ class ObservationDB(ObservationDBBase):
|
||||
""")
|
||||
return [t[0] for t in timestamps.fetchall()]
|
||||
|
||||
def _get_positions(self):
|
||||
"""Return a list of all rows in observation table."""
|
||||
cur = self.con.cursor()
|
||||
locations = cur.execute("""
|
||||
SELECT * FROM observations;
|
||||
""").fetchall()
|
||||
return [{k: loc[k] for k in loc.keys()} for loc in locations]
|
||||
|
||||
def remove(self, timestamp):
|
||||
"""Remove an observation and its associated wifi, cell and bt rows."""
|
||||
cur = self.con.cursor()
|
||||
|
Reference in New Issue
Block a user