Skip to content

Releases: cachapa/sql_crdt

0.0.5+1

19 Jan 14:04
Compare
Choose a tag to compare
Fix query to fetch primary keys

0.0.5

19 Jan 14:04
Compare
Choose a tag to compare
Fix UPSERTs on Raspbian due to older Sqlite version

0.0.4

19 Jan 14:04
Compare
Choose a tag to compare
Warn instead of bailing on unparseable queries

0.0.3: Major refactor to fix transaction deadlocks

19 Jan 14:04
Compare
Choose a tag to compare
So it turns out there's a good reason why Sqflite has a transaction
helper method:

Sqlite doesn't like it when you try to open more than one transaction.
Making sure you only have one transaction at any time can be difficult
in non-trivial code. sqlite_crdt also uses transactions internally for
some of its own operations which makes it even harder to avoid
collisions.

A better solution is to make transactions blocking, that way you can
ensure there's only one transaction running at any time, and subsequent
transactions will just wait for the previous to finish.

I tried to do that in a previous commit, but that's not easy to get
right because exceptions could exit transactions without releasing the
lock.
Moreover the code which prevented incrementing the canonical time inside
transactions got a bit messy.

This commit fixes that by using different classes for the different use
cases:
* BaseCrdt only intercepts create statements
* TransactionCrdt appends an immutable hlc to write statements
* SqliteCrdt does everything + watches, merges, hlc increments, etc.

Moreover, it now uses the Sqflite transaction method to benefit from the
existing blocking transaction implementation.

0.0.2

19 Jan 14:04
Compare
Choose a tag to compare
Update sqlparser version

0.0.1

19 Jan 14:03
Compare
Choose a tag to compare
Initial commit