Fix select / delete trkpt timestamp query <=, >=.
This commit is contained in:
parent
bb0e544553
commit
85d32aff22
1 changed files with 2 additions and 2 deletions
|
@ -64,7 +64,7 @@ class Database(val trackbook: net.voussoir.trkpt.Trackbook)
|
||||||
{
|
{
|
||||||
Log.i("VOUSSOIR", "Track.delete ${device_id} ${start_time} -- ${end_time}.")
|
Log.i("VOUSSOIR", "Track.delete ${device_id} ${start_time} -- ${end_time}.")
|
||||||
this.begin_transaction()
|
this.begin_transaction()
|
||||||
this.connection.delete("trkpt", "device_id = ? AND time > ? AND time < ?", arrayOf(device_id, start_time.toString(), end_time.toString()))
|
this.connection.delete("trkpt", "device_id = ? AND time >= ? AND time <= ?", arrayOf(device_id, start_time.toString(), end_time.toString()))
|
||||||
this.commit()
|
this.commit()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ class Database(val trackbook: net.voussoir.trkpt.Trackbook)
|
||||||
{
|
{
|
||||||
Log.i("VOUSSOIR", "Track.trkpt_generator: Querying points between ${start_time} -- ${end_time}.")
|
Log.i("VOUSSOIR", "Track.trkpt_generator: Querying points between ${start_time} -- ${end_time}.")
|
||||||
return _trkpt_generator(this.connection.rawQuery(
|
return _trkpt_generator(this.connection.rawQuery(
|
||||||
"SELECT device_id, lat, lon, time, ele, accuracy, sat FROM trkpt WHERE device_id = ? AND time > ? AND time < ? ORDER BY time ASC",
|
"SELECT device_id, lat, lon, time, ele, accuracy, sat FROM trkpt WHERE device_id = ? AND time >= ? AND time <= ? ORDER BY time ASC",
|
||||||
arrayOf(device_id, start_time.toString(), end_time.toString())
|
arrayOf(device_id, start_time.toString(), end_time.toString())
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue