Richer collection filters and a recoverable Data Engine
Collections gain $like, $all and $elemMatch; Data Engine documents can be restored, writes honour If-Match, and errors answer with the right status.
What's new
Document collections
New filter operators.$like and $ilike match text with % and _ wildcards. $all matches arrays that hold every listed value. $elemMatch matches an array element against a sub-filter, on the element's fields ({ items: { $elemMatch: { qty: { $gt: 5 } } } }) or on the element itself ({ scores: { $elemMatch: { $gte: 8 } } }). A value that is not an array never matches and never causes an error.
Clearer messages. The create-collection field states the naming rule as you type and stops at 63 characters. Inserting something that is not a JSON object now says so.
Data Engine
Deleted documents can be restored. List them with ?includeSoftDeleted=true and restore one with POST /v1/projects/:projectId/data/:entity/:id/restore. In basefyio-js: find().includeDeleted() and restore(id).
Optimistic concurrency works. Send If-Match: "<_version>" with PATCH or PUT. If someone changed the document in between, the request answers 409 and nothing is written. Responses carry the version as ETag, and If-Match is allowed from the browser. In basefyio-js: update(id, patch, { ifMatch }).
Errors answer with the right status. A missing document or entity is 404, a version conflict 409, and an invalid filter 400 without internal error text. Before, these were 500 or 503.
Creating an entity is all or nothing. A bad field list answers 400 and creates nothing. Before, the request answered 500 and still created the entity. A name that already exists answers 409.
bf.data.view() now says that projections are not available yet instead of calling a route that does not exist.