Zero 0.6
Relationship FIlters
Install
npm install @rocicorp/zero@0.6
Upgrade Guide
This release is a bit harder to upgrade to than previous alphas. For a step-by-step guide, please refer to the commits that upgrade the React and Solid quickstart apps:
Breaking Changes
- Totally new configuration system.
zero.config.ts
is no more – config is now via env vars (documentation).- Permissions rules moved into schema (documentation).
- Renamed CRUD mutators to be consistent with SQL naming (bug, documentation).
z.mutate.<table>.create -> insert
z.mutate.<table>.put -> upsert
- Removed
select
from ZQL. It wasn’t doing anything (documentation) - Moved batch mutation to its own
mutateBatch
method. Before themutate
field also doubled as a method. This made intellisense hard to understand sincez.mutate
had all the tables as fields but also all the fields of a function.
Features
- Relationship filters. Queries can now include
whereExists
(bug, documentation). - Reworked syntax for compound
where
filters, including ergonomically buildingor
expressions with dynamic number of clauses (bug, documentation). - Support using Postgres databases without superuser access for smaller apps (documentation).
- Support for running
Zero
client under Cloudflare Durable Objects (documentation). - Reworked support for
null
/undefined
to properly support optional fields (bug, documentation). - Added
IS
/IS NOT
to ZQL to support checking for null (bug, documentation). - Improved intellisense for mutators.
- Added
--port
flag andZERO_PORT
environment variable (bug, documentation). - Default max connections of zero-cache more conservatively so that it should fit with even common small Postgres configurations.
zero-cache
now accepts requests with any base path, not just/api
. Theserver
parameter to theZero
client constructor can now be a host (https://myapp-myteam.zero.ms
) or a host with a single path component (https://myapp-myteam.zero.ms/zero
). These two changes together allow hostingzero-cache
on same domain with an app that already uses the/api
prefix (bug).- Allow Postgres columns with default values, but don’t sync them (documentation).
- The
npx zero-sqlite
utility now accepts all the same flags and arguments thatsqlite3
does (documentation).
zbugs
- Added tooltip describing who submitted which emoji reactions
- Updated implementation of label, assignee, and owner filters to use relationship filters
- Updated text filter implementation to use
or
to search description and comments too
Docs
- Added new ZQL reference
- Added new mutators reference
- Added new config reference