Skip to content

Commit

Permalink
Fix session state query.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesremuscat committed Jun 13, 2024
1 parent ff9cf27 commit fb0d3a2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,12 @@ const getServiceStateAt = (uuid, timestamp=null) => {
export const getSessionStateAt = (uuid, sessionIndex, timestamp=null) => {
return db.service_states
.where('[uuid+sessionIndex+timestamp]')
.between([uuid, sessionIndex || Dexie.minKey, Dexie.minKey], [uuid, sessionIndex || Dexie.maxKey, timestamp || Dexie.maxKey], true, true)
.between(
[uuid, sessionIndex, Dexie.minKey],
[uuid, sessionIndex, timestamp || Dexie.maxKey],
true,
true
)
.last();
};

Expand Down

0 comments on commit fb0d3a2

Please sign in to comment.