Skip to content

Releases: featurist/sworm

v3.8.1

27 May 07:17
Compare
Choose a tag to compare
  • Update cooperative version in package 7210fd3

v3.8.0...v3.8.1

websql

13 Mar 14:50
Compare
Choose a tag to compare

Sworm works in the browser at last!

We now have support for websql.

Huge thanks to @dereke (#30) for this release.

concurrency fixes

11 Mar 17:55
Compare
Choose a tag to compare

it was possible that if object A was already being saved
and object B required A.id, then it would take A.id
before A was saved.

This is now fixed such that all dependent objects strictly
wait for their dependencies to be saved before attempting
to get their ids. This happens even if the object is already
being saved by another operation. (the promise is shared)

On the other hand, we don't wait for all one to many objects
for an object - which don't have a dependency relationship.
These objects are added to a queue of objects that need to
be saved before the top level object can be considered
completely saved.

can save empty rows

10 Mar 22:03
Compare
Choose a tag to compare

throws error when not connected

10 Mar 22:07
Compare
Choose a tag to compare

Throws errors when trying to query or save when the database isn't connected yet.

objects with relationships can be saved twice

10 Mar 22:11
Compare
Choose a tag to compare

There was an issue where if you saved an object with function relationships, i.e. functions that returned more objects, those objects would be saved, fine. Problem occurred the next time you saved the same object, it would call the function again and return new objects to save. The fix is to set the return values of those functions as fields on the object, overwriting the function, and thus allowing the object to be saved again without problem.

Connect on query

01 Feb 11:09
Compare
Choose a tag to compare

This release breaks the API, please upgrade carefully. In particular, the sworm.db(config) return is no longer a promise, but a db instance.

  • Previously sworm.db(config) returned a promise, now it returns a new db instance. The first db.query() or the first db.connect() will connect to the database.
  • Now supporting setupSession to setup session properties before querying.