// NOTE: This returns snake_cased keys! As we're bypassing the Objection internals, no casemapping occurs.
// FIXME/REFACTOR: That needs to be changed in the refactor, for consistency across database backends
// NOTE: This is a hacky workaround - if we don't do this, then for some reason also entries *at* the exact timestamp are included, which is not what we want.
// FIXME: Verify that this doesn't break anything, eg. when an entry is created inbetween the original timestamp and +1ms.
letactualTimestamp=(timestamp!=null)
?dateFns.addMilliseconds(timestamp,1)
:undefined;
functionapplyWhereClauses(query,idField){
if(timestamp!=null){
// FIXME: An error in the query here throws an error, resulting in an abort handling bug in a promistream