github TanStack/db @tanstack/electric-db-collection@0.2.14

latest releases: @tanstack/electric-db-collection@0.2.15, @tanstack/query-db-collection@1.0.8
15 hours ago

Patch Changes

  • Fix awaitMatch race condition on inserts and export isChangeMessage/isControlMessage. (#1000)

    Bug fixes:

    • Fixed race condition where awaitMatch would timeout on inserts when Electric synced faster than the API call
    • Messages are now preserved in buffer until next batch arrives, allowing awaitMatch to find them
    • Added batchCommitted flag to track commit state, consistent with awaitTxId semantics
    • Fixed batchCommitted to also trigger on snapshot-end in on-demand mode (matching "ready" semantics)

    Export fixes:

    • isChangeMessage and isControlMessage are now exported from the package index as documented
  • Fix invalid Electric proxy queries with missing params for null/undefined values (#951)

    When comparison operators were used with null/undefined values, the SQL compiler would generate placeholders ($1, $2) in the WHERE clause but skip adding the params to the dictionary. This resulted in invalid queries being sent to Electric.

    Now all comparison operators (eq, gt, lt, gte, lte, like, ilike) throw a clear error when used with null/undefined values, since comparisons with NULL always evaluate to UNKNOWN in SQL. Users should use isNull() or isUndefined() to check for null values instead.

Don't miss a new db release

NewReleases is sending notifications on new releases.