You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove settled() for awaiting the change queue in select queries to the change table.
Pros
glitch free behavior (because calling settled() is not forgotten)
decreased API surface
Cons
RxJS internally
Context
The need for lix.settled() doesn't exist if select queries to table that the change queue impacts are awaited while the queue is running.
// the query awaits the change queue
const changes = await lix.db.selectFrom("change").selectAll().execute()
// pseudocode kysely plugin that awaits an observable
async function interceptSelect(query){
if (query.table === "change"){
await state.changeQueueSettled
return query
}
}
// the settled awaits the last emitted value of the change queuestate.changeQueueSettled=lastValueOf(state.changeQueue$)
The text was updated successfully, but these errors were encountered:
samuelstroschein
changed the title
remove lix.settled() for awaiting select from change
remove lix.settled() for awaiting the change queue in select from changeSep 3, 2024
Proposal
Remove
settled()
for awaiting the change queue in select queries to thechange
table.Pros
settled()
is not forgotten)Cons
Context
The need for
lix.settled()
doesn't exist if select queries to table that the change queue impacts are awaited while the queue is running.The text was updated successfully, but these errors were encountered: