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.tsis 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 -> insertz.mutate.<table>.put -> upsert
- Removed
selectfrom ZQL. It wasn’t doing anything (documentation) - Moved batch mutation to its own
mutateBatchmethod. Before themutatefield also doubled as a method. This made intellisense hard to understand sincez.mutatehad 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
wherefilters, including ergonomically buildingorexpressions with dynamic number of clauses (bug, documentation). - Support using Postgres databases without superuser access for smaller apps (documentation).
- Support for running
Zeroclient under Cloudflare Durable Objects (documentation). - Reworked support for
null/undefinedto properly support optional fields (bug, documentation). - Added
IS/IS NOTto ZQL to support checking for null (bug, documentation). - Improved intellisense for mutators.
- Added
--portflag andZERO_PORTenvironment variable (bug, documentation). - Default max connections of zero-cache more conservatively so that it should fit with even common small Postgres configurations.
zero-cachenow accepts requests with any base path, not just/api. Theserverparameter to theZeroclient 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-cacheon same domain with an app that already uses the/apiprefix (bug).- Allow Postgres columns with default values, but don’t sync them (documentation).
- The
npx zero-sqliteutility now accepts all the same flags and arguments thatsqlite3does (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
orto search description and comments too
Docs
- Added new ZQL reference
- Added new mutators reference
- Added new config reference