opral / lix-sdk

1 stars 0 forks source link

pass transaction to plugins apis #123

Closed samuelstroschein closed 2 hours ago

samuelstroschein commented 2 weeks ago

Context

Invocations of the plugin API should lock the database (for example detecting conflictings in a merge)

Proposal

Wrap LixReadonly invocations of plugins with a transaction.

plugin.detectConflicts({
  lix: withTransaction(lix, trx)
})
samuelstroschein commented 2 weeks ago

Postponing because non-breaking.

samuelstroschein commented 2 hours ago

closing because not important for public pre-release.

  1. lix calls plugin invoking stuff in a transaction now
  2. if bugs arise, easy to fix