Skip to content

Releases: featurist/sworm

v3.8.1

Choose a tag to compare

@refractalize refractalize released this 27 May 07:17
  • Update cooperative version in package 7210fd3

v3.8.0...v3.8.1

websql

Choose a tag to compare

@refractalize refractalize released this 13 Mar 14:50

Sworm works in the browser at last!

We now have support for websql.

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

concurrency fixes

Choose a tag to compare

@refractalize refractalize released this 11 Mar 17:55

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

Choose a tag to compare

@refractalize refractalize released this 10 Mar 22:03

throws error when not connected

Choose a tag to compare

@refractalize refractalize released this 10 Mar 22:07

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

objects with relationships can be saved twice

Choose a tag to compare

@refractalize refractalize released this 10 Mar 22:11

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

Choose a tag to compare

@refractalize refractalize released this 01 Feb 11:09

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.