js-bao 0.12.0-alpha.1 → 0.12.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1559,6 +1559,27 @@ See the `examples/` directory for complete working examples:
1559
1559
  Changes to the on-disk behaviour of `js-bao/cloudflare/do` (`DurableObjectEngine`)
1560
1560
  that a store's owner can observe. Newest first.
1561
1561
 
1562
+ - **New stores get a record-first StringSet table** (#3877). A store the
1563
+ engine creates declares `stringset_index` with `UNIQUE(_type, _record_id,
1564
+ field, value)` (record-first) instead of `UNIQUE(_type, field, _record_id,
1565
+ value)` (field-first). That key serves every statement
1566
+ `idx_ss_type_record_field` served, so on a record-first table the index is
1567
+ retired: the engine never builds it there and removes any copy on open, by
1568
+ definition and under any name, and a StringSet value costs three rows written
1569
+ instead of four. A unique key cannot be altered in place, so an existing store
1570
+ keeps the shape it has, both member indexes included; both shapes are
1571
+ supported and return the same results, in the same value order.
1572
+ `engine.memberTableShape` answers the stored shape, and the new export
1573
+ `DURABLE_OBJECT_SCHEMA_OPTIONS` is the schema options a new store is created
1574
+ with. `JsonSchemaDDL`'s output for every existing option is unchanged, so
1575
+ client stores keep the field-first table. On the platform, a large document
1576
+ converts at its next bulk-load ingest and a plain document at its next
1577
+ projection rebuild; databases keep their shape. `rebuildMemberTable` is
1578
+ `@internal`, used only by that rebuild. Rollback floor: do not roll back past
1579
+ the last release before this one while an ingest is running; a store opened
1580
+ by an older release re-creates `idx_ss_type_record_field`, and this release
1581
+ removes it again on its next open. See also the `_indexes.created_at` entry
1582
+ below.
1562
1583
  - **`idx_records_type` is retired** (#3876). The primary key `(_type, _id)`
1563
1584
  already leads with `_type`, so a new store no longer builds the index and an
1564
1585
  existing one loses it on its next open, removed by definition under any name