From 422b31f90d44432a023f0ccabb0151da01e19e2a Mon Sep 17 00:00:00 2001 From: Sam Willis Date: Thu, 4 Dec 2025 18:59:39 +0000 Subject: [PATCH 1/4] test(react-db): add tests for deletion from partial page in infinite query Add tests for deleting items from a page with fewer rows than pageSize in useLiveInfiniteQuery. Tests both ascending and descending order to verify the behavior difference. --- .../tests/useLiveInfiniteQuery.test.tsx | 131 ++++++++++++++++++ 1 file changed, 131 insertions(+) diff --git a/packages/react-db/tests/useLiveInfiniteQuery.test.tsx b/packages/react-db/tests/useLiveInfiniteQuery.test.tsx index 5dbb69c1b..b59753b34 100644 --- a/packages/react-db/tests/useLiveInfiniteQuery.test.tsx +++ b/packages/react-db/tests/useLiveInfiniteQuery.test.tsx @@ -368,6 +368,137 @@ describe(`useLiveInfiniteQuery`, () => { expect(result.current.pages[1]).toHaveLength(10) }) + it(`should handle deletion from partial page with descending order`, async () => { + // Create only 5 items - fewer than the pageSize of 20 + const posts = createMockPosts(5) + const collection = createCollection( + mockSyncCollectionOptions({ + id: `partial-page-deletion-desc-test`, + getKey: (post: Post) => post.id, + initialData: posts, + }) + ) + + const { result } = renderHook(() => { + return useLiveInfiniteQuery( + (q) => + q + .from({ posts: collection }) + .orderBy(({ posts: p }) => p.createdAt, `desc`), + { + pageSize: 20, + getNextPageParam: (lastPage) => + lastPage.length === 20 ? lastPage.length : undefined, + } + ) + }) + + await waitFor(() => { + expect(result.current.isReady).toBe(true) + }) + + // Should have all 5 items on one page (partial page) + expect(result.current.pages).toHaveLength(1) + expect(result.current.data).toHaveLength(5) + expect(result.current.hasNextPage).toBe(false) + + // Verify the first item (most recent by createdAt descending) + const firstItemId = result.current.data[0]!.id + expect(firstItemId).toBe(`1`) // Post 1 has the highest createdAt + + // Delete the first item (the one that appears first in descending order) + act(() => { + collection.utils.begin() + collection.utils.write({ + type: `delete`, + value: posts[0]!, // Post 1 + }) + collection.utils.commit() + }) + + // The deleted item should disappear from the result + await waitFor(() => { + expect(result.current.data).toHaveLength(4) + }) + + // Verify the deleted item is no longer in the data + expect( + result.current.data.find((p) => p.id === firstItemId) + ).toBeUndefined() + + // Verify the new first item is Post 2 + expect(result.current.data[0]!.id).toBe(`2`) + + // Still should have 1 page with 4 items + expect(result.current.pages).toHaveLength(1) + expect(result.current.pages[0]).toHaveLength(4) + expect(result.current.hasNextPage).toBe(false) + }) + + it(`should handle deletion from partial page with ascending order`, async () => { + // Create only 5 items - fewer than the pageSize of 20 + const posts = createMockPosts(5) + const collection = createCollection( + mockSyncCollectionOptions({ + id: `partial-page-deletion-asc-test`, + getKey: (post: Post) => post.id, + initialData: posts, + }) + ) + + const { result } = renderHook(() => { + return useLiveInfiniteQuery( + (q) => + q + .from({ posts: collection }) + .orderBy(({ posts: p }) => p.createdAt, `asc`), // ascending order + { + pageSize: 20, + getNextPageParam: (lastPage) => + lastPage.length === 20 ? lastPage.length : undefined, + } + ) + }) + + await waitFor(() => { + expect(result.current.isReady).toBe(true) + }) + + // Should have all 5 items on one page (partial page) + expect(result.current.pages).toHaveLength(1) + expect(result.current.data).toHaveLength(5) + expect(result.current.hasNextPage).toBe(false) + + // In ascending order, Post 5 has the lowest createdAt and appears first + const firstItemId = result.current.data[0]!.id + expect(firstItemId).toBe(`5`) // Post 5 has the lowest createdAt + + // Delete the first item (the one that appears first in ascending order) + act(() => { + collection.utils.begin() + collection.utils.write({ + type: `delete`, + value: posts[4]!, // Post 5 (index 4 in array) + }) + collection.utils.commit() + }) + + // The deleted item should disappear from the result + await waitFor(() => { + expect(result.current.data).toHaveLength(4) + }) + + // Verify the deleted item is no longer in the data + expect( + result.current.data.find((p) => p.id === firstItemId) + ).toBeUndefined() + + // Still should have 1 page with 4 items + expect(result.current.pages).toHaveLength(1) + expect(result.current.pages[0]).toHaveLength(4) + expect(result.current.hasNextPage).toBe(false) + }) + it(`should work with where clauses`, async () => { const posts = createMockPosts(50) const collection = createCollection( From 79a2e269db7ddb0bff8609e2c8bea648ac6bd27a Mon Sep 17 00:00:00 2001 From: Sam Willis Date: Thu, 4 Dec 2025 19:47:51 +0000 Subject: [PATCH 2/4] fix: correctly extract indexed value in requestLimitedSnapshot The `biggestObservedValue` variable was incorrectly set to the full row object instead of the indexed value (e.g., salary). This caused the BTree comparison in `index.take()` to fail, resulting in the same data being loaded multiple times. Each item would be inserted with a multiplicity > 1, and when deleted, the multiplicity would decrement but not reach 0, so the item would remain visible in the TopK. This fix creates a value extractor from the orderBy expression and uses it to extract the actual indexed value from each row before tracking it as the "biggest observed value". --- packages/db/src/collection/subscription.ts | 14 ++++++++-- packages/db/tests/query/order-by.test.ts | 32 ++++++++++++++++++++++ 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/packages/db/src/collection/subscription.ts b/packages/db/src/collection/subscription.ts index 1c23d7b04..9cc3700d1 100644 --- a/packages/db/src/collection/subscription.ts +++ b/packages/db/src/collection/subscription.ts @@ -1,7 +1,8 @@ import { ensureIndexForExpression } from "../indexes/auto-index.js" import { and, eq, gt, gte, lt } from "../query/builder/functions.js" -import { Value } from "../query/ir.js" +import { PropRef, Value } from "../query/ir.js" import { EventEmitter } from "../event-emitter.js" +import { compileExpression } from "../query/compiler/evaluators.js" import { createFilterFunctionFromExpression, createFilteredCallback, @@ -314,6 +315,13 @@ export class CollectionSubscription const valuesNeeded = () => Math.max(limit - changes.length, 0) const collectionExhausted = () => keys.length === 0 + // Create a value extractor for the orderBy field to properly track the biggest indexed value + const orderByExpression = orderBy[0]!.expression + const valueExtractor = + orderByExpression.type === `ref` + ? compileExpression(new PropRef(orderByExpression.path), true) + : null + while (valuesNeeded() > 0 && !collectionExhausted()) { const insertedKeys = new Set() // Track keys we add to `changes` in this iteration @@ -324,7 +332,9 @@ export class CollectionSubscription key, value, }) - biggestObservedValue = value + // Extract the indexed value (e.g., salary) from the row, not the full row + // This is needed for index.take() to work correctly with the BTree comparator + biggestObservedValue = valueExtractor ? valueExtractor(value) : value insertedKeys.add(key) // Track this key } diff --git a/packages/db/tests/query/order-by.test.ts b/packages/db/tests/query/order-by.test.ts index d7c11b848..82afec689 100644 --- a/packages/db/tests/query/order-by.test.ts +++ b/packages/db/tests/query/order-by.test.ts @@ -733,6 +733,38 @@ function createOrderByTests(autoIndex: `off` | `eager`): void { [5, 52_000], ]) }) + + it(`handles deletion from partial page with limit larger than data`, async () => { + const collection = createLiveQueryCollection((q) => + q + .from({ employees: employeesCollection }) + .orderBy(({ employees }) => employees.salary, `desc`) + .limit(20) // Limit larger than number of employees (5) + .select(({ employees }) => ({ + id: employees.id, + name: employees.name, + salary: employees.salary, + })) + ) + await collection.preload() + + const results = Array.from(collection.values()) + expect(results).toHaveLength(5) + expect(results[0]!.name).toBe(`Diana`) + + // Delete Diana (the highest paid employee, first in DESC order) + const dianaData = employeeData.find((e) => e.id === 4)! + employeesCollection.utils.begin() + employeesCollection.utils.write({ + type: `delete`, + value: dianaData, + }) + employeesCollection.utils.commit() + + const newResults = Array.from(collection.values()) + expect(newResults).toHaveLength(4) + expect(newResults[0]!.name).toBe(`Bob`) + }) }) describe(`OrderBy with Joins`, () => { From 7890567fcb7c47865f8be639613a072992adb81b Mon Sep 17 00:00:00 2001 From: Sam Willis Date: Thu, 4 Dec 2025 19:48:45 +0000 Subject: [PATCH 3/4] chore: add changeset for DESC deletion fix --- .changeset/fix-desc-deletion-partial-page.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .changeset/fix-desc-deletion-partial-page.md diff --git a/.changeset/fix-desc-deletion-partial-page.md b/.changeset/fix-desc-deletion-partial-page.md new file mode 100644 index 000000000..1c599b6fe --- /dev/null +++ b/.changeset/fix-desc-deletion-partial-page.md @@ -0,0 +1,9 @@ +--- +"@tanstack/db": patch +--- + +Fix useLiveInfiniteQuery not updating when deleting an item from a partial page with DESC order. + +The bug occurred when using `useLiveInfiniteQuery` with `orderBy(..., 'desc')` and having fewer items than the `pageSize`. Deleting an item would not update the live result - the deleted item would remain visible until another change occurred. + +The root cause was in `requestLimitedSnapshot` where `biggestObservedValue` was incorrectly set to the full row object instead of the indexed value (e.g., the salary field used for ordering). This caused the BTree comparison to fail, resulting in the same data being loaded multiple times with each item having a multiplicity > 1. When an item was deleted, its multiplicity would decrement but not reach 0, so it remained visible. From 0e075e33464bd8ae998910273be14e30b78a8875 Mon Sep 17 00:00:00 2001 From: Sam Willis Date: Tue, 23 Dec 2025 16:40:10 +0000 Subject: [PATCH 4/4] Main branch merge conflict (#1066) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(query-db-collection): use deep equality for object field comparison (#967) * test: add test for object field update rollback issue Add test that verifies object field updates with refetch: false don't rollback to previous values after server response. * fix: use deep equality for object field comparison in query observer Replace shallow equality (===) with deep equality when comparing items in the query observer callback. This fixes an issue where updating object fields with refetch: false would cause rollback to previous values every other update. * chore: add changeset for object field update rollback fix * ci: Version Packages (#961) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * docs: regenerate API documentation (#969) Co-authored-by: github-actions[bot] * ci: run prettier autofix action (#972) * ci: prettier auto-fix * Sync prettier config with other TanStack projects * Fix lockfile * docs: correct local relative links (#973) * fix(db-ivm): use row keys for stable ORDER BY tie-breaking (#957) * fix(db-ivm): use row keys for stable ORDER BY tie-breaking Replace hash-based object ID tie-breaking with direct key comparison for deterministic ordering when ORDER BY values are equal. - Use row key directly as tie-breaker (always string | number, unique per row) - Remove globalObjectIdGenerator dependency - Simplify TaggedValue from [K, V, Tag] to [K, T] tuple - Clean up helper functions (tagValue, getKey, getVal, getTag) This ensures stable, deterministic ordering across page reloads and eliminates potential hash collisions. * ci: apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix(db): ensure deterministic iteration order for collections and indexes (#958) * fix(db): ensure deterministic iteration order for collections and indexes - SortedMap: add key-based tie-breaking for deterministic ordering - SortedMap: optimize to skip value comparison when no comparator provided - BTreeIndex: sort keys within same indexed value for deterministic order - BTreeIndex: add fast paths for empty/single-key sets - CollectionStateManager: always use SortedMap for deterministic iteration - Extract compareKeys utility to utils/comparison.ts - Add comprehensive tests for deterministic ordering behavior * ci: apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix(db) loadSubset when orderby has multiple columns (#926) * fix(db) loadSubset when orderby has multiple columns failing test for multiple orderby and loadsubset push down multiple orderby predicates to load subset split order by cursor predicate build into two, inprecise wider band for local lading, precise for the sync loadSubset new e2e tests for composite orderby and pagination changeset when doing gt/lt comparisons to a bool cast to string fix: use non-boolean columns in multi-column orderBy e2e tests Electric/PostgreSQL doesn't support comparison operators (<, >, <=, >=) on boolean types. Changed tests to use age (number) and name (string) columns instead of isActive (boolean) to avoid this limitation. The core multi-column orderBy functionality still works correctly - this is just a test adjustment to work within Electric's SQL parser constraints. * ci: apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * ci: sync changes from other projects (#978) * ci: fix vitest/lint, fix package.json * ci: apply automated fixes * Remove ts-expect-error --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * ci: more changes from other projects (#980) * Revert husky removal (#981) * revert: restore husky pre-commit hook removed in #980 This restores the husky pre-commit hook configuration that was removed in PR #980. The hook runs lint-staged on staged .ts and .tsx files. * chore: update pnpm-lock.yaml and fix husky pre-commit format Update lockfile with husky and lint-staged dependencies. Update pre-commit hook to modern husky v9 format. --------- Co-authored-by: Claude * Restore only publishing docs on release (#982) * ci: revert doc publishing workflow changes from #980 Restore the doc publishing workflow that was removed in PR #980: - Restore docs-sync.yml for daily auto-generated docs - Restore doc generation steps in release.yml after package publish - Restore NPM_TOKEN environment variable * ci: restore doc generation on release only Restore doc generation steps in release.yml that run after package publish. Remove the daily docs-sync.yml workflow - docs should only be regenerated when we release. --------- Co-authored-by: Claude * ci: sync package versions (#984) * chore(deps): update dependency @angular/common to v19.2.16 [security] (#919) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update all non-major dependencies (#986) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Fix build example site auth secret error (#988) fix(ci): add BETTER_AUTH_SECRET for projects example build Copy .env.example to .env during CI build to provide required BETTER_AUTH_SECRET that better-auth now enforces. Co-authored-by: Claude * Unit tests for data equality comparison (#992) * Add @tanstack/config dev dependency * Tests for eq comparison of Date objects * ci: apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Handle invalid collection getKey return values (#1008) * Add runtime validation for collection getKey return values Throws InvalidKeyError when getKey returns values other than string or number (e.g., null, objects, booleans). The validation is optimized to only require 1 typeof check on the happy path (string keys). - Add InvalidKeyError class to errors.ts - Update generateGlobalKey to validate key type before generating key - Add tests for invalid key types (null, object, boolean) - Add tests confirming valid keys (string, number, empty string, zero) * ci: apply automated fixes --------- Co-authored-by: Claude Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Remove doc regeneration from autofix action (#1009) ci: remove doc regeneration from autofix workflow Docs are regenerated as part of releases, not on every PR/push. Co-authored-by: Claude * feat(db,electric,query): separate cursor expressions for flexible pagination (#960) * feat(db,electric,query): separate cursor expressions from where clause in loadSubset - Add CursorExpressions type with whereFrom, whereCurrent, and lastKey - LoadSubsetOptions.where no longer includes cursor - passed separately via cursor property - Add offset to LoadSubsetOptions for offset-based pagination support - Electric sync layer makes two parallel requestSnapshot calls when cursor present - Query collection serialization includes offset for query key generation This allows sync layers to choose between cursor-based or offset-based pagination, and Electric can efficiently handle tie-breaking with targeted requests. test(react-db): update useLiveInfiniteQuery test mock to handle cursor expressions The test mock's loadSubset handler now handles the new cursor property in LoadSubsetOptions by combining whereCurrent (ties) and whereFrom (next page) data, deduplicating by id, and re-sorting. fix(electric): make cursor requestSnapshot calls sequential Changed parallel requestSnapshot calls to sequential to avoid potential issues with concurrent snapshot requests that may cause timeouts in CI. fix(electric): combine cursor expressions into single requestSnapshot Instead of making two separate requestSnapshot calls (one for whereFrom, one for whereCurrent), combine them using OR into a single request. This avoids potential issues with multiple sequential snapshot requests that were causing timeouts in CI. The combined expression (whereFrom OR whereCurrent) matches the original behavior where cursor was combined with the where clause. wip working? update changeset fix query test * update docs * ci: apply automated fixes * fixups --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * ci: Version Packages (#974) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Query collection select writeupsert error (#1023) * test(query-db-collection): add failing tests for select + writeInsert/writeUpsert bug Add tests that reproduce the bug where using writeInsert or writeUpsert with a collection that has a select option causes an error: "select() must return an array of objects. Got: undefined" The bug occurs because performWriteOperations sets the query cache with a raw array, but the select function expects the wrapped response format. Related issue: https://github.com/TanStack/db/issues/xyz * fix(query-db-collection): fix select option breaking writeInsert/writeUpsert When using the `select` option to extract items from a wrapped API response (e.g., `{ data: [...], meta: {...} }`), calling `writeInsert()` or `writeUpsert()` would corrupt the query cache by setting it to a raw array. This caused the `select` function to receive the wrong data format and return `undefined`, triggering the error: "select() must return an array of objects. Got: undefined" The fix adds a `hasSelect` flag to the SyncContext and skips the `setQueryData` call when `select` is configured. This is the correct behavior because: 1. The collection's synced store is already updated 2. The query cache stores the wrapped response format, not the raw items 3. Overwriting the cache with raw items would break the select function * fix(query-db-collection): fix select option breaking writeInsert/writeUpsert When using the `select` option to extract items from a wrapped API response (e.g., `{ data: [...], meta: {...} }`), calling `writeInsert()` or `writeUpsert()` would corrupt the query cache by setting it to a raw array. This caused the `select` function to receive the wrong data format and return `undefined`, triggering the error: "select() must return an array of objects. Got: undefined" The fix adds an `updateCacheData` function to the SyncContext that properly handles cache updates for both cases: - Without `select`: sets the cache directly with the raw array - With `select`: uses setQueryData with an updater function to preserve the wrapper structure while updating the items array inside it Also added a comprehensive test that verifies the wrapped response format (including metadata) is preserved after write operations. * ci: apply automated fixes * refactor(query-db-collection): lift updateCacheData out of inline context Move the updateCacheData function from being inline in the writeContext object to a standalone function for better readability and maintainability. * fix(query-db-collection): improve updateCacheData with select-based property detection Address review feedback: 1. Use select(oldData) to identify the correct array property by reference equality instead of "first array property wins" heuristic 2. Fallback to common property names (data, items, results) before scanning 3. Return oldData unchanged instead of raw array when property can't be found to avoid breaking select 4. Make updateCacheData optional in SyncContext to avoid breaking changes 5. Add changeset for release * ci: apply automated fixes * fix: resolve TypeScript type errors for queryKey Handle both static and function-based queryKey types properly: - Get base query key before passing to setQueryData - Keep writeContext.queryKey as Array for SyncContext compatibility * chore: fix version inconsistencies in example apps Update example apps to use consistent versions of: - @tanstack/query-db-collection: ^1.0.7 - @tanstack/react-db: ^0.1.56 Fixes sherif multiple-dependency-versions check. --------- Co-authored-by: Cursor Agent Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Fix serializing null/undefined when generating subset queries (#951) * Fix invalid Electric proxy queries with missing params for null values When comparison operators (eq, gt, lt, etc.) 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 because serialize() returns empty string for null/undefined. This resulted in invalid queries being sent to Electric like: subset__where="name" = $1 subset__params={} The fix: - For eq(col, null): Transform to "col IS NULL" syntax - For other comparisons (gt, lt, gte, lte, like, ilike): Throw a clear error since null comparisons don't make semantic sense in SQL Added comprehensive tests for the sql-compiler including null handling. * chore: add changeset for Electric null params fix * fix: use type assertions in sql-compiler tests for phantom type compatibility * fix: handle edge cases for null comparisons in sql-compiler Address reviewer feedback: - eq(null, null) now throws (both args null would cause missing params) - eq(null, literal) now throws (comparing literal to null is nonsensical) - Only allow ref and func types as non-null arg in eq(..., null) - Update changeset to explicitly mention undefined behavior - Add tests for edge cases and OR + null equality * test: add e2e tests for eq(col, null) transformation to IS NULL * test: improve e2e tests for eq(col, null) with longer timeout and baseline comparison * fix: handle eq(col, null) in local evaluator to match SQL IS NULL semantics When eq() is called with a literal null/undefined value, the local JavaScript evaluator now treats it as an IS NULL check instead of using 3-valued logic (which would always return UNKNOWN). This matches the SQL compiler's transformation of eq(col, null) to IS NULL, ensuring consistent behavior between local query evaluation and remote SQL queries. - eq(col, null) now returns true if col is null/undefined, false otherwise - eq(null, col) is also handled symmetrically - eq(null, null) returns true (both are null) - 3-valued logic still applies for column-to-column comparisons This fixes e2e test failures where eq(col, null) queries returned 0 results because all rows were being excluded by the UNKNOWN result. * docs: explain eq(col, null) handling and 3-valued logic reasoning Add design document explaining the middle-ground approach for handling eq(col, null) in the context of PR #765's 3-valued logic implementation. Key points: - Literal null values in eq() are transformed to isNull semantics - 3-valued logic still applies for column-to-column comparisons - This maintains SQL/JS consistency and handles dynamic values gracefully * fix: throw error for eq(col, null) - use isNull() instead Per Kevin's feedback on the 3-valued logic design (PR #765), eq(col, null) should throw an error rather than being transformed to IS NULL. This is consistent with how other comparison operators (gt, lt, etc.) handle null. Changes: - Revert JS evaluator change that transformed eq(col, null) to isNull semantics - Update SQL compiler to throw error for eq(col, null) instead of IS NULL - Update all related unit tests to expect errors - Remove e2e tests for eq(col, null) (now throws error) - Update documentation to explain the correct approach Users should: - Use isNull(col) or isUndefined(col) to check for null values - Handle dynamic null values explicitly in their code - Use non-nullable columns for cursor-based pagination The original bug (invalid SQL with missing params) is fixed by throwing a clear error that guides users to the correct approach. * fix: update changeset and remove design doc per review feedback - Update changeset to reflect that eq(col, null) throws error (not transforms to IS NULL) - Remove docs/design/eq-null-handling.md - was only for review, not meant to be merged * ci: apply automated fixes --------- Co-authored-by: Claude Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Fix awaitMatch helper on collection inserts and export isChangeMessage (#1000) fix(electric-db-collection): fix awaitMatch race condition on inserts and export isChangeMessage Two issues fixed: 1. **isChangeMessage not exported**: The `isChangeMessage` and `isControlMessage` utilities were exported from electric.ts but not re-exported from the package's index.ts, making them unavailable to users despite documentation stating otherwise. 2. **awaitMatch race condition on inserts**: When `awaitMatch` was called after the Electric messages had already been processed (including up-to-date), it would timeout because: - The message buffer (`currentBatchMessages`) was cleared on up-to-date - Immediate matches found in the buffer still waited for another up-to-date to resolve Fixed by: - Moving buffer clearing to the START of batch processing (preserves messages until next batch) - Adding `batchCommitted` flag to track when a batch is committed - For immediate matches: resolve immediately only if batch is committed (consistent with awaitTxId) - For immediate matches during batch processing: wait for up-to-date (maintains commit semantics) - Set `batchCommitted` BEFORE `resolveMatchedPendingMatches()` to avoid timing window - Set `batchCommitted` on snapshot-end in on-demand mode (matching "ready" semantics) Fixes issue reported on Discord where inserts would timeout while updates worked. Co-authored-by: Claude * ci: Version Packages (#1026) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * docs: regenerate API documentation (#1027) Co-authored-by: github-actions[bot] * Don't pin @electric-sql/client version (#1031) * Don't pin @electric-sql/client version * Add changeset * update lock file * Fix sherif linter errors for dependency version mismatches Standardizes @electric-sql/client to use ^1.2.0 across react-db, solid-db, and vue-db packages, and updates @tanstack/query-db-collection to ^1.0.8 in todo examples. šŸ¤– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --------- Co-authored-by: Claude Sonnet 4.5 * ci: Version Packages (#1033) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Handle subset end message in Electric collection (#1004) Adds support for the subset-end message introduced in electric-sql/electric#3582 * Delete a row by its key (#1003) This PR makes it possible to delete a row by key when using the write function passed to a collection's sync function. * Tagged rows and support for move outs in Electric DB collection (#942) Builds on top of Electric's ts-client support for tagging rows and move out events: electric-sql/electric#3497 This PR extends tanstack DB such that it handles tagged rows and move out events. A tagged row is removed from the Electric collection when its tag set becomes empty. Note that rows only have tags when the shape they belong to has one or more subqueries. * Fix: deleted items not disappearing from live queries with `.limit()` (#1044) * fix: emit delete events when subscribing with includeInitialState: false When subscribing to a collection with includeInitialState: false, delete events were being filtered out because the sentKeys set was empty. This affected live queries with limit/offset where users would subscribe to get future changes after already loading initial data via preload() or values(). Changes: - Add skipFiltering flag separate from loadedInitialState to allow filtering to be skipped while still allowing requestSnapshot to work - Call markAllStateAsSeen() when includeInitialState is explicitly false - Change internal subscriptions to not pass includeInitialState: false explicitly, so they can be distinguished from user subscriptions - Add tests for optimistic delete behavior with limit Fixes the issue where deleted items would not disappear from live queries when using .limit() and subscribing with includeInitialState: false. * debug: add extensive logging to track delete event flow This is a DEBUG BUILD with [TanStack-DB-DEBUG] logs to help track down why delete events may not be reaching subscribers when using limit/offset. The debug logs cover: - subscribeChanges: when subscriptions are created - emitEvents: when events are emitted to subscriptions - Subscription.emitEvents: when individual subscriptions receive events - filterAndFlipChanges: when events are filtered or passed through - recomputeOptimisticState: when optimistic state is recomputed and events emitted - sendChangesToPipeline: when changes flow through the D2 pipeline - applyChanges: when D2 pipeline outputs to the live query collection To use: Filter browser console for "[TanStack-DB-DEBUG]" Also includes the fix for includeInitialState: false not emitting deletes. * ci: apply automated fixes * debug: add more logging to track delete event flow in live queries Add comprehensive debug logging to: - createFilteredCallback in change-events.ts for whereExpression filtering - sendChangesToInput for D2 pipeline input - subscribeToOrderedChanges for orderBy/limit path - splitUpdates for update event handling - recomputeOptimisticState for pending sync key filtering This additional logging helps track where delete events may be filtered out when using live queries with limit/offset and where clauses. * ci: apply automated fixes * debug: add logging to graph scheduling and execution Add debug logging to track: - scheduleGraphRun: when graph run is scheduled - executeGraphRun: when graph run executes or returns early - maybeRunGraph: when graph actually runs, pending work status This helps diagnose issues where deletes are sent to D2 pipeline but never appear in the output (applyChanges not called). * ci: apply automated fixes * debug: add detailed logging to D2 reduce and topK operators Add debug logging to track: - ReduceOperator: input processing, key handling, and result output - topK: consolidation, sorting, slicing, and result details Also add two new test cases: 1. Test delete from different page (page 1 delete while viewing page 2) - Verifies items shift correctly when delete occurs on earlier page 2. Test delete beyond TopK window (no-op case) - Verifies deleting item outside window doesn't affect results These tests and debug logs will help diagnose issues where deleted items don't disappear from live queries when using limit/offset. * ci: apply automated fixes * debug: add more detailed logging to D2 graph and subscription Add additional debug logging to help diagnose delete issues: D2 graph (d2.ts): - Log when run() starts and completes with step count - Log pendingWork() results with operator IDs - Log when operators have pending work in step() Output operator (output.ts): - Log when run is called with message count - Log items in each message being processed Subscription (subscription.ts): - Log trackSentKeys with keys being added - Show total sentKeys count This should help diagnose scenarios where delete events are sent to D2 but no applyChanges output is produced. * ci: apply automated fixes * debug: add operator type logging to trace D2 pipeline Add operatorType property to Operator base class and log it when operators run. This will help identify which operators are processing the delete and where the data is being lost. Also add detailed logging to LinearUnaryOperator.run() to show: - Input message count - Input/output item counts - Sample of input and output items This should reveal exactly which operator is dropping the delete. * debug: add logging to TopKWithFractionalIndexOperator This is the key operator for orderBy+limit queries. Add detailed logging to: - run(): Show message count and index size - processElement(): Show key, multiplicity changes, and action (INSERT/DELETE/NO_CHANGE) - processElement result: Show moveIn/moveOut keys This should reveal exactly why deletes aren't producing output changes when the item exists in the TopK index. * ci: apply automated fixes * fix: filter duplicate inserts in subscription to prevent D2 multiplicity issues When an item is inserted multiple times without a delete in between, D2 multiplicity goes above 1. Then when a single delete arrives, multiplicity goes from 2 to 1 (not 0), so TopK doesn't emit a DELETE event. This fix: 1. Filters out duplicate inserts in filterAndFlipChanges when key already in sentKeys 2. Removes keys from sentKeys on delete in both filterAndFlipChanges and trackSentKeys 3. Updates test expectation to reflect correct behavior (2 events instead of 3) Root cause: Multiple subscriptions or sync mechanisms could send duplicate insert events for the same key, causing D2 to track multiplicity > 1. * fix: add D2 input level deduplication to prevent multiplicity > 1 The previous fix in CollectionSubscription.filterAndFlipChanges was only catching duplicates at the subscription level. But each live query has its own CollectionSubscriber with its own D2 pipeline. This fix adds a sentToD2Keys set in CollectionSubscriber to track which keys have been sent to the D2 input, preventing duplicate inserts at the D2 level regardless of which code path triggers them. Also clears the tracking on truncate events. * docs: add detailed changeset for delete fix * ci: apply automated fixes * chore: remove debug logging from D2 pipeline and subscription code Remove all TanStack-DB-DEBUG console statements that were added during investigation of the deleted items not disappearing from live queries bug. The fix for duplicate D2 inserts is preserved - just removing the verbose debug output now that the issue is resolved. * debug: add logging to trace source of duplicate D2 inserts Add targeted debug logging to understand where duplicate inserts originate: 1. recomputeOptimisticState: Track what events are generated and when 2. CollectionSubscription.filterAndFlipChanges: Trace filtering decisions 3. CollectionSubscriber.sendChangesToPipeline: Track D2-level deduplication This will help determine if duplicates come from: - Multiple calls to recomputeOptimisticState for the same key - Overlap between initial snapshot and change events - Multiple code paths feeding the D2 pipeline * ci: apply automated fixes * fix: prevent race condition in snapshot loading by adding keys to sentKeys before callback The race condition occurred because snapshot methods (requestSnapshot, requestLimitedSnapshot) added keys to sentKeys AFTER calling the callback, while filterAndFlipChanges added keys BEFORE. If a change event arrived during callback execution, it would not see the keys in sentKeys yet, allowing duplicate inserts. Changes: - Add keys to sentKeys BEFORE calling callback in requestSnapshot and requestLimitedSnapshot - Remove redundant D2-level deduplication (sentToD2Keys) - subscription-level filtering is sufficient - Remove debug logging added during investigation * docs: update changeset to reflect race condition fix * cleanup * simplify changeset --------- Co-authored-by: Claude Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Sam Willis * ci: Version Packages (#1036) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(db): re-request and buffer subsets after truncate for on-demand sync mode (#1043) * fix(db): re-request subsets after truncate for on-demand sync mode When a must-refetch (409) occurs in on-demand sync mode, the collection receives a truncate which clears all data and resets the loadSubset deduplication state. However, subscriptions were not re-requesting their previously loaded subsets, leaving the collection empty. This fix adds a truncate event listener to CollectionSubscription that: 1. Resets pagination/snapshot tracking state (but NOT sentKeys) 2. Re-requests all previously loaded subsets We intentionally keep sentKeys intact because the truncate event is emitted BEFORE delete events are sent to subscribers. If we cleared sentKeys, delete events would be filtered by filterAndFlipChanges. šŸ¤– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 * feat: Buffer subscription changes during truncate This change buffers subscription changes during a truncate event until all loadSubset refetches complete. This prevents a flash of missing content between deletes and new inserts. Co-authored-by: sam.willis * ci: apply automated fixes * changeset * tweaks * test * address review * ci: apply automated fixes --------- Co-authored-by: Igor Barakaiev Co-authored-by: Claude Opus 4.5 Co-authored-by: Cursor Agent Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * ci: Version Packages (#1050) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: prevent duplicate inserts from reaching D2 pipeline in live queries (#1054) * add test * fix * changeset * fix versions * ci: apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * docs: regenerate API documentation (#1051) Co-authored-by: github-actions[bot] * ci: Version Packages (#1055) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Fix slow onInsert awaitMatch performance issue (#1029) * fix(electric): preserve message buffer across batches for awaitMatch The buffer was being cleared at the start of each new batch, which caused messages to be lost when multiple batches arrived before awaitMatch was called. This led to: - awaitMatch timing out (~3-5s per attempt) - Transaction rollbacks when the timeout threw an error The fix removes the buffer clearing between batches. Messages are now preserved until the buffer reaches MAX_BATCH_MESSAGES (1000), at which point the oldest messages are dropped. This ensures awaitMatch can find messages even when heartbeat batches or other sync activity arrives before the API call completes. Added test case for the specific race condition: multiple batches (including heartbeats) arriving while onInsert's API call is in progress. * chore: align query-db-collection versions in examples Update todo examples to use ^1.0.8 to match other examples and fix sherif version consistency check. * chore: align example dependency versions Update todo and paced-mutations-demo examples to use consistent versions: - @tanstack/query-db-collection: ^1.0.11 - @tanstack/react-db: ^0.1.59 --------- Co-authored-by: Claude * Add missing changeset for PR 1029 (#1062) Add changeset for PR #1029 (awaitMatch performance fix) Co-authored-by: Claude * ci: Version Packages (#1063) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * ci: apply automated fixes --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Kyle Mathews Co-authored-by: Claude Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Kevin Co-authored-by: Cursor Agent Co-authored-by: Igor Barakaiev --- .changeset/fix-desc-deletion-partial-page.md | 2 +- .changeset/fix-filter-expression-compile.md | 7 - .changeset/fix-isready-disabled-queries.md | 13 - .changeset/fix-tanstack-db-peerdeps.md | 6 - .github/ISSUE_TEMPLATE/bug_report.md | 6 +- .github/workflows/autofix.yml | 8 +- .github/workflows/claude.yml | 2 +- .github/workflows/docs-sync.yml | 104 - .github/workflows/e2e-tests.yml | 6 +- .github/workflows/pr.yml | 27 +- .github/workflows/release.yml | 9 +- .gitignore | 170 +- .husky/pre-commit | 3 - .pnpmfile.cjs | 25 - .prettierrc | 5 - AGENTS.md | 20 +- docs/collections/query-collection.md | 19 +- docs/framework/angular/overview.md | 2 +- .../reference/functions/injectLiveQuery.md | 72 +- docs/framework/angular/reference/index.md | 4 +- .../interfaces/InjectLiveQueryResult.md | 8 +- docs/framework/react/overview.md | 2 +- .../functions/useLiveInfiniteQuery.md | 8 +- docs/framework/react/reference/index.md | 14 +- docs/framework/solid/overview.md | 2 +- .../solid/reference/functions/useLiveQuery.md | 150 +- docs/framework/solid/reference/index.md | 2 +- docs/framework/svelte/overview.md | 2 +- .../reference/functions/useLiveQuery.md | 414 +++ docs/framework/svelte/reference/index.md | 15 + .../interfaces/UseLiveQueryReturn.md | 125 + .../UseLiveQueryReturnWithCollection.md | 112 + docs/framework/vue/overview.md | 2 +- .../vue/reference/functions/useLiveQuery.md | 96 +- docs/framework/vue/reference/index.md | 6 +- docs/guides/error-handling.md | 6 +- docs/guides/live-queries.md | 4 +- docs/overview.md | 30 +- docs/quick-start.md | 6 +- .../namespaces/IR/classes/Aggregate.md | 2 +- .../namespaces/IR/classes/CollectionRef.md | 2 +- .../@tanstack/namespaces/IR/classes/Func.md | 2 +- .../namespaces/IR/classes/QueryRef.md | 2 +- .../IR/functions/createResidualWhere.md | 4 +- .../namespaces/IR/functions/followRef.md | 8 +- .../IR/functions/getHavingExpression.md | 6 +- .../IR/functions/getWhereExpression.md | 4 +- .../IR/functions/isResidualWhere.md | 2 +- .../@tanstack/namespaces/IR/index.md | 52 +- .../namespaces/IR/interfaces/QueryIR.md | 6 +- .../AggregateFunctionNotInSelectError.md | 22 +- .../classes/AggregateNotSupportedError.md | 22 +- docs/reference/classes/BTreeIndex.md | 126 +- docs/reference/classes/BaseIndex.md | 58 +- docs/reference/classes/BaseQueryBuilder.md | 56 +- .../CannotCombineEmptyExpressionListError.md | 22 +- .../classes/CollectionConfigurationError.md | 26 +- docs/reference/classes/CollectionImpl.md | 126 +- .../classes/CollectionInErrorStateError.md | 18 +- .../classes/CollectionInputNotFoundError.md | 22 +- .../classes/CollectionIsInErrorStateError.md | 18 +- .../classes/CollectionOperationError.md | 37 +- .../classes/CollectionRequiresConfigError.md | 18 +- .../CollectionRequiresSyncConfigError.md | 18 +- .../reference/classes/CollectionStateError.md | 26 +- .../classes/DeduplicatedLoadSubset.md | 2 +- .../classes/DeleteKeyNotFoundError.md | 22 +- .../classes/DistinctRequiresSelectError.md | 22 +- .../classes/DuplicateAliasInSubqueryError.md | 22 +- .../classes/DuplicateDbInstanceError.md | 18 +- docs/reference/classes/DuplicateKeyError.md | 22 +- .../classes/DuplicateKeySyncError.md | 22 +- .../classes/EmptyReferencePathError.md | 22 +- docs/reference/classes/GroupByError.md | 30 +- .../classes/HavingRequiresGroupByError.md | 22 +- docs/reference/classes/IndexProxy.md | 12 +- .../InvalidCollectionStatusTransitionError.md | 18 +- .../reference/classes/InvalidJoinCondition.md | 22 +- .../InvalidJoinConditionLeftSourceError.md | 22 +- .../InvalidJoinConditionRightSourceError.md | 22 +- .../InvalidJoinConditionSameSourceError.md | 22 +- ...InvalidJoinConditionSourceMismatchError.md | 22 +- docs/reference/classes/InvalidKeyError.md | 224 ++ docs/reference/classes/InvalidSchemaError.md | 18 +- docs/reference/classes/InvalidSourceError.md | 22 +- .../classes/InvalidSourceTypeError.md | 22 +- .../classes/InvalidStorageDataFormatError.md | 22 +- .../InvalidStorageObjectFormatError.md | 22 +- .../classes/JoinCollectionNotFoundError.md | 22 +- .../JoinConditionMustBeEqualityError.md | 22 +- docs/reference/classes/JoinError.md | 36 +- .../classes/KeyUpdateNotAllowedError.md | 22 +- docs/reference/classes/LazyIndexWrapper.md | 10 +- .../classes/LimitOffsetRequireOrderByError.md | 22 +- .../classes/LocalStorageCollectionError.md | 28 +- .../classes/MissingAliasInputsError.md | 22 +- .../classes/MissingDeleteHandlerError.md | 22 +- docs/reference/classes/MissingHandlerError.md | 28 +- .../classes/MissingInsertHandlerError.md | 22 +- .../classes/MissingMutationFunctionError.md | 22 +- .../classes/MissingUpdateArgumentError.md | 22 +- .../classes/MissingUpdateHandlerError.md | 22 +- .../classes/NegativeActiveSubscribersError.md | 18 +- .../classes/NoKeysPassedToDeleteError.md | 22 +- .../classes/NoKeysPassedToUpdateError.md | 22 +- .../NoPendingSyncTransactionCommitError.md | 22 +- .../NoPendingSyncTransactionWriteError.md | 22 +- ...NonAggregateExpressionNotInGroupByError.md | 22 +- docs/reference/classes/NonRetriableError.md | 18 +- .../classes/OnMutateMustBeSynchronousError.md | 22 +- .../classes/OnlyOneSourceAllowedError.md | 22 +- docs/reference/classes/QueryBuilderError.md | 34 +- .../classes/QueryCompilationError.md | 50 +- .../classes/QueryMustHaveFromClauseError.md | 22 +- docs/reference/classes/QueryOptimizerError.md | 26 +- .../classes/SchemaMustBeSynchronousError.md | 18 +- .../classes/SchemaValidationError.md | 18 +- docs/reference/classes/SerializationError.md | 22 +- .../classes/SetWindowRequiresOrderByError.md | 22 +- docs/reference/classes/SortedMap.md | 33 +- docs/reference/classes/StorageError.md | 26 +- .../classes/StorageKeyRequiredError.md | 22 +- .../SubQueryMustHaveFromClauseError.md | 22 +- .../classes/SubscriptionNotFoundError.md | 22 +- docs/reference/classes/SyncCleanupError.md | 22 +- .../SyncTransactionAlreadyCommittedError.md | 22 +- ...ncTransactionAlreadyCommittedWriteError.md | 22 +- docs/reference/classes/TanStackDBError.md | 30 +- ...ransactionAlreadyCompletedRollbackError.md | 22 +- docs/reference/classes/TransactionError.md | 40 +- .../TransactionNotPendingCommitError.md | 22 +- .../TransactionNotPendingMutateError.md | 22 +- docs/reference/classes/UndefinedKeyError.md | 18 +- .../classes/UnknownExpressionTypeError.md | 22 +- .../reference/classes/UnknownFunctionError.md | 22 +- .../UnknownHavingExpressionTypeError.md | 22 +- .../UnsupportedAggregateFunctionError.md | 22 +- .../classes/UnsupportedFromTypeError.md | 22 +- .../classes/UnsupportedJoinSourceTypeError.md | 22 +- .../classes/UnsupportedJoinTypeError.md | 22 +- .../classes/UpdateKeyNotFoundError.md | 22 +- .../classes/WhereClauseConversionError.md | 22 +- .../classes/ElectricDBCollectionError.md | 8 +- .../classes/ExpectedNumberInAwaitTxIdError.md | 18 +- .../classes/StreamAbortedError.md | 18 +- .../classes/TimeoutWaitingForMatchError.md | 18 +- .../classes/TimeoutWaitingForTxIdError.md | 18 +- .../functions/electricCollectionOptions.md | 8 +- .../functions/isChangeMessage.md | 46 + .../functions/isControlMessage.md | 48 + .../reference/electric-db-collection/index.md | 22 +- .../interfaces/ElectricCollectionConfig.md | 22 +- .../interfaces/ElectricCollectionUtils.md | 6 +- .../type-aliases/AwaitTxIdFn.md | 4 +- .../type-aliases/Txid.md | 2 +- docs/reference/functions/and.md | 4 +- docs/reference/functions/coalesce.md | 2 +- docs/reference/functions/compileQuery.md | 6 +- docs/reference/functions/concat.md | 2 +- docs/reference/functions/count.md | 2 +- docs/reference/functions/createCollection.md | 48 +- .../functions/createLiveQueryCollection.md | 10 +- .../functions/createOptimisticAction.md | 4 +- .../functions/createPacedMutations.md | 4 +- docs/reference/functions/createTransaction.md | 4 +- docs/reference/functions/debounceStrategy.md | 4 +- docs/reference/functions/deepEquals.md | 45 + docs/reference/functions/eq.md | 8 +- docs/reference/functions/extractFieldPath.md | 2 +- .../functions/extractSimpleComparisons.md | 2 +- .../functions/getActiveTransaction.md | 2 +- docs/reference/functions/gt.md | 8 +- docs/reference/functions/gte.md | 8 +- docs/reference/functions/ilike.md | 2 +- docs/reference/functions/inArray.md | 2 +- docs/reference/functions/isLimitSubset.md | 5 +- docs/reference/functions/isNull.md | 2 +- .../functions/isOffsetLimitSubset.md | 63 + docs/reference/functions/isOrderBySubset.md | 4 +- docs/reference/functions/isPredicateSubset.md | 8 +- docs/reference/functions/isUndefined.md | 2 +- docs/reference/functions/isWhereSubset.md | 4 +- docs/reference/functions/like.md | 2 +- .../functions/liveQueryCollectionOptions.md | 4 +- .../functions/localOnlyCollectionOptions.md | 8 +- .../localStorageCollectionOptions.md | 8 +- docs/reference/functions/lt.md | 8 +- docs/reference/functions/lte.md | 8 +- .../functions/minusWherePredicates.md | 6 +- docs/reference/functions/not.md | 2 +- docs/reference/functions/or.md | 4 +- .../functions/parseLoadSubsetOptions.md | 2 +- .../functions/parseOrderByExpression.md | 4 +- .../functions/parseWhereExpression.md | 2 +- docs/reference/functions/queueStrategy.md | 4 +- docs/reference/functions/throttleStrategy.md | 4 +- .../functions/unionWherePredicates.md | 4 +- docs/reference/index.md | 513 ++-- .../reference/interfaces/BTreeIndexOptions.md | 6 +- .../interfaces/BaseCollectionConfig.md | 34 +- docs/reference/interfaces/BaseStrategy.md | 8 +- docs/reference/interfaces/ChangeMessage.md | 16 +- docs/reference/interfaces/Collection.md | 212 +- docs/reference/interfaces/CollectionConfig.md | 60 +- docs/reference/interfaces/CollectionLike.md | 16 +- .../CreateOptimisticActionsOptions.md | 6 +- .../CurrentStateAsChangesOptions.md | 10 +- docs/reference/interfaces/DebounceStrategy.md | 10 +- docs/reference/interfaces/IndexInterface.md | 8 +- docs/reference/interfaces/IndexOptions.md | 2 +- docs/reference/interfaces/InsertConfig.md | 6 +- .../interfaces/LiveQueryCollectionConfig.md | 4 +- .../interfaces/LocalOnlyCollectionConfig.md | 30 +- .../interfaces/LocalOnlyCollectionUtils.md | 4 +- .../LocalStorageCollectionConfig.md | 54 +- .../interfaces/LocalStorageCollectionUtils.md | 4 +- docs/reference/interfaces/OperationConfig.md | 6 +- .../interfaces/OptimisticChangeMessage.md | 98 - docs/reference/interfaces/PendingMutation.md | 4 +- docs/reference/interfaces/QueueStrategy.md | 10 +- .../reference/interfaces/RangeQueryOptions.md | 10 +- .../interfaces/SubscribeChangesOptions.md | 6 +- .../SubscribeChangesSnapshotOptions.md | 12 +- docs/reference/interfaces/Subscription.md | 16 +- .../interfaces/SubscriptionStatusEvent.md | 2 +- docs/reference/interfaces/SyncConfig.md | 14 +- docs/reference/interfaces/ThrottleStrategy.md | 10 +- docs/reference/interfaces/Transaction.md | 4 +- .../classes/PowerSyncTransactor.md | 2 +- .../functions/powerSyncCollectionOptions.md | 10 +- .../powersync-db-collection/index.md | 30 +- .../BasePowerSyncCollectionConfig.md | 2 +- .../type-aliases/PowerSyncCollectionUtils.md | 2 +- .../type-aliases/SerializerConfig.md | 2 +- .../variables/DEFAULT_BATCH_SIZE.md | 2 +- .../DeleteOperationItemNotFoundError.md | 18 +- .../classes/DuplicateKeyInBatchError.md | 18 +- .../classes/GetKeyRequiredError.md | 18 +- .../classes/InvalidItemStructureError.md | 18 +- .../classes/InvalidSyncOperationError.md | 18 +- .../classes/ItemNotFoundError.md | 18 +- .../classes/MissingKeyFieldError.md | 18 +- .../classes/QueryClientRequiredError.md | 18 +- .../classes/QueryCollectionError.md | 26 +- .../classes/QueryFnRequiredError.md | 18 +- .../classes/QueryKeyRequiredError.md | 18 +- .../classes/SyncNotInitializedError.md | 18 +- .../classes/UnknownOperationTypeError.md | 18 +- .../UpdateOperationItemNotFoundError.md | 18 +- .../functions/queryCollectionOptions.md | 24 +- docs/reference/query-db-collection/index.md | 38 +- .../interfaces/QueryCollectionConfig.md | 22 +- .../interfaces/QueryCollectionUtils.md | 32 +- docs/reference/type-aliases/ChangeListener.md | 4 +- .../ChangeMessageOrDeleteKeyMessage.md | 24 + docs/reference/type-aliases/ChangesPayload.md | 2 +- docs/reference/type-aliases/CleanupFn.md | 2 +- .../CollectionConfigSingleRowOption.md | 4 +- .../type-aliases/CollectionStatus.md | 2 +- .../type-aliases/CursorExpressions.md | 60 + .../type-aliases/DeleteKeyMessage.md | 26 + .../type-aliases/DeleteMutationFn.md | 6 +- .../type-aliases/DeleteMutationFnParams.md | 8 +- docs/reference/type-aliases/GetResult.md | 2 +- .../type-aliases/IndexConstructor.md | 4 +- .../reference/type-aliases/InferResultType.md | 2 +- docs/reference/type-aliases/InputRow.md | 2 +- .../type-aliases/InsertMutationFn.md | 6 +- .../type-aliases/InsertMutationFnParams.md | 8 +- .../type-aliases/KeyedNamespacedRow.md | 2 +- docs/reference/type-aliases/KeyedStream.md | 2 +- docs/reference/type-aliases/LoadSubsetFn.md | 4 +- .../type-aliases/LoadSubsetOptions.md | 39 +- docs/reference/type-aliases/MakeOptional.md | 22 + .../type-aliases/MaybeSingleResult.md | 4 +- docs/reference/type-aliases/MutationFn.md | 2 +- .../type-aliases/NamespacedAndKeyedStream.md | 2 +- docs/reference/type-aliases/NamespacedRow.md | 2 +- .../reference/type-aliases/NonSingleResult.md | 4 +- .../type-aliases/OptimisticChangeMessage.md | 24 + docs/reference/type-aliases/QueryBuilder.md | 2 +- .../type-aliases/ResolveTransactionChanges.md | 2 +- docs/reference/type-aliases/ResultStream.md | 2 +- docs/reference/type-aliases/SingleResult.md | 4 +- docs/reference/type-aliases/StandardSchema.md | 2 +- .../type-aliases/StandardSchemaAlias.md | 2 +- .../reference/type-aliases/StrategyOptions.md | 2 +- docs/reference/type-aliases/SyncConfigRes.md | 8 +- docs/reference/type-aliases/SyncMode.md | 2 +- .../type-aliases/TransactionWithMutations.md | 2 +- docs/reference/type-aliases/UnloadSubsetFn.md | 4 +- .../type-aliases/UpdateMutationFn.md | 6 +- .../type-aliases/UpdateMutationFnParams.md | 8 +- docs/reference/type-aliases/WritableDeep.md | 2 +- eslint.config.js | 26 +- examples/angular/todos/.postcssrc.json | 3 +- examples/angular/todos/package.json | 34 +- examples/angular/todos/src/app/app.config.ts | 8 +- examples/angular/todos/src/app/app.routes.ts | 4 +- examples/angular/todos/src/app/app.ts | 36 +- .../todos/src/collections/todos-collection.ts | 14 +- examples/angular/todos/src/main.ts | 8 +- examples/angular/todos/src/styles.css | 4 +- examples/angular/todos/tailwind.config.js | 8 - .../react/offline-transactions/package.json | 27 +- .../offline-transactions/postcss.config.mjs | 6 - .../src/components/DefaultCatchBoundary.tsx | 4 +- .../src/components/NotFound.tsx | 2 +- .../src/components/TodoDemo.tsx | 8 +- .../offline-transactions/src/db/todos.ts | 40 +- .../offline-transactions/src/routeTree.gen.ts | 138 +- .../react/offline-transactions/src/router.tsx | 10 +- .../src/routes/__root.tsx | 18 +- .../src/routes/api/todos.$todoId.ts | 12 +- .../src/routes/api/todos.ts | 10 +- .../src/routes/api/users.$userId.ts | 8 +- .../src/routes/api/users.ts | 10 +- .../offline-transactions/src/routes/index.tsx | 2 +- .../src/routes/indexeddb.tsx | 8 +- .../src/routes/localstorage.tsx | 8 +- .../offline-transactions/src/styles/app.css | 4 +- .../src/utils/loggingMiddleware.tsx | 2 +- .../src/utils/queryClient.ts | 2 +- .../offline-transactions/src/utils/todos.ts | 2 +- .../offline-transactions/tailwind.config.mjs | 4 - .../react/offline-transactions/vite.config.ts | 16 +- .../react/paced-mutations-demo/package.json | 18 +- .../react/paced-mutations-demo/src/App.tsx | 16 +- .../react/paced-mutations-demo/src/index.css | 10 +- .../react/paced-mutations-demo/src/main.tsx | 10 +- .../react/paced-mutations-demo/vite.config.ts | 4 +- examples/react/projects/.env.example | 2 +- examples/react/projects/README.md | 32 +- examples/react/projects/docker-compose.yaml | 4 +- examples/react/projects/drizzle.config.ts | 4 +- examples/react/projects/eslint.config.mjs | 38 +- examples/react/projects/package.json | 36 +- examples/react/projects/src/db/auth-schema.ts | 82 +- examples/react/projects/src/db/connection.ts | 4 +- .../src/db/out/meta/0000_snapshot.json | 50 +- .../projects/src/db/out/meta/_journal.json | 2 +- examples/react/projects/src/db/schema.ts | 26 +- .../react/projects/src/lib/auth-client.ts | 2 +- examples/react/projects/src/lib/auth.ts | 16 +- .../react/projects/src/lib/collections.ts | 22 +- .../react/projects/src/lib/trpc-client.ts | 8 +- examples/react/projects/src/lib/trpc.ts | 8 +- .../react/projects/src/lib/trpc/projects.ts | 22 +- examples/react/projects/src/lib/trpc/todos.ts | 18 +- examples/react/projects/src/lib/trpc/users.ts | 14 +- examples/react/projects/src/router.tsx | 6 +- examples/react/projects/src/routes/__root.tsx | 8 +- .../projects/src/routes/_authenticated.tsx | 10 +- .../src/routes/_authenticated/index.tsx | 10 +- .../_authenticated/project/$projectId.tsx | 12 +- .../react/projects/src/routes/api/auth.ts | 4 +- .../react/projects/src/routes/api/trpc/$.ts | 16 +- examples/react/projects/src/routes/login.tsx | 8 +- examples/react/projects/src/start.tsx | 2 +- examples/react/projects/src/styles.css | 8 +- examples/react/projects/vite.config.ts | 10 +- examples/react/todo/docker-compose.yml | 10 +- examples/react/todo/drizzle.config.ts | 2 +- examples/react/todo/package.json | 36 +- examples/react/todo/scripts/migrate.ts | 8 +- examples/react/todo/src/api/server.ts | 12 +- .../react/todo/src/components/NotFound.tsx | 2 +- .../react/todo/src/components/TodoApp.tsx | 18 +- examples/react/todo/src/db/index.ts | 6 +- examples/react/todo/src/db/postgres.ts | 2 +- examples/react/todo/src/db/schema.ts | 2 +- examples/react/todo/src/db/validation.ts | 6 +- examples/react/todo/src/index.css | 4 +- examples/react/todo/src/lib/api.ts | 20 +- examples/react/todo/src/lib/collections.ts | 42 +- examples/react/todo/src/main.tsx | 12 +- examples/react/todo/src/router.tsx | 8 +- examples/react/todo/src/routes/__root.tsx | 6 +- .../react/todo/src/routes/api/config.$id.ts | 16 +- examples/react/todo/src/routes/api/config.ts | 14 +- .../react/todo/src/routes/api/todos.$id.ts | 16 +- examples/react/todo/src/routes/api/todos.ts | 14 +- examples/react/todo/src/routes/electric.tsx | 22 +- examples/react/todo/src/routes/index.tsx | 4 +- examples/react/todo/src/routes/query.tsx | 22 +- examples/react/todo/src/routes/trailbase.tsx | 14 +- examples/react/todo/src/server.ts | 2 +- examples/react/todo/src/start.tsx | 2 +- examples/react/todo/src/styles.css | 8 +- examples/react/todo/vite.config.ts | 10 +- examples/solid/todo/docker-compose.yml | 10 +- examples/solid/todo/drizzle.config.ts | 2 +- examples/solid/todo/package.json | 30 +- examples/solid/todo/scripts/migrate.ts | 8 +- examples/solid/todo/src/api/server.ts | 12 +- .../solid/todo/src/components/NotFound.tsx | 2 +- .../solid/todo/src/components/TodoApp.tsx | 18 +- examples/solid/todo/src/db/index.ts | 6 +- examples/solid/todo/src/db/postgres.ts | 2 +- examples/solid/todo/src/db/schema.ts | 2 +- examples/solid/todo/src/db/validation.ts | 6 +- examples/solid/todo/src/index.css | 4 +- examples/solid/todo/src/lib/api.ts | 20 +- examples/solid/todo/src/lib/collections.ts | 42 +- examples/solid/todo/src/main.tsx | 10 +- examples/solid/todo/src/router.tsx | 10 +- examples/solid/todo/src/routes/__root.tsx | 4 +- .../solid/todo/src/routes/api/config.$id.ts | 16 +- examples/solid/todo/src/routes/api/config.ts | 14 +- .../solid/todo/src/routes/api/todos.$id.ts | 16 +- examples/solid/todo/src/routes/api/todos.ts | 14 +- examples/solid/todo/src/routes/electric.tsx | 12 +- examples/solid/todo/src/routes/index.tsx | 2 +- examples/solid/todo/src/routes/query.tsx | 12 +- examples/solid/todo/src/routes/trailbase.tsx | 12 +- examples/solid/todo/src/styles.css | 8 +- examples/solid/todo/vite.config.ts | 10 +- package.json | 51 +- packages/angular-db/CHANGELOG.md | 41 + packages/angular-db/package.json | 51 +- packages/angular-db/src/index.ts | 24 +- .../tests/inject-live-query.test.ts | 68 +- packages/angular-db/tests/test-setup.ts | 10 +- packages/angular-db/vite.config.ts | 8 +- packages/db-collection-e2e/CHANGELOG.md | 9 + packages/db-collection-e2e/README.md | 46 +- .../docker/docker-compose.yml | 11 +- packages/db-collection-e2e/package.json | 6 +- .../src/fixtures/seed-data.ts | 4 +- .../src/fixtures/test-schema.ts | 4 +- packages/db-collection-e2e/src/index.ts | 29 +- .../src/suites/collation.suite.ts | 16 +- .../src/suites/deduplication.suite.ts | 60 +- .../src/suites/joins.suite.ts | 54 +- .../src/suites/live-updates.suite.ts | 30 +- .../src/suites/moves.suite.ts | 756 +++++ .../src/suites/mutations.suite.ts | 28 +- .../src/suites/pagination.suite.ts | 624 +++- .../src/suites/predicates.suite.ts | 128 +- .../src/suites/progressive.suite.ts | 42 +- packages/db-collection-e2e/src/types.ts | 4 +- .../db-collection-e2e/src/utils/assertions.ts | 40 +- .../db-collection-e2e/src/utils/helpers.ts | 24 +- .../db-collection-e2e/support/global-setup.ts | 52 +- .../db-collection-e2e/support/test-context.ts | 52 +- packages/db-collection-e2e/vite.config.ts | 12 +- packages/db-ivm/CHANGELOG.md | 14 +- packages/db-ivm/README.md | 6 +- packages/db-ivm/package.json | 69 +- packages/db-ivm/src/d2.ts | 8 +- packages/db-ivm/src/graph.ts | 12 +- packages/db-ivm/src/hashing/hash.ts | 6 +- packages/db-ivm/src/hashing/index.ts | 4 +- packages/db-ivm/src/index.ts | 9 +- packages/db-ivm/src/indexes.ts | 16 +- packages/db-ivm/src/multiset.ts | 10 +- packages/db-ivm/src/operators/concat.ts | 12 +- packages/db-ivm/src/operators/consolidate.ts | 12 +- packages/db-ivm/src/operators/count.ts | 18 +- packages/db-ivm/src/operators/debug.ts | 16 +- packages/db-ivm/src/operators/distinct.ts | 22 +- packages/db-ivm/src/operators/filter.ts | 16 +- packages/db-ivm/src/operators/filterBy.ts | 14 +- packages/db-ivm/src/operators/groupBy.ts | 44 +- packages/db-ivm/src/operators/index.ts | 38 +- packages/db-ivm/src/operators/join.ts | 46 +- packages/db-ivm/src/operators/keying.ts | 8 +- packages/db-ivm/src/operators/map.ts | 16 +- packages/db-ivm/src/operators/negate.ts | 12 +- packages/db-ivm/src/operators/orderBy.ts | 52 +- packages/db-ivm/src/operators/orderByBTree.ts | 14 +- packages/db-ivm/src/operators/output.ts | 18 +- packages/db-ivm/src/operators/pipe.ts | 2 +- packages/db-ivm/src/operators/reduce.ts | 18 +- packages/db-ivm/src/operators/tap.ts | 16 +- packages/db-ivm/src/operators/topK.ts | 16 +- .../src/operators/topKWithFractionalIndex.ts | 145 +- .../operators/topKWithFractionalIndexBTree.ts | 39 +- packages/db-ivm/src/types.ts | 44 +- packages/db-ivm/src/utils.ts | 23 +- packages/db-ivm/tests/graph.test.ts | 8 +- packages/db-ivm/tests/indexes.test.ts | 4 +- packages/db-ivm/tests/multiset.test.ts | 4 +- .../db-ivm/tests/operators/concat.test.ts | 32 +- .../tests/operators/consolidate.test.ts | 30 +- packages/db-ivm/tests/operators/count.test.ts | 42 +- packages/db-ivm/tests/operators/debug.test.ts | 20 +- .../db-ivm/tests/operators/distinct.test.ts | 46 +- .../db-ivm/tests/operators/filter.test.ts | 20 +- .../db-ivm/tests/operators/filterBy.test.ts | 44 +- .../db-ivm/tests/operators/groupBy.test.ts | 96 +- .../db-ivm/tests/operators/join-types.test.ts | 90 +- packages/db-ivm/tests/operators/join.test.ts | 66 +- .../tests/operators/keying-types.test.ts | 10 +- .../db-ivm/tests/operators/keying.test.ts | 10 +- packages/db-ivm/tests/operators/map.test.ts | 20 +- .../db-ivm/tests/operators/negate.test.ts | 24 +- .../db-ivm/tests/operators/orderBy.test.ts | 58 +- .../orderByWithFractionalIndex.test.ts | 128 +- .../tests/operators/orderByWithIndex.test.ts | 60 +- .../db-ivm/tests/operators/output.test.ts | 16 +- packages/db-ivm/tests/operators/pipe.test.ts | 14 +- .../db-ivm/tests/operators/reduce.test.ts | 96 +- packages/db-ivm/tests/operators/topK.test.ts | 64 +- .../operators/topKWithFractionalIndex.test.ts | 218 +- .../tests/operators/topKWithIndex.test.ts | 58 +- packages/db-ivm/tests/test-utils.ts | 40 +- packages/db-ivm/tests/utils.test.ts | 6 +- packages/db-ivm/vite.config.ts | 8 +- packages/db/CHANGELOG.md | 174 +- packages/db/package.json | 71 +- packages/db/src/SortedMap.ts | 81 +- packages/db/src/collection/change-events.ts | 40 +- packages/db/src/collection/changes.ts | 28 +- packages/db/src/collection/events.ts | 30 +- packages/db/src/collection/index.ts | 93 +- packages/db/src/collection/indexes.ts | 28 +- packages/db/src/collection/lifecycle.ts | 32 +- packages/db/src/collection/mutations.ts | 45 +- packages/db/src/collection/state.ts | 79 +- packages/db/src/collection/subscription.ts | 425 ++- packages/db/src/collection/sync.ts | 56 +- packages/db/src/duplicate-instance-check.ts | 2 +- packages/db/src/errors.ts | 89 +- packages/db/src/event-emitter.ts | 10 +- packages/db/src/index.ts | 41 +- packages/db/src/indexes/auto-index.ts | 22 +- packages/db/src/indexes/base-index.ts | 26 +- packages/db/src/indexes/btree-index.ts | 38 +- packages/db/src/indexes/index-options.ts | 6 +- packages/db/src/indexes/lazy-index.ts | 16 +- packages/db/src/indexes/reverse-index.ts | 10 +- packages/db/src/local-only.ts | 24 +- packages/db/src/local-storage.ts | 34 +- packages/db/src/optimistic-action.ts | 10 +- packages/db/src/paced-mutations.ts | 12 +- packages/db/src/proxy.ts | 86 +- packages/db/src/query/builder/functions.ts | 56 +- packages/db/src/query/builder/index.ts | 44 +- packages/db/src/query/builder/ref-proxy.ts | 8 +- packages/db/src/query/builder/types.ts | 16 +- packages/db/src/query/compiler/evaluators.ts | 18 +- packages/db/src/query/compiler/expressions.ts | 12 +- packages/db/src/query/compiler/group-by.ts | 48 +- packages/db/src/query/compiler/index.ts | 88 +- packages/db/src/query/compiler/joins.ts | 74 +- packages/db/src/query/compiler/order-by.ts | 247 +- packages/db/src/query/compiler/select.ts | 26 +- packages/db/src/query/compiler/types.ts | 4 +- packages/db/src/query/expression-helpers.ts | 32 +- packages/db/src/query/index.ts | 19 +- packages/db/src/query/ir.ts | 26 +- .../db/src/query/live-query-collection.ts | 30 +- .../query/live/collection-config-builder.ts | 106 +- .../db/src/query/live/collection-registry.ts | 12 +- .../src/query/live/collection-subscriber.ts | 171 +- packages/db/src/query/live/internal.ts | 2 +- packages/db/src/query/live/types.ts | 8 +- packages/db/src/query/optimizer.ts | 58 +- packages/db/src/query/predicate-utils.ts | 155 +- packages/db/src/query/subset-dedupe.ts | 12 +- packages/db/src/scheduler.ts | 6 +- .../db/src/strategies/debounceStrategy.ts | 12 +- packages/db/src/strategies/index.ts | 8 +- packages/db/src/strategies/queueStrategy.ts | 10 +- .../db/src/strategies/throttleStrategy.ts | 12 +- packages/db/src/strategies/types.ts | 4 +- packages/db/src/transactions.ts | 18 +- packages/db/src/types.ts | 94 +- packages/db/src/utils.ts | 8 +- packages/db/src/utils/array-utils.ts | 2 +- packages/db/src/utils/browser-polyfills.ts | 4 +- packages/db/src/utils/btree.ts | 44 +- packages/db/src/utils/comparison.ts | 6 +- packages/db/src/utils/cursor.ts | 78 + packages/db/src/utils/index-optimization.ts | 28 +- packages/db/tests/SortedMap.test.ts | 4 +- packages/db/tests/apply-mutations.test.ts | 6 +- .../db/tests/collection-auto-index.test.ts | 40 +- .../db/tests/collection-change-events.test.ts | 40 +- packages/db/tests/collection-errors.test.ts | 61 +- packages/db/tests/collection-events.test.ts | 8 +- packages/db/tests/collection-getters.test.ts | 20 +- packages/db/tests/collection-indexes.test.ts | 80 +- .../db/tests/collection-lifecycle.test.ts | 4 +- packages/db/tests/collection-schema.test.ts | 56 +- .../collection-subscribe-changes.test.ts | 56 +- ...ction-subscriber-duplicate-inserts.test.ts | 452 +++ .../db/tests/collection-subscription.test.ts | 6 +- packages/db/tests/collection-truncate.test.ts | 434 ++- packages/db/tests/collection.test-d.ts | 10 +- packages/db/tests/collection.test.ts | 314 +- packages/db/tests/cursor.test.ts | 226 ++ packages/db/tests/deferred.test.ts | 6 +- .../db/tests/deterministic-ordering.test.ts | 398 +++ packages/db/tests/errors.test.ts | 4 +- .../uint8array-id-comparison.test.ts | 26 +- packages/db/tests/local-only.test-d.ts | 22 +- packages/db/tests/local-only.test.ts | 50 +- packages/db/tests/local-storage.test-d.ts | 28 +- packages/db/tests/local-storage.test.ts | 138 +- packages/db/tests/optimistic-action.test.ts | 12 +- packages/db/tests/paced-mutations.test.ts | 12 +- packages/db/tests/proxy.test.ts | 18 +- packages/db/tests/query/basic.test-d.ts | 28 +- packages/db/tests/query/basic.test.ts | 35 +- .../db/tests/query/builder/buildQuery.test.ts | 22 +- .../query/builder/callback-types.test-d.ts | 58 +- packages/db/tests/query/builder/from.test.ts | 18 +- .../query/builder/functional-variants.test.ts | 22 +- .../db/tests/query/builder/functions.test.ts | 12 +- .../db/tests/query/builder/group-by.test.ts | 8 +- packages/db/tests/query/builder/join.test.ts | 52 +- .../db/tests/query/builder/order-by.test.ts | 10 +- .../db/tests/query/builder/ref-proxy.test.ts | 10 +- .../db/tests/query/builder/select.test.ts | 8 +- .../tests/query/builder/subqueries.test-d.ts | 20 +- packages/db/tests/query/builder/where.test.ts | 16 +- .../db/tests/query/compiler/basic.test.ts | 36 +- .../tests/query/compiler/evaluators.test.ts | 44 +- .../db/tests/query/compiler/group-by.test.ts | 14 +- .../db/tests/query/compiler/select.test.ts | 8 +- .../tests/query/compiler/subqueries.test.ts | 42 +- .../query/compiler/subquery-caching.test.ts | 32 +- packages/db/tests/query/composables.test.ts | 32 +- packages/db/tests/query/distinct.test.ts | 55 +- .../db/tests/query/expression-helpers.test.ts | 16 +- .../db/tests/query/findone-joins.test-d.ts | 34 +- .../tests/query/functional-variants.test-d.ts | 24 +- .../tests/query/functional-variants.test.ts | 22 +- packages/db/tests/query/group-by.test-d.ts | 16 +- packages/db/tests/query/group-by.test.ts | 58 +- packages/db/tests/query/indexes.test.ts | 52 +- .../db/tests/query/join-subquery.test-d.ts | 28 +- packages/db/tests/query/join-subquery.test.ts | 54 +- packages/db/tests/query/join.test-d.ts | 84 +- packages/db/tests/query/join.test.ts | 154 +- .../tests/query/live-query-collection.test.ts | 244 +- .../db/tests/query/nested-props.test-d.ts | 16 +- .../optimistic-delete-with-limit.test.ts | 596 ++++ packages/db/tests/query/optimizer.test.ts | 153 +- .../query/optional-fields-negative.test-d.ts | 16 +- .../query/optional-fields-runtime.test.ts | 16 +- packages/db/tests/query/order-by.test.ts | 437 ++- .../db/tests/query/predicate-utils.test.ts | 359 ++- .../tests/query/query-while-syncing.test.ts | 18 +- packages/db/tests/query/scheduler.test.ts | 38 +- .../db/tests/query/select-spread.test-d.ts | 12 +- packages/db/tests/query/select-spread.test.ts | 36 +- packages/db/tests/query/select.test-d.ts | 18 +- packages/db/tests/query/select.test.ts | 18 +- packages/db/tests/query/subquery.test-d.ts | 10 +- packages/db/tests/query/subquery.test.ts | 16 +- packages/db/tests/query/subset-dedupe.test.ts | 18 +- .../db/tests/query/validate-aliases.test.ts | 20 +- packages/db/tests/query/where.test.ts | 98 +- packages/db/tests/test-setup.ts | 2 +- packages/db/tests/transaction-types.test.ts | 6 +- packages/db/tests/transactions.test.ts | 14 +- packages/db/tests/utility-exposure.test.ts | 8 +- packages/db/tests/utils.test.ts | 8 +- packages/db/tests/utils.ts | 14 +- packages/db/vite.config.ts | 8 +- packages/electric-db-collection/CHANGELOG.md | 128 +- .../e2e/electric.e2e.test.ts | 75 +- packages/electric-db-collection/package.json | 75 +- .../electric-db-collection/src/electric.ts | 562 +++- packages/electric-db-collection/src/errors.ts | 2 +- packages/electric-db-collection/src/index.ts | 6 +- .../src/sql-compiler.ts | 179 +- .../electric-db-collection/src/tag-index.ts | 160 ++ .../tests/electric-live-query.test.ts | 67 +- .../tests/electric.test-d.ts | 28 +- .../tests/electric.test.ts | 714 ++++- .../tests/pg-serializer.test.ts | 12 +- .../tests/sql-compiler.test.ts | 312 ++ .../electric-db-collection/tests/tags.test.ts | 1241 ++++++++ .../electric-db-collection/vite.config.ts | 8 +- .../vitest.e2e.config.ts | 2 +- packages/offline-transactions/CHANGELOG.md | 45 +- packages/offline-transactions/README.md | 28 +- packages/offline-transactions/package.json | 37 +- .../src/OfflineExecutor.ts | 52 +- .../src/api/OfflineAction.ts | 12 +- .../src/api/OfflineTransaction.ts | 12 +- .../src/connectivity/OnlineDetector.ts | 4 +- .../coordination/BroadcastChannelLeader.ts | 2 +- .../src/coordination/LeaderElection.ts | 2 +- .../src/coordination/WebLocksLeader.ts | 6 +- .../src/executor/KeyScheduler.ts | 24 +- .../src/executor/TransactionExecutor.ts | 44 +- packages/offline-transactions/src/index.ts | 32 +- .../src/outbox/OutboxManager.ts | 34 +- .../src/outbox/TransactionSerializer.ts | 14 +- .../src/retry/NonRetriableError.ts | 2 +- .../src/retry/RetryPolicy.ts | 6 +- .../src/storage/IndexedDBAdapter.ts | 6 +- .../src/storage/LocalStorageAdapter.ts | 6 +- .../src/storage/StorageAdapter.ts | 2 +- .../src/telemetry/tracer.ts | 6 +- packages/offline-transactions/src/types.ts | 6 +- .../tests/OfflineExecutor.test.ts | 8 +- .../offline-transactions/tests/harness.ts | 16 +- .../tests/leader-failover.test.ts | 10 +- .../tests/offline-e2e.test.ts | 24 +- packages/offline-transactions/tests/setup.ts | 2 +- .../tests/storage-failure.test.ts | 26 +- packages/offline-transactions/vite.config.ts | 8 +- .../offline-transactions/vitest.config.ts | 2 +- packages/powersync-db-collection/CHANGELOG.md | 35 + packages/powersync-db-collection/package.json | 81 +- .../src/PendingOperationStore.ts | 6 +- .../src/PowerSyncTransactor.ts | 56 +- .../src/definitions.ts | 10 +- .../powersync-db-collection/src/helpers.ts | 4 +- packages/powersync-db-collection/src/index.ts | 6 +- .../powersync-db-collection/src/powersync.ts | 56 +- .../powersync-db-collection/src/schema.ts | 14 +- .../src/serialization.ts | 14 +- .../tests/collection-schema.test.ts | 32 +- .../tests/powersync.test.ts | 79 +- .../tests/schema.test.ts | 8 +- .../powersync-db-collection/vite.config.ts | 8 +- packages/query-db-collection/CHANGELOG.md | 115 +- .../query-db-collection/e2e/query-filter.ts | 57 +- .../query-db-collection/e2e/query.e2e.test.ts | 26 +- packages/query-db-collection/package.json | 67 +- packages/query-db-collection/src/errors.ts | 4 +- packages/query-db-collection/src/global.ts | 4 +- packages/query-db-collection/src/index.ts | 8 +- .../query-db-collection/src/manual-sync.ts | 35 +- packages/query-db-collection/src/query.ts | 173 +- .../query-db-collection/src/serialization.ts | 15 +- .../query-db-collection/tests/query.test-d.ts | 24 +- .../query-db-collection/tests/query.test.ts | 361 ++- packages/query-db-collection/vite.config.ts | 8 +- .../query-db-collection/vitest.e2e.config.ts | 2 +- packages/react-db/CHANGELOG.md | 55 +- packages/react-db/package.json | 55 +- packages/react-db/src/index.ts | 14 +- packages/react-db/src/useLiveInfiniteQuery.ts | 28 +- packages/react-db/src/useLiveQuery.ts | 38 +- packages/react-db/src/useLiveSuspenseQuery.ts | 18 +- packages/react-db/src/usePacedMutations.ts | 8 +- packages/react-db/tests/test-setup.ts | 6 +- .../tests/useLiveInfiniteQuery.test.tsx | 150 +- .../react-db/tests/useLiveQuery.test-d.tsx | 24 +- packages/react-db/tests/useLiveQuery.test.tsx | 152 +- .../tests/useLiveSuspenseQuery.test.tsx | 88 +- .../react-db/tests/usePacedMutations.test.tsx | 26 +- packages/react-db/vite.config.ts | 8 +- packages/rxdb-db-collection/CHANGELOG.md | 35 + packages/rxdb-db-collection/package.json | 81 +- packages/rxdb-db-collection/src/index.ts | 4 +- packages/rxdb-db-collection/src/rxdb.ts | 38 +- .../rxdb-db-collection/tests/rxdb.test.ts | 30 +- packages/rxdb-db-collection/vite.config.ts | 8 +- packages/solid-db/CHANGELOG.md | 41 + packages/solid-db/package.json | 51 +- packages/solid-db/src/index.ts | 8 +- packages/solid-db/src/useLiveQuery.ts | 36 +- packages/solid-db/tests/test-setup.ts | 6 +- packages/solid-db/tests/useLiveQuery.test.tsx | 109 +- packages/solid-db/vite.config.ts | 10 +- packages/svelte-db/CHANGELOG.md | 41 + packages/svelte-db/package.json | 67 +- packages/svelte-db/src/index.ts | 8 +- packages/svelte-db/src/useLiveQuery.svelte.ts | 24 +- packages/svelte-db/svelte.config.js | 2 +- .../tests/useLiveQuery.svelte.test.ts | 92 +- packages/svelte-db/tsconfig.json | 1 - packages/svelte-db/vite.config.ts | 6 +- packages/trailbase-db-collection/CHANGELOG.md | 47 +- packages/trailbase-db-collection/package.json | 71 +- .../trailbase-db-collection/src/errors.ts | 2 +- packages/trailbase-db-collection/src/index.ts | 4 +- .../trailbase-db-collection/src/trailbase.ts | 28 +- .../tests/trailbase.test.ts | 24 +- .../trailbase-db-collection/vite.config.ts | 8 +- packages/vue-db/CHANGELOG.md | 41 + packages/vue-db/package.json | 43 +- packages/vue-db/src/index.ts | 8 +- packages/vue-db/src/useLiveQuery.ts | 28 +- packages/vue-db/tests/useLiveQuery.test.ts | 96 +- packages/vue-db/vite.config.ts | 10 +- pnpm-lock.yaml | 2544 +++++------------ pnpm-workspace.yaml | 2 +- prettier.config.js | 10 + scripts/{generateDocs.ts => generate-docs.ts} | 46 +- scripts/verify-links.ts | 110 +- tsconfig.json | 4 +- 791 files changed, 20236 insertions(+), 11449 deletions(-) delete mode 100644 .changeset/fix-filter-expression-compile.md delete mode 100644 .changeset/fix-isready-disabled-queries.md delete mode 100644 .changeset/fix-tanstack-db-peerdeps.md delete mode 100644 .github/workflows/docs-sync.yml delete mode 100644 .pnpmfile.cjs delete mode 100644 .prettierrc create mode 100644 docs/framework/svelte/reference/functions/useLiveQuery.md create mode 100644 docs/framework/svelte/reference/index.md create mode 100644 docs/framework/svelte/reference/interfaces/UseLiveQueryReturn.md create mode 100644 docs/framework/svelte/reference/interfaces/UseLiveQueryReturnWithCollection.md create mode 100644 docs/reference/classes/InvalidKeyError.md create mode 100644 docs/reference/electric-db-collection/functions/isChangeMessage.md create mode 100644 docs/reference/electric-db-collection/functions/isControlMessage.md create mode 100644 docs/reference/functions/deepEquals.md create mode 100644 docs/reference/functions/isOffsetLimitSubset.md delete mode 100644 docs/reference/interfaces/OptimisticChangeMessage.md create mode 100644 docs/reference/type-aliases/ChangeMessageOrDeleteKeyMessage.md create mode 100644 docs/reference/type-aliases/CursorExpressions.md create mode 100644 docs/reference/type-aliases/DeleteKeyMessage.md create mode 100644 docs/reference/type-aliases/MakeOptional.md create mode 100644 docs/reference/type-aliases/OptimisticChangeMessage.md delete mode 100644 examples/angular/todos/tailwind.config.js delete mode 100644 examples/react/offline-transactions/postcss.config.mjs delete mode 100644 examples/react/offline-transactions/tailwind.config.mjs create mode 100644 packages/db-collection-e2e/src/suites/moves.suite.ts create mode 100644 packages/db/src/utils/cursor.ts create mode 100644 packages/db/tests/collection-subscriber-duplicate-inserts.test.ts create mode 100644 packages/db/tests/cursor.test.ts create mode 100644 packages/db/tests/deterministic-ordering.test.ts create mode 100644 packages/db/tests/query/optimistic-delete-with-limit.test.ts create mode 100644 packages/electric-db-collection/src/tag-index.ts create mode 100644 packages/electric-db-collection/tests/sql-compiler.test.ts create mode 100644 packages/electric-db-collection/tests/tags.test.ts create mode 100644 prettier.config.js rename scripts/{generateDocs.ts => generate-docs.ts} (71%) diff --git a/.changeset/fix-desc-deletion-partial-page.md b/.changeset/fix-desc-deletion-partial-page.md index 1c599b6fe..c4c65740a 100644 --- a/.changeset/fix-desc-deletion-partial-page.md +++ b/.changeset/fix-desc-deletion-partial-page.md @@ -1,5 +1,5 @@ --- -"@tanstack/db": patch +'@tanstack/db': patch --- Fix useLiveInfiniteQuery not updating when deleting an item from a partial page with DESC order. diff --git a/.changeset/fix-filter-expression-compile.md b/.changeset/fix-filter-expression-compile.md deleted file mode 100644 index 8d637937e..000000000 --- a/.changeset/fix-filter-expression-compile.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@tanstack/db": patch ---- - -fix(db): compile filter expression once in createFilterFunctionFromExpression - -Fixed a performance issue in `createFilterFunctionFromExpression` where the expression was being recompiled on every filter call. This only affected realtime change event filtering for pushed-down predicates at the collection level when using orderBy + limit. The core query engine was not affected as it already compiled predicates once. diff --git a/.changeset/fix-isready-disabled-queries.md b/.changeset/fix-isready-disabled-queries.md deleted file mode 100644 index 132902238..000000000 --- a/.changeset/fix-isready-disabled-queries.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"@tanstack/react-db": patch -"@tanstack/solid-db": patch -"@tanstack/vue-db": patch -"@tanstack/svelte-db": patch -"@tanstack/angular-db": patch ---- - -Fixed `isReady` to return `true` for disabled queries in `useLiveQuery`/`injectLiveQuery` across all framework packages. When a query function returns `null` or `undefined` (disabling the query), there's no async operation to wait for, so the hook should be considered "ready" immediately. - -Additionally, all frameworks now have proper TypeScript overloads that explicitly support returning `undefined | null` from query functions, making the disabled query pattern type-safe. - -This fixes the common pattern where users conditionally enable queries and don't want to show loading states when the query is disabled. diff --git a/.changeset/fix-tanstack-db-peerdeps.md b/.changeset/fix-tanstack-db-peerdeps.md deleted file mode 100644 index 26b0248bb..000000000 --- a/.changeset/fix-tanstack-db-peerdeps.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@tanstack/query-db-collection": patch -"@tanstack/offline-transactions": patch ---- - -Use regular dependency for @tanstack/db instead of peerDependency to match the standard pattern used by other TanStack DB packages and prevent duplicate installations diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 8fbf8f760..b39f31408 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,9 +1,9 @@ --- name: šŸ› Bug Report about: Create a report to help us improve -title: "" -labels: "" -assignees: "" +title: '' +labels: '' +assignees: '' --- - [ ] I've validated the bug against the latest version of DB packages diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index d783ef32d..e98a12985 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -18,16 +18,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5.0.1 + uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - name: Setup Tools uses: tanstack/config/.github/setup@main - name: Fix formatting - run: pnpm prettier --ignore-unknown . --check - - name: Run ESLint - run: pnpm run lint + run: pnpm format - name: Apply fixes uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 with: - commit-message: "ci: apply automated fixes" + commit-message: 'ci: apply automated fixes' diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 72623ed4d..c4bb5e220 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -18,7 +18,7 @@ jobs: actions: read # Required for Claude to read CI results on PRs steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.1 with: fetch-depth: 0 # required for Claude Code - uses: anthropics/claude-code-action@v1 diff --git a/.github/workflows/docs-sync.yml b/.github/workflows/docs-sync.yml deleted file mode 100644 index fdbcb9ba2..000000000 --- a/.github/workflows/docs-sync.yml +++ /dev/null @@ -1,104 +0,0 @@ -name: Sync Generated Docs - -on: - schedule: - # Run daily at 2 AM UTC - - cron: "0 2 * * *" - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -permissions: - contents: write - pull-requests: write - -jobs: - sync-docs: - name: Generate and Sync Docs - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v5.0.1 - with: - fetch-depth: 0 - - - name: Setup Tools - uses: tanstack/config/.github/setup@main - - - name: Build Packages - run: pnpm run build - - - name: Generate Docs - run: pnpm docs:generate - - - name: Check for changes - id: check_changes - run: | - if [ -n "$(git status --porcelain)" ]; then - echo "has_changes=true" >> $GITHUB_OUTPUT - echo "Changes detected in generated docs" - else - echo "has_changes=false" >> $GITHUB_OUTPUT - echo "No changes in generated docs" - fi - - - name: Configure Git - if: steps.check_changes.outputs.has_changes == 'true' - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - - - name: Commit and Push Changes - if: steps.check_changes.outputs.has_changes == 'true' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - BRANCH_NAME="docs/auto-generate" - - # Check if branch exists remotely - if git ls-remote --exit-code --heads origin $BRANCH_NAME; then - echo "Branch exists, checking out and updating" - git fetch origin $BRANCH_NAME - git checkout $BRANCH_NAME - git pull origin $BRANCH_NAME - else - echo "Creating new branch" - git checkout -b $BRANCH_NAME - fi - - # Stage and commit changes - git add docs/ - git commit -m "docs: regenerate API documentation - - Auto-generated by daily docs sync workflow" - - # Push changes - git push origin $BRANCH_NAME - - - name: Create or Update PR - if: steps.check_changes.outputs.has_changes == 'true' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - BRANCH_NAME="docs/auto-generate" - - # Check if PR already exists - existing_pr=$(gh pr list --head $BRANCH_NAME --json number --jq '.[0].number') - - if [ -n "$existing_pr" ]; then - echo "PR #$existing_pr already exists, it has been updated with the latest changes" - gh pr comment $existing_pr --body "Updated with latest generated docs from scheduled workflow run." - else - echo "Creating new PR" - gh pr create \ - --title "docs: sync generated API documentation" \ - --body "This PR was automatically created by the daily docs sync workflow. - - The generated API documentation has been updated to reflect the latest changes in the codebase. - - **Generated by**: [Docs Sync Workflow](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) - - Please review and merge if the changes look correct." \ - --head $BRANCH_NAME \ - --base main - fi diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 2c5ac83b0..e1442c739 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.1 - name: Setup pnpm uses: pnpm/action-setup@v4 @@ -23,8 +23,8 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: "20" - cache: "pnpm" + node-version: '20' + cache: 'pnpm' - name: Install dependencies run: pnpm install --frozen-lockfile diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 9d789f762..a04e0c347 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5.0.1 + uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - name: Setup Tools @@ -33,13 +33,13 @@ jobs: with: main-branch-name: main - name: Run Checks - run: pnpm run build && pnpm run test + run: pnpm run build && pnpm run test && pnpm run test:sherif preview: name: Preview runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5.0.1 + uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - name: Setup Tools @@ -51,23 +51,23 @@ jobs: - name: Compressed Size Action - DB Package uses: preactjs/compressed-size-action@v2 with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - pattern: "./packages/db/dist/**/*.{js,mjs}" - comment-key: "db-package-size" - build-script: "build:minified" + repo-token: '${{ secrets.GITHUB_TOKEN }}' + pattern: './packages/db/dist/**/*.{js,mjs}' + comment-key: 'db-package-size' + build-script: 'build:minified' - name: Compressed Size Action - React DB Package uses: preactjs/compressed-size-action@v2 with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - pattern: "./packages/react-db/dist/**/*.{js,mjs}" - comment-key: "react-db-package-size" - build-script: "build:minified" + repo-token: '${{ secrets.GITHUB_TOKEN }}' + pattern: './packages/react-db/dist/**/*.{js,mjs}' + comment-key: 'react-db-package-size' + build-script: 'build:minified' build-example: name: Build Example Site runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5.0.1 + uses: actions/checkout@v6.0.1 - name: Setup Tools uses: tanstack/config/.github/setup@main - name: Build Packages @@ -81,7 +81,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5.0.1 + uses: actions/checkout@v6.0.1 - name: Setup Tools uses: tanstack/config/.github/setup@main - name: Build Packages @@ -89,4 +89,5 @@ jobs: - name: Build Starter Site run: | cd examples/react/projects + cp .env.example .env pnpm build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 11042f7b0..2e49cf139 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5.0.1 + uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - name: Setup Tools @@ -36,14 +36,13 @@ jobs: with: version: pnpm run changeset:version publish: pnpm run changeset:publish - commit: "ci: Version Packages" - title: "ci: Version Packages" + commit: 'ci: Version Packages' + title: 'ci: Version Packages' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Generate Docs if: steps.changesets.outputs.published == 'true' - run: pnpm docs:generate + run: pnpm generate-docs - name: Commit Generated Docs if: steps.changesets.outputs.published == 'true' run: | diff --git a/.gitignore b/.gitignore index 9e71f3da7..22096f2e0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,154 +1,44 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* -.pnpm-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json -# Runtime data -pids -*.pid -*.seed -*.pid.lock +# See https://help.github.com/ignore-files/ for more about ignoring files. -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov +# dependencies +node_modules +package-lock.json +yarn.lock -# Coverage directory used by tools like istanbul +# builds +build coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional stylelint cache -.stylelintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity +dist -# dotenv environment variable files +# misc +.DS_Store .env +.env.local .env.development.local .env.test.local .env.production.local -.env.local - -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output .next -out - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and not Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public -# vuepress build output -.vuepress/dist +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.history +size-plugin.json +stats-hydration.json +stats.json +stats.html +.vscode/settings.json -# vuepress v2.x temp and cache directory -.temp +*.log .cache - -# Docusaurus cache and generated files -.docusaurus - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -# Stores VSCode versions used for testing VSCode extensions -.vscode-test - -# yarn v2 -.yarn/cache -.yarn/unplugged -.yarn/build-state.yml -.yarn/install-state.gz -.pnp.* -.DS_Store - -# Added by Task Master AI -dev-debug.log -# Environment variables -# Editor directories and files .idea -.vscode -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? -# OS specific -# Task files -tasks.json -tasks/ - -## Tanstack Start -.nitro -.output -.tanstack -.claude -package-lock.json +.nx/cache +.nx/workspace-data +.pnpm-store +.tsup +.svelte-kit + +vite.config.js.timestamp-* +vite.config.ts.timestamp-* +tsconfig.vitest-temp.json diff --git a/.husky/pre-commit b/.husky/pre-commit index a5a29d9f7..cb2c84d5c 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - pnpm lint-staged diff --git a/.pnpmfile.cjs b/.pnpmfile.cjs deleted file mode 100644 index f154da33d..000000000 --- a/.pnpmfile.cjs +++ /dev/null @@ -1,25 +0,0 @@ -function readPackage(pkg, context) { - // Force all @tanstack/db dependencies to resolve to workspace version - if (pkg.dependencies && pkg.dependencies["@tanstack/db"]) { - pkg.dependencies["@tanstack/db"] = "workspace:*" - context.log(`Overriding @tanstack/db dependency in ${pkg.name}`) - } - - if (pkg.devDependencies && pkg.devDependencies["@tanstack/db"]) { - pkg.devDependencies["@tanstack/db"] = "workspace:*" - context.log(`Overriding @tanstack/db devDependency in ${pkg.name}`) - } - - if (pkg.peerDependencies && pkg.peerDependencies["@tanstack/db"]) { - pkg.peerDependencies["@tanstack/db"] = "workspace:*" - context.log(`Overriding @tanstack/db peerDependency in ${pkg.name}`) - } - - return pkg -} - -module.exports = { - hooks: { - readPackage, - }, -} diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index eaff0359c..000000000 --- a/.prettierrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "trailingComma": "es5", - "semi": false, - "tabWidth": 2 -} diff --git a/AGENTS.md b/AGENTS.md index ee8056447..6654f89bf 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -36,7 +36,7 @@ function processData(data: unknown) { if (isDataObject(data)) { return data.value } - throw new Error("Invalid data") + throw new Error('Invalid data') } const result: TQueryData = someOperation() @@ -58,12 +58,12 @@ const result: TQueryData = someOperation() ```typescript // Duplicated logic in multiple places function processA() { - const key = typeof value === "number" ? `__number__${value}` : String(value) + const key = typeof value === 'number' ? `__number__${value}` : String(value) // ... } function processB() { - const key = typeof value === "number" ? `__number__${value}` : String(value) + const key = typeof value === 'number' ? `__number__${value}` : String(value) // ... } ``` @@ -72,7 +72,7 @@ function processB() { ```typescript function serializeKey(value: string | number): string { - return typeof value === "number" ? `__number__${value}` : String(value) + return typeof value === 'number' ? `__number__${value}` : String(value) } function processA() { @@ -161,7 +161,7 @@ readyJobs.forEach(processJob) ```typescript // O(n) lookup for each check -const items = ["foo", "bar", "baz" /* hundreds more */] +const items = ['foo', 'bar', 'baz' /* hundreds more */] if (items.includes(searchValue)) { // ... } @@ -171,7 +171,7 @@ if (items.includes(searchValue)) { ```typescript // O(1) lookup -const items = new Set(["foo", "bar", "baz" /* hundreds more */]) +const items = new Set(['foo', 'bar', 'baz' /* hundreds more */]) if (items.has(searchValue)) { // ... } @@ -194,7 +194,7 @@ if (items.has(searchValue)) { // Intending to check if subset limit is more restrictive than superset function isLimitSubset( subset: number | undefined, - superset: number | undefined + superset: number | undefined, ) { return subset === undefined || superset === undefined || subset <= superset } @@ -207,7 +207,7 @@ function isLimitSubset( ```typescript function isLimitSubset( subset: number | undefined, - superset: number | undefined + superset: number | undefined, ) { // Subset with no limit cannot be a subset of one with a limit return superset === undefined || (subset !== undefined && subset <= superset) @@ -361,7 +361,7 @@ const dependentBuilders = [] // Accurately describes dependents ```typescript // Found a bug with fetchSnapshot resolving after up-to-date message // Should add a test: -test("ignores snapshot that resolves after up-to-date message", async () => { +test('ignores snapshot that resolves after up-to-date message', async () => { // Reproduce the corner case // Verify it's handled correctly }) @@ -520,7 +520,7 @@ const filtered = items.filter((item) => item.value > 0) ```typescript // āŒ Bad: numeric 1 and string "__number__1" collide - const key = typeof val === "number" ? `__number__${val}` : String(val) + const key = typeof val === 'number' ? `__number__${val}` : String(val) // āœ… Good: proper encoding with type prefix const key = `${typeof val}_${String(val)}` diff --git a/docs/collections/query-collection.md b/docs/collections/query-collection.md index 67331e126..cf13291a8 100644 --- a/docs/collections/query-collection.md +++ b/docs/collections/query-collection.md @@ -521,7 +521,7 @@ All direct write methods are available on `collection.utils`: ## QueryFn and Predicate Push-Down -When using `syncMode: 'on-demand'`, the collection automatically pushes down query predicates (where clauses, orderBy, and limit) to your `queryFn`. This allows you to fetch only the data needed for each specific query, rather than fetching the entire dataset. +When using `syncMode: 'on-demand'`, the collection automatically pushes down query predicates (where clauses, orderBy, limit, and offset) to your `queryFn`. This allows you to fetch only the data needed for each specific query, rather than fetching the entire dataset. ### How LoadSubsetOptions Are Passed @@ -530,9 +530,13 @@ LoadSubsetOptions are passed to your `queryFn` via the query context's `meta` pr ```typescript queryFn: async (ctx) => { // Extract LoadSubsetOptions from the context - const { limit, where, orderBy } = ctx.meta.loadSubsetOptions + const { limit, offset, where, orderBy } = ctx.meta.loadSubsetOptions // Use these to fetch only the data you need + // - where: filter expression (AST) + // - orderBy: sort expression (AST) + // - limit: maximum number of rows + // - offset: number of rows to skip (for pagination) // ... } ``` @@ -572,7 +576,7 @@ const productsCollection = createCollection( syncMode: 'on-demand', // Enable predicate push-down queryFn: async (ctx) => { - const { limit, where, orderBy } = ctx.meta.loadSubsetOptions + const { limit, offset, where, orderBy } = ctx.meta.loadSubsetOptions // Parse the expressions into simple format const parsed = parseLoadSubsetOptions({ where, orderBy, limit }) @@ -605,6 +609,11 @@ const productsCollection = createCollection( params.set('limit', String(parsed.limit)) } + // Add offset for pagination + if (offset) { + params.set('offset', String(offset)) + } + const response = await fetch(`/api/products?${params}`) return response.json() }, @@ -629,6 +638,7 @@ const affordableElectronics = createLiveQueryCollection({ // This triggers a queryFn call with: // GET /api/products?category=electronics&price_lt=100&sort=price:asc&limit=10 +// When paginating, offset is included: &offset=20 ``` ### Custom Handlers for Complex APIs @@ -731,10 +741,11 @@ queryFn: async (ctx) => { Convenience function that parses all LoadSubsetOptions at once. Good for simple use cases. ```typescript -const { filters, sorts, limit } = parseLoadSubsetOptions(ctx.meta?.loadSubsetOptions) +const { filters, sorts, limit, offset } = parseLoadSubsetOptions(ctx.meta?.loadSubsetOptions) // filters: [{ field: ['category'], operator: 'eq', value: 'electronics' }] // sorts: [{ field: ['price'], direction: 'asc', nulls: 'last' }] // limit: 10 +// offset: 20 (for pagination) ``` #### `parseWhereExpression(expr, options)` diff --git a/docs/framework/angular/overview.md b/docs/framework/angular/overview.md index 15adcaf6c..916262313 100644 --- a/docs/framework/angular/overview.md +++ b/docs/framework/angular/overview.md @@ -11,7 +11,7 @@ npm install @tanstack/angular-db ## Angular inject function -See the [Angular Functions Reference](../reference/index.md) to see the full list of functions available in the Angular Adapter. +See the [Angular Functions Reference](./reference/index.md) to see the full list of functions available in the Angular Adapter. For comprehensive documentation on writing queries (filtering, joins, aggregations, etc.), see the [Live Queries Guide](../../guides/live-queries). diff --git a/docs/framework/angular/reference/functions/injectLiveQuery.md b/docs/framework/angular/reference/functions/injectLiveQuery.md index 4b3209aca..46a9a35fb 100644 --- a/docs/framework/angular/reference/functions/injectLiveQuery.md +++ b/docs/framework/angular/reference/functions/injectLiveQuery.md @@ -37,12 +37,12 @@ Defined in: [index.ts:51](https://github.com/TanStack/db/blob/main/packages/angu ### Returns -[`InjectLiveQueryResult`](../../interfaces/InjectLiveQueryResult.md)\<\{ \[K in string \| number \| symbol\]: (TContext\["result"\] extends object ? any\[any\] : TContext\["hasJoins"\] extends true ? TContext\["schema"\] : TContext\["schema"\]\[TContext\["fromSourceName"\]\])\[K\] \}\> +[`InjectLiveQueryResult`](../interfaces/InjectLiveQueryResult.md)\<\{ \[K in string \| number \| symbol\]: (TContext\["result"\] extends object ? any\[any\] : TContext\["hasJoins"\] extends true ? TContext\["schema"\] : TContext\["schema"\]\[TContext\["fromSourceName"\]\])\[K\] \}\> ## Call Signature ```ts -function injectLiveQuery(queryFn): InjectLiveQueryResult<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>; +function injectLiveQuery(options): InjectLiveQueryResult<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>; ``` Defined in: [index.ts:61](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L61) @@ -53,6 +53,40 @@ Defined in: [index.ts:61](https://github.com/TanStack/db/blob/main/packages/angu `TContext` *extends* `Context` +#### TParams + +`TParams` *extends* `unknown` + +### Parameters + +#### options + +##### params + +() => `TParams` + +##### query + +(`args`) => `QueryBuilder`\<`TContext`\> \| `null` \| `undefined` + +### Returns + +[`InjectLiveQueryResult`](../interfaces/InjectLiveQueryResult.md)\<\{ \[K in string \| number \| symbol\]: (TContext\["result"\] extends object ? any\[any\] : TContext\["hasJoins"\] extends true ? TContext\["schema"\] : TContext\["schema"\]\[TContext\["fromSourceName"\]\])\[K\] \}\> + +## Call Signature + +```ts +function injectLiveQuery(queryFn): InjectLiveQueryResult<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>; +``` + +Defined in: [index.ts:71](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L71) + +### Type Parameters + +#### TContext + +`TContext` *extends* `Context` + ### Parameters #### queryFn @@ -61,7 +95,31 @@ Defined in: [index.ts:61](https://github.com/TanStack/db/blob/main/packages/angu ### Returns -[`InjectLiveQueryResult`](../../interfaces/InjectLiveQueryResult.md)\<\{ \[K in string \| number \| symbol\]: (TContext\["result"\] extends object ? any\[any\] : TContext\["hasJoins"\] extends true ? TContext\["schema"\] : TContext\["schema"\]\[TContext\["fromSourceName"\]\])\[K\] \}\> +[`InjectLiveQueryResult`](../interfaces/InjectLiveQueryResult.md)\<\{ \[K in string \| number \| symbol\]: (TContext\["result"\] extends object ? any\[any\] : TContext\["hasJoins"\] extends true ? TContext\["schema"\] : TContext\["schema"\]\[TContext\["fromSourceName"\]\])\[K\] \}\> + +## Call Signature + +```ts +function injectLiveQuery(queryFn): InjectLiveQueryResult<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>; +``` + +Defined in: [index.ts:74](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L74) + +### Type Parameters + +#### TContext + +`TContext` *extends* `Context` + +### Parameters + +#### queryFn + +(`q`) => `QueryBuilder`\<`TContext`\> \| `null` \| `undefined` + +### Returns + +[`InjectLiveQueryResult`](../interfaces/InjectLiveQueryResult.md)\<\{ \[K in string \| number \| symbol\]: (TContext\["result"\] extends object ? any\[any\] : TContext\["hasJoins"\] extends true ? TContext\["schema"\] : TContext\["schema"\]\[TContext\["fromSourceName"\]\])\[K\] \}\> ## Call Signature @@ -69,7 +127,7 @@ Defined in: [index.ts:61](https://github.com/TanStack/db/blob/main/packages/angu function injectLiveQuery(config): InjectLiveQueryResult<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>; ``` -Defined in: [index.ts:64](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L64) +Defined in: [index.ts:79](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L79) ### Type Parameters @@ -85,7 +143,7 @@ Defined in: [index.ts:64](https://github.com/TanStack/db/blob/main/packages/angu ### Returns -[`InjectLiveQueryResult`](../../interfaces/InjectLiveQueryResult.md)\<\{ \[K in string \| number \| symbol\]: (TContext\["result"\] extends object ? any\[any\] : TContext\["hasJoins"\] extends true ? TContext\["schema"\] : TContext\["schema"\]\[TContext\["fromSourceName"\]\])\[K\] \}\> +[`InjectLiveQueryResult`](../interfaces/InjectLiveQueryResult.md)\<\{ \[K in string \| number \| symbol\]: (TContext\["result"\] extends object ? any\[any\] : TContext\["hasJoins"\] extends true ? TContext\["schema"\] : TContext\["schema"\]\[TContext\["fromSourceName"\]\])\[K\] \}\> ## Call Signature @@ -93,7 +151,7 @@ Defined in: [index.ts:64](https://github.com/TanStack/db/blob/main/packages/angu function injectLiveQuery(liveQueryCollection): InjectLiveQueryResult; ``` -Defined in: [index.ts:67](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L67) +Defined in: [index.ts:82](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L82) ### Type Parameters @@ -117,4 +175,4 @@ Defined in: [index.ts:67](https://github.com/TanStack/db/blob/main/packages/angu ### Returns -[`InjectLiveQueryResult`](../../interfaces/InjectLiveQueryResult.md)\<`TResult`, `TKey`, `TUtils`\> +[`InjectLiveQueryResult`](../interfaces/InjectLiveQueryResult.md)\<`TResult`, `TKey`, `TUtils`\> diff --git a/docs/framework/angular/reference/index.md b/docs/framework/angular/reference/index.md index 3dfb77c21..1321a5528 100644 --- a/docs/framework/angular/reference/index.md +++ b/docs/framework/angular/reference/index.md @@ -7,8 +7,8 @@ title: "@tanstack/angular-db" ## Interfaces -- [InjectLiveQueryResult](../interfaces/InjectLiveQueryResult.md) +- [InjectLiveQueryResult](interfaces/InjectLiveQueryResult.md) ## Functions -- [injectLiveQuery](../functions/injectLiveQuery.md) +- [injectLiveQuery](functions/injectLiveQuery.md) diff --git a/docs/framework/angular/reference/interfaces/InjectLiveQueryResult.md b/docs/framework/angular/reference/interfaces/InjectLiveQueryResult.md index aa45218bc..2e00287c2 100644 --- a/docs/framework/angular/reference/interfaces/InjectLiveQueryResult.md +++ b/docs/framework/angular/reference/interfaces/InjectLiveQueryResult.md @@ -30,12 +30,14 @@ Contains reactive signals for the query state and data. ### collection ```ts -collection: Signal, TResult>>; +collection: Signal< + | Collection, TResult> +| null>; ``` Defined in: [index.ts:36](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L36) -A signal containing the underlying collection instance +A signal containing the underlying collection instance (null for disabled queries) *** @@ -126,7 +128,7 @@ A signal containing the complete state map of results keyed by their ID ### status ```ts -status: Signal; +status: Signal; ``` Defined in: [index.ts:38](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L38) diff --git a/docs/framework/react/overview.md b/docs/framework/react/overview.md index 0e53916f9..ed96a7506 100644 --- a/docs/framework/react/overview.md +++ b/docs/framework/react/overview.md @@ -11,7 +11,7 @@ npm install @tanstack/react-db ## React Hooks -See the [React Functions Reference](../reference/index.md) to see the full list of hooks available in the React Adapter. +See the [React Functions Reference](./reference/index.md) to see the full list of hooks available in the React Adapter. For comprehensive documentation on writing queries (filtering, joins, aggregations, etc.), see the [Live Queries Guide](../../guides/live-queries). diff --git a/docs/framework/react/reference/functions/useLiveInfiniteQuery.md b/docs/framework/react/reference/functions/useLiveInfiniteQuery.md index 49f258cf6..8fe91f730 100644 --- a/docs/framework/react/reference/functions/useLiveInfiniteQuery.md +++ b/docs/framework/react/reference/functions/useLiveInfiniteQuery.md @@ -40,13 +40,13 @@ without recreating the live query collection on each page change. #### config -[`UseLiveInfiniteQueryConfig`](../../type-aliases/UseLiveInfiniteQueryConfig.md)\<`any`\> +[`UseLiveInfiniteQueryConfig`](../type-aliases/UseLiveInfiniteQueryConfig.md)\<`any`\> Configuration including pageSize and getNextPageParam ### Returns -[`UseLiveInfiniteQueryReturn`](../../type-aliases/UseLiveInfiniteQueryReturn.md)\<`any`\> +[`UseLiveInfiniteQueryReturn`](../type-aliases/UseLiveInfiniteQueryReturn.md)\<`any`\> Object with pages, data, and pagination controls @@ -141,7 +141,7 @@ Query function that defines what data to fetch. Must include `.orderBy()` for se #### config -[`UseLiveInfiniteQueryConfig`](../../type-aliases/UseLiveInfiniteQueryConfig.md)\<`TContext`\> +[`UseLiveInfiniteQueryConfig`](../type-aliases/UseLiveInfiniteQueryConfig.md)\<`TContext`\> Configuration including pageSize and getNextPageParam @@ -153,7 +153,7 @@ Array of dependencies that trigger query re-execution when changed ### Returns -[`UseLiveInfiniteQueryReturn`](../../type-aliases/UseLiveInfiniteQueryReturn.md)\<`TContext`\> +[`UseLiveInfiniteQueryReturn`](../type-aliases/UseLiveInfiniteQueryReturn.md)\<`TContext`\> Object with pages, data, and pagination controls diff --git a/docs/framework/react/reference/index.md b/docs/framework/react/reference/index.md index f60a0261c..a35d6af9f 100644 --- a/docs/framework/react/reference/index.md +++ b/docs/framework/react/reference/index.md @@ -7,13 +7,13 @@ title: "@tanstack/react-db" ## Type Aliases -- [UseLiveInfiniteQueryConfig](../type-aliases/UseLiveInfiniteQueryConfig.md) -- [UseLiveInfiniteQueryReturn](../type-aliases/UseLiveInfiniteQueryReturn.md) -- [UseLiveQueryStatus](../type-aliases/UseLiveQueryStatus.md) +- [UseLiveInfiniteQueryConfig](type-aliases/UseLiveInfiniteQueryConfig.md) +- [UseLiveInfiniteQueryReturn](type-aliases/UseLiveInfiniteQueryReturn.md) +- [UseLiveQueryStatus](type-aliases/UseLiveQueryStatus.md) ## Functions -- [useLiveInfiniteQuery](../functions/useLiveInfiniteQuery.md) -- [useLiveQuery](../functions/useLiveQuery.md) -- [useLiveSuspenseQuery](../functions/useLiveSuspenseQuery.md) -- [usePacedMutations](../functions/usePacedMutations.md) +- [useLiveInfiniteQuery](functions/useLiveInfiniteQuery.md) +- [useLiveQuery](functions/useLiveQuery.md) +- [useLiveSuspenseQuery](functions/useLiveSuspenseQuery.md) +- [usePacedMutations](functions/usePacedMutations.md) diff --git a/docs/framework/solid/overview.md b/docs/framework/solid/overview.md index d7781bfbc..d69a75b75 100644 --- a/docs/framework/solid/overview.md +++ b/docs/framework/solid/overview.md @@ -11,7 +11,7 @@ npm install @tanstack/solid-db ## Solid Primitives -See the [Solid Functions Reference](../reference/index.md) to see the full list of primitives available in the Solid Adapter. +See the [Solid Functions Reference](./reference/index.md) to see the full list of primitives available in the Solid Adapter. For comprehensive documentation on writing queries (filtering, joins, aggregations, etc.), see the [Live Queries Guide](../../guides/live-queries). diff --git a/docs/framework/solid/reference/functions/useLiveQuery.md b/docs/framework/solid/reference/functions/useLiveQuery.md index 2291a4b34..a1261ff4b 100644 --- a/docs/framework/solid/reference/functions/useLiveQuery.md +++ b/docs/framework/solid/reference/functions/useLiveQuery.md @@ -11,7 +11,7 @@ title: useLiveQuery function useLiveQuery(queryFn): object; ``` -Defined in: [useLiveQuery.ts:80](https://github.com/TanStack/db/blob/main/packages/solid-db/src/useLiveQuery.ts#L80) +Defined in: [useLiveQuery.ts:84](https://github.com/TanStack/db/blob/main/packages/solid-db/src/useLiveQuery.ts#L84) Create a live query using a query function @@ -149,11 +149,155 @@ return ( ## Call Signature +```ts +function useLiveQuery(queryFn): object; +``` + +Defined in: [useLiveQuery.ts:99](https://github.com/TanStack/db/blob/main/packages/solid-db/src/useLiveQuery.ts#L99) + +Create a live query using a query function + +### Type Parameters + +#### TContext + +`TContext` *extends* `Context` + +### Parameters + +#### queryFn + +(`q`) => `QueryBuilder`\<`TContext`\> \| `null` \| `undefined` + +Query function that defines what data to fetch + +### Returns + +`object` + +Object with reactive data, state, and status information + +#### collection + +```ts +collection: Accessor< + | Collection<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }, string | number, { +}, StandardSchemaV1, { [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }> +| null>; +``` + +#### data + +```ts +data: { [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }[]; +``` + +#### isCleanedUp + +```ts +isCleanedUp: Accessor; +``` + +#### isError + +```ts +isError: Accessor; +``` + +#### isIdle + +```ts +isIdle: Accessor; +``` + +#### isLoading + +```ts +isLoading: Accessor; +``` + +#### isReady + +```ts +isReady: Accessor; +``` + +#### state + +```ts +state: ReactiveMap; +``` + +#### status + +```ts +status: Accessor; +``` + +### Examples + +```ts +// Basic query with object syntax +const todosQuery = useLiveQuery((q) => + q.from({ todos: todosCollection }) + .where(({ todos }) => eq(todos.completed, false)) + .select(({ todos }) => ({ id: todos.id, text: todos.text })) +) +``` + +```ts +// With dependencies that trigger re-execution +const todosQuery = useLiveQuery( + (q) => q.from({ todos: todosCollection }) + .where(({ todos }) => gt(todos.priority, minPriority())), +) +``` + +```ts +// Join pattern +const personIssues = useLiveQuery((q) => + q.from({ issues: issueCollection }) + .join({ persons: personCollection }, ({ issues, persons }) => + eq(issues.userId, persons.id) + ) + .select(({ issues, persons }) => ({ + id: issues.id, + title: issues.title, + userName: persons.name + })) +) +``` + +```ts +// Handle loading and error states +const todosQuery = useLiveQuery((q) => + q.from({ todos: todoCollection }) +) + +return ( + + +
Loading...
+
+ +
Error: {todosQuery.status()}
+
+ + + {(todo) =>
  • {todo.text}
  • } +
    +
    +
    +) +``` + +## Call Signature + ```ts function useLiveQuery(config): object; ``` -Defined in: [useLiveQuery.ts:135](https://github.com/TanStack/db/blob/main/packages/solid-db/src/useLiveQuery.ts#L135) +Defined in: [useLiveQuery.ts:160](https://github.com/TanStack/db/blob/main/packages/solid-db/src/useLiveQuery.ts#L160) Create a live query using configuration object @@ -279,7 +423,7 @@ return ( function useLiveQuery(liveQueryCollection): object; ``` -Defined in: [useLiveQuery.ts:185](https://github.com/TanStack/db/blob/main/packages/solid-db/src/useLiveQuery.ts#L185) +Defined in: [useLiveQuery.ts:210](https://github.com/TanStack/db/blob/main/packages/solid-db/src/useLiveQuery.ts#L210) Subscribe to an existing live query collection diff --git a/docs/framework/solid/reference/index.md b/docs/framework/solid/reference/index.md index c44007f86..da2d0de79 100644 --- a/docs/framework/solid/reference/index.md +++ b/docs/framework/solid/reference/index.md @@ -7,4 +7,4 @@ title: "@tanstack/solid-db" ## Functions -- [useLiveQuery](../functions/useLiveQuery.md) +- [useLiveQuery](functions/useLiveQuery.md) diff --git a/docs/framework/svelte/overview.md b/docs/framework/svelte/overview.md index aeaa8cd95..f7497d0e7 100644 --- a/docs/framework/svelte/overview.md +++ b/docs/framework/svelte/overview.md @@ -11,7 +11,7 @@ npm install @tanstack/svelte-db ## Svelte Utilities -See the [Svelte Functions Reference](../reference/index.md) to see the full list of utilities available in the Svelte Adapter. +See the [Svelte Functions Reference](./reference/index.md) to see the full list of utilities available in the Svelte Adapter. For comprehensive documentation on writing queries (filtering, joins, aggregations, etc.), see the [Live Queries Guide](../../guides/live-queries). diff --git a/docs/framework/svelte/reference/functions/useLiveQuery.md b/docs/framework/svelte/reference/functions/useLiveQuery.md new file mode 100644 index 000000000..835bd781b --- /dev/null +++ b/docs/framework/svelte/reference/functions/useLiveQuery.md @@ -0,0 +1,414 @@ +--- +id: useLiveQuery +title: useLiveQuery +--- + +# Function: useLiveQuery() + +## Call Signature + +```ts +function useLiveQuery(queryFn, deps?): UseLiveQueryReturn<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>; +``` + +Defined in: [useLiveQuery.svelte.ts:155](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L155) + +Create a live query using a query function + +### Type Parameters + +#### TContext + +`TContext` *extends* `Context` + +### Parameters + +#### queryFn + +(`q`) => `QueryBuilder`\<`TContext`\> + +Query function that defines what data to fetch + +#### deps? + +() => `unknown`[] + +Array of reactive dependencies that trigger query re-execution when changed + +### Returns + +[`UseLiveQueryReturn`](../interfaces/UseLiveQueryReturn.md)\<\{ \[K in string \| number \| symbol\]: (TContext\["result"\] extends object ? any\[any\] : TContext\["hasJoins"\] extends true ? TContext\["schema"\] : TContext\["schema"\]\[TContext\["fromSourceName"\]\])\[K\] \}\> + +Reactive object with query data, state, and status information + +### Remarks + +**IMPORTANT - Destructuring in Svelte 5:** +Direct destructuring breaks reactivity. To destructure, wrap with `$derived`: + +āŒ **Incorrect** - Loses reactivity: +```ts +const { data, isLoading } = useLiveQuery(...) +``` + +āœ… **Correct** - Maintains reactivity: +```ts +// Option 1: Use dot notation (recommended) +const query = useLiveQuery(...) +// Access: query.data, query.isLoading + +// Option 2: Wrap with $derived for destructuring +const query = useLiveQuery(...) +const { data, isLoading } = $derived(query) +``` + +This is a fundamental Svelte 5 limitation, not a library bug. See: +https://github.com/sveltejs/svelte/issues/11002 + +### Examples + +```ts +// Basic query with object syntax (recommended pattern) +const todosQuery = useLiveQuery((q) => + q.from({ todos: todosCollection }) + .where(({ todos }) => eq(todos.completed, false)) + .select(({ todos }) => ({ id: todos.id, text: todos.text })) +) +// Access via: todosQuery.data, todosQuery.isLoading, etc. +``` + +```ts +// With reactive dependencies +let minPriority = $state(5) +const todosQuery = useLiveQuery( + (q) => q.from({ todos: todosCollection }) + .where(({ todos }) => gt(todos.priority, minPriority)), + [() => minPriority] // Re-run when minPriority changes +) +``` + +```ts +// Destructuring with $derived (if needed) +const query = useLiveQuery((q) => + q.from({ todos: todosCollection }) +) +const { data, isLoading, isError } = $derived(query) +// Now data, isLoading, and isError maintain reactivity +``` + +```ts +// Join pattern +const issuesQuery = useLiveQuery((q) => + q.from({ issues: issueCollection }) + .join({ persons: personCollection }, ({ issues, persons }) => + eq(issues.userId, persons.id) + ) + .select(({ issues, persons }) => ({ + id: issues.id, + title: issues.title, + userName: persons.name + })) +) +``` + +```ts +// Handle loading and error states in template +const todosQuery = useLiveQuery((q) => + q.from({ todos: todoCollection }) +) + +// In template: +// {#if todosQuery.isLoading} +//
    Loading...
    +// {:else if todosQuery.isError} +//
    Error: {todosQuery.status}
    +// {:else} +//
      +// {#each todosQuery.data as todo (todo.id)} +//
    • {todo.text}
    • +// {/each} +//
    +// {/if} +``` + +## Call Signature + +```ts +function useLiveQuery(queryFn, deps?): UseLiveQueryReturn<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>; +``` + +Defined in: [useLiveQuery.svelte.ts:161](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L161) + +Create a live query using a query function + +### Type Parameters + +#### TContext + +`TContext` *extends* `Context` + +### Parameters + +#### queryFn + +(`q`) => `QueryBuilder`\<`TContext`\> \| `null` \| `undefined` + +Query function that defines what data to fetch + +#### deps? + +() => `unknown`[] + +Array of reactive dependencies that trigger query re-execution when changed + +### Returns + +[`UseLiveQueryReturn`](../interfaces/UseLiveQueryReturn.md)\<\{ \[K in string \| number \| symbol\]: (TContext\["result"\] extends object ? any\[any\] : TContext\["hasJoins"\] extends true ? TContext\["schema"\] : TContext\["schema"\]\[TContext\["fromSourceName"\]\])\[K\] \}\> + +Reactive object with query data, state, and status information + +### Remarks + +**IMPORTANT - Destructuring in Svelte 5:** +Direct destructuring breaks reactivity. To destructure, wrap with `$derived`: + +āŒ **Incorrect** - Loses reactivity: +```ts +const { data, isLoading } = useLiveQuery(...) +``` + +āœ… **Correct** - Maintains reactivity: +```ts +// Option 1: Use dot notation (recommended) +const query = useLiveQuery(...) +// Access: query.data, query.isLoading + +// Option 2: Wrap with $derived for destructuring +const query = useLiveQuery(...) +const { data, isLoading } = $derived(query) +``` + +This is a fundamental Svelte 5 limitation, not a library bug. See: +https://github.com/sveltejs/svelte/issues/11002 + +### Examples + +```ts +// Basic query with object syntax (recommended pattern) +const todosQuery = useLiveQuery((q) => + q.from({ todos: todosCollection }) + .where(({ todos }) => eq(todos.completed, false)) + .select(({ todos }) => ({ id: todos.id, text: todos.text })) +) +// Access via: todosQuery.data, todosQuery.isLoading, etc. +``` + +```ts +// With reactive dependencies +let minPriority = $state(5) +const todosQuery = useLiveQuery( + (q) => q.from({ todos: todosCollection }) + .where(({ todos }) => gt(todos.priority, minPriority)), + [() => minPriority] // Re-run when minPriority changes +) +``` + +```ts +// Destructuring with $derived (if needed) +const query = useLiveQuery((q) => + q.from({ todos: todosCollection }) +) +const { data, isLoading, isError } = $derived(query) +// Now data, isLoading, and isError maintain reactivity +``` + +```ts +// Join pattern +const issuesQuery = useLiveQuery((q) => + q.from({ issues: issueCollection }) + .join({ persons: personCollection }, ({ issues, persons }) => + eq(issues.userId, persons.id) + ) + .select(({ issues, persons }) => ({ + id: issues.id, + title: issues.title, + userName: persons.name + })) +) +``` + +```ts +// Handle loading and error states in template +const todosQuery = useLiveQuery((q) => + q.from({ todos: todoCollection }) +) + +// In template: +// {#if todosQuery.isLoading} +//
    Loading...
    +// {:else if todosQuery.isError} +//
    Error: {todosQuery.status}
    +// {:else} +//
      +// {#each todosQuery.data as todo (todo.id)} +//
    • {todo.text}
    • +// {/each} +//
    +// {/if} +``` + +## Call Signature + +```ts +function useLiveQuery(config, deps?): UseLiveQueryReturn<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>; +``` + +Defined in: [useLiveQuery.svelte.ts:206](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L206) + +Create a live query using configuration object + +### Type Parameters + +#### TContext + +`TContext` *extends* `Context` + +### Parameters + +#### config + +`LiveQueryCollectionConfig`\<`TContext`\> + +Configuration object with query and options + +#### deps? + +() => `unknown`[] + +Array of reactive dependencies that trigger query re-execution when changed + +### Returns + +[`UseLiveQueryReturn`](../interfaces/UseLiveQueryReturn.md)\<\{ \[K in string \| number \| symbol\]: (TContext\["result"\] extends object ? any\[any\] : TContext\["hasJoins"\] extends true ? TContext\["schema"\] : TContext\["schema"\]\[TContext\["fromSourceName"\]\])\[K\] \}\> + +Reactive object with query data, state, and status information + +### Examples + +```ts +// Basic config object usage +const todosQuery = useLiveQuery({ + query: (q) => q.from({ todos: todosCollection }), + gcTime: 60000 +}) +``` + +```ts +// With reactive dependencies +let filter = $state('active') +const todosQuery = useLiveQuery({ + query: (q) => q.from({ todos: todosCollection }) + .where(({ todos }) => eq(todos.status, filter)) +}, [() => filter]) +``` + +```ts +// Handle all states uniformly +const itemsQuery = useLiveQuery({ + query: (q) => q.from({ items: itemCollection }) +}) + +// In template: +// {#if itemsQuery.isLoading} +//
    Loading...
    +// {:else if itemsQuery.isError} +//
    Something went wrong
    +// {:else if !itemsQuery.isReady} +//
    Preparing...
    +// {:else} +//
    {itemsQuery.data.length} items loaded
    +// {/if} +``` + +## Call Signature + +```ts +function useLiveQuery(liveQueryCollection): UseLiveQueryReturnWithCollection; +``` + +Defined in: [useLiveQuery.svelte.ts:255](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L255) + +Subscribe to an existing query collection (can be reactive) + +### Type Parameters + +#### TResult + +`TResult` *extends* `object` + +#### TKey + +`TKey` *extends* `string` \| `number` + +#### TUtils + +`TUtils` *extends* `Record`\<`string`, `any`\> + +### Parameters + +#### liveQueryCollection + +`MaybeGetter`\<`Collection`\<`TResult`, `TKey`, `TUtils`, `StandardSchemaV1`\<`unknown`, `unknown`\>, `TResult`\>\> + +Pre-created query collection to subscribe to (can be a getter) + +### Returns + +[`UseLiveQueryReturnWithCollection`](../interfaces/UseLiveQueryReturnWithCollection.md)\<`TResult`, `TKey`, `TUtils`\> + +Reactive object with query data, state, and status information + +### Examples + +```ts +// Using pre-created query collection +const myLiveQuery = createLiveQueryCollection((q) => + q.from({ todos: todosCollection }).where(({ todos }) => eq(todos.active, true)) +) +const queryResult = useLiveQuery(myLiveQuery) +``` + +```ts +// Reactive query collection reference +let selectedQuery = $state(todosQuery) +const queryResult = useLiveQuery(() => selectedQuery) + +// Switch queries reactively +selectedQuery = archiveQuery +``` + +```ts +// Access query collection methods directly +const queryResult = useLiveQuery(existingQuery) + +// Use underlying collection for mutations +const handleToggle = (id) => { + queryResult.collection.update(id, draft => { draft.completed = !draft.completed }) +} +``` + +```ts +// Handle states consistently +const queryResult = useLiveQuery(sharedQuery) + +// In template: +// {#if queryResult.isLoading} +//
    Loading...
    +// {:else if queryResult.isError} +//
    Error loading data
    +// {:else} +// {#each queryResult.data as item (item.id)} +// +// {/each} +// {/if} +``` diff --git a/docs/framework/svelte/reference/index.md b/docs/framework/svelte/reference/index.md new file mode 100644 index 000000000..152862d59 --- /dev/null +++ b/docs/framework/svelte/reference/index.md @@ -0,0 +1,15 @@ +--- +id: "@tanstack/svelte-db" +title: "@tanstack/svelte-db" +--- + +# @tanstack/svelte-db + +## Interfaces + +- [UseLiveQueryReturn](interfaces/UseLiveQueryReturn.md) +- [UseLiveQueryReturnWithCollection](interfaces/UseLiveQueryReturnWithCollection.md) + +## Functions + +- [useLiveQuery](functions/useLiveQuery.md) diff --git a/docs/framework/svelte/reference/interfaces/UseLiveQueryReturn.md b/docs/framework/svelte/reference/interfaces/UseLiveQueryReturn.md new file mode 100644 index 000000000..ee969a2eb --- /dev/null +++ b/docs/framework/svelte/reference/interfaces/UseLiveQueryReturn.md @@ -0,0 +1,125 @@ +--- +id: UseLiveQueryReturn +title: UseLiveQueryReturn +--- + +# Interface: UseLiveQueryReturn\ + +Defined in: [useLiveQuery.svelte.ts:29](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L29) + +Return type for useLiveQuery hook + +## Type Parameters + +### T + +`T` *extends* `object` + +## Properties + +### collection + +```ts +collection: Collection; +``` + +Defined in: [useLiveQuery.svelte.ts:32](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L32) + +The underlying query collection instance + +*** + +### data + +```ts +data: T[]; +``` + +Defined in: [useLiveQuery.svelte.ts:31](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L31) + +Reactive array of query results in order + +*** + +### isCleanedUp + +```ts +isCleanedUp: boolean; +``` + +Defined in: [useLiveQuery.svelte.ts:38](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L38) + +True when query has been cleaned up + +*** + +### isError + +```ts +isError: boolean; +``` + +Defined in: [useLiveQuery.svelte.ts:37](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L37) + +True when query encountered an error + +*** + +### isIdle + +```ts +isIdle: boolean; +``` + +Defined in: [useLiveQuery.svelte.ts:36](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L36) + +True when query hasn't started yet + +*** + +### isLoading + +```ts +isLoading: boolean; +``` + +Defined in: [useLiveQuery.svelte.ts:34](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L34) + +True while initial query data is loading + +*** + +### isReady + +```ts +isReady: boolean; +``` + +Defined in: [useLiveQuery.svelte.ts:35](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L35) + +True when query has received first data and is ready + +*** + +### state + +```ts +state: Map; +``` + +Defined in: [useLiveQuery.svelte.ts:30](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L30) + +Reactive Map of query results (key → item) + +*** + +### status + +```ts +status: CollectionStatus; +``` + +Defined in: [useLiveQuery.svelte.ts:33](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L33) + +Current query status diff --git a/docs/framework/svelte/reference/interfaces/UseLiveQueryReturnWithCollection.md b/docs/framework/svelte/reference/interfaces/UseLiveQueryReturnWithCollection.md new file mode 100644 index 000000000..9d921fcf9 --- /dev/null +++ b/docs/framework/svelte/reference/interfaces/UseLiveQueryReturnWithCollection.md @@ -0,0 +1,112 @@ +--- +id: UseLiveQueryReturnWithCollection +title: UseLiveQueryReturnWithCollection +--- + +# Interface: UseLiveQueryReturnWithCollection\ + +Defined in: [useLiveQuery.svelte.ts:41](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L41) + +## Type Parameters + +### T + +`T` *extends* `object` + +### TKey + +`TKey` *extends* `string` \| `number` + +### TUtils + +`TUtils` *extends* `Record`\<`string`, `any`\> + +## Properties + +### collection + +```ts +collection: Collection; +``` + +Defined in: [useLiveQuery.svelte.ts:48](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L48) + +*** + +### data + +```ts +data: T[]; +``` + +Defined in: [useLiveQuery.svelte.ts:47](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L47) + +*** + +### isCleanedUp + +```ts +isCleanedUp: boolean; +``` + +Defined in: [useLiveQuery.svelte.ts:54](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L54) + +*** + +### isError + +```ts +isError: boolean; +``` + +Defined in: [useLiveQuery.svelte.ts:53](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L53) + +*** + +### isIdle + +```ts +isIdle: boolean; +``` + +Defined in: [useLiveQuery.svelte.ts:52](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L52) + +*** + +### isLoading + +```ts +isLoading: boolean; +``` + +Defined in: [useLiveQuery.svelte.ts:50](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L50) + +*** + +### isReady + +```ts +isReady: boolean; +``` + +Defined in: [useLiveQuery.svelte.ts:51](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L51) + +*** + +### state + +```ts +state: Map; +``` + +Defined in: [useLiveQuery.svelte.ts:46](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L46) + +*** + +### status + +```ts +status: CollectionStatus; +``` + +Defined in: [useLiveQuery.svelte.ts:49](https://github.com/TanStack/db/blob/main/packages/svelte-db/src/useLiveQuery.svelte.ts#L49) diff --git a/docs/framework/vue/overview.md b/docs/framework/vue/overview.md index f4b2a3f6d..eb78d370f 100644 --- a/docs/framework/vue/overview.md +++ b/docs/framework/vue/overview.md @@ -11,7 +11,7 @@ npm install @tanstack/vue-db ## Vue Composables -See the [Vue Functions Reference](../reference/index.md) to see the full list of composables available in the Vue Adapter. +See the [Vue Functions Reference](./reference/index.md) to see the full list of composables available in the Vue Adapter. For comprehensive documentation on writing queries (filtering, joins, aggregations, etc.), see the [Live Queries Guide](../../guides/live-queries). diff --git a/docs/framework/vue/reference/functions/useLiveQuery.md b/docs/framework/vue/reference/functions/useLiveQuery.md index d233b05ed..b00e512e5 100644 --- a/docs/framework/vue/reference/functions/useLiveQuery.md +++ b/docs/framework/vue/reference/functions/useLiveQuery.md @@ -37,7 +37,93 @@ Array of reactive dependencies that trigger query re-execution when changed ### Returns -[`UseLiveQueryReturn`](../../interfaces/UseLiveQueryReturn.md)\<\{ \[K in string \| number \| symbol\]: (TContext\["result"\] extends object ? any\[any\] : TContext\["hasJoins"\] extends true ? TContext\["schema"\] : TContext\["schema"\]\[TContext\["fromSourceName"\]\])\[K\] \}\> +[`UseLiveQueryReturn`](../interfaces/UseLiveQueryReturn.md)\<\{ \[K in string \| number \| symbol\]: (TContext\["result"\] extends object ? any\[any\] : TContext\["hasJoins"\] extends true ? TContext\["schema"\] : TContext\["schema"\]\[TContext\["fromSourceName"\]\])\[K\] \}\> + +Reactive object with query data, state, and status information + +### Examples + +```ts +// Basic query with object syntax +const { data, isLoading } = useLiveQuery((q) => + q.from({ todos: todosCollection }) + .where(({ todos }) => eq(todos.completed, false)) + .select(({ todos }) => ({ id: todos.id, text: todos.text })) +) +``` + +```ts +// With reactive dependencies +const minPriority = ref(5) +const { data, state } = useLiveQuery( + (q) => q.from({ todos: todosCollection }) + .where(({ todos }) => gt(todos.priority, minPriority.value)), + [minPriority] // Re-run when minPriority changes +) +``` + +```ts +// Join pattern +const { data } = useLiveQuery((q) => + q.from({ issues: issueCollection }) + .join({ persons: personCollection }, ({ issues, persons }) => + eq(issues.userId, persons.id) + ) + .select(({ issues, persons }) => ({ + id: issues.id, + title: issues.title, + userName: persons.name + })) +) +``` + +```ts +// Handle loading and error states in template +const { data, isLoading, isError, status } = useLiveQuery((q) => + q.from({ todos: todoCollection }) +) + +// In template: +//
    Loading...
    +//
    Error: {{ status }}
    +//
      +//
    • {{ todo.text }}
    • +//
    +``` + +## Call Signature + +```ts +function useLiveQuery(queryFn, deps?): UseLiveQueryReturn<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>; +``` + +Defined in: [useLiveQuery.ts:120](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveQuery.ts#L120) + +Create a live query using a query function + +### Type Parameters + +#### TContext + +`TContext` *extends* `Context` + +### Parameters + +#### queryFn + +(`q`) => `QueryBuilder`\<`TContext`\> \| `null` \| `undefined` + +Query function that defines what data to fetch + +#### deps? + +`unknown`[] + +Array of reactive dependencies that trigger query re-execution when changed + +### Returns + +[`UseLiveQueryReturn`](../interfaces/UseLiveQueryReturn.md)\<\{ \[K in string \| number \| symbol\]: (TContext\["result"\] extends object ? any\[any\] : TContext\["hasJoins"\] extends true ? TContext\["schema"\] : TContext\["schema"\]\[TContext\["fromSourceName"\]\])\[K\] \}\> Reactive object with query data, state, and status information @@ -97,7 +183,7 @@ const { data, isLoading, isError, status } = useLiveQuery((q) => function useLiveQuery(config, deps?): UseLiveQueryReturn<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>; ``` -Defined in: [useLiveQuery.ts:152](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveQuery.ts#L152) +Defined in: [useLiveQuery.ts:160](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveQuery.ts#L160) Create a live query using configuration object @@ -123,7 +209,7 @@ Array of reactive dependencies that trigger query re-execution when changed ### Returns -[`UseLiveQueryReturn`](../../interfaces/UseLiveQueryReturn.md)\<\{ \[K in string \| number \| symbol\]: (TContext\["result"\] extends object ? any\[any\] : TContext\["hasJoins"\] extends true ? TContext\["schema"\] : TContext\["schema"\]\[TContext\["fromSourceName"\]\])\[K\] \}\> +[`UseLiveQueryReturn`](../interfaces/UseLiveQueryReturn.md)\<\{ \[K in string \| number \| symbol\]: (TContext\["result"\] extends object ? any\[any\] : TContext\["hasJoins"\] extends true ? TContext\["schema"\] : TContext\["schema"\]\[TContext\["fromSourceName"\]\])\[K\] \}\> Reactive object with query data, state, and status information @@ -165,7 +251,7 @@ const { data, isLoading, isReady, isError } = useLiveQuery({ function useLiveQuery(liveQueryCollection): UseLiveQueryReturnWithCollection; ``` -Defined in: [useLiveQuery.ts:197](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveQuery.ts#L197) +Defined in: [useLiveQuery.ts:205](https://github.com/TanStack/db/blob/main/packages/vue-db/src/useLiveQuery.ts#L205) Subscribe to an existing query collection (can be reactive) @@ -193,7 +279,7 @@ Pre-created query collection to subscribe to (can be a ref) ### Returns -[`UseLiveQueryReturnWithCollection`](../../interfaces/UseLiveQueryReturnWithCollection.md)\<`TResult`, `TKey`, `TUtils`\> +[`UseLiveQueryReturnWithCollection`](../interfaces/UseLiveQueryReturnWithCollection.md)\<`TResult`, `TKey`, `TUtils`\> Reactive object with query data, state, and status information diff --git a/docs/framework/vue/reference/index.md b/docs/framework/vue/reference/index.md index d9fc4a358..65af759fc 100644 --- a/docs/framework/vue/reference/index.md +++ b/docs/framework/vue/reference/index.md @@ -7,9 +7,9 @@ title: "@tanstack/vue-db" ## Interfaces -- [UseLiveQueryReturn](../interfaces/UseLiveQueryReturn.md) -- [UseLiveQueryReturnWithCollection](../interfaces/UseLiveQueryReturnWithCollection.md) +- [UseLiveQueryReturn](interfaces/UseLiveQueryReturn.md) +- [UseLiveQueryReturnWithCollection](interfaces/UseLiveQueryReturnWithCollection.md) ## Functions -- [useLiveQuery](../functions/useLiveQuery.md) +- [useLiveQuery](functions/useLiveQuery.md) diff --git a/docs/guides/error-handling.md b/docs/guides/error-handling.md index 8f6573d7b..dfd4fa0b8 100644 --- a/docs/guides/error-handling.md +++ b/docs/guides/error-handling.md @@ -177,7 +177,7 @@ const App = () => ( ) ``` -With this approach, loading states are handled by `` and error states are handled by `` instead of within your component logic. See the [React Suspense section in Live Queries](../live-queries#using-with-react-suspense) for more details. +With this approach, loading states are handled by `` and error states are handled by `` instead of within your component logic. See the [React Suspense section in Live Queries](./live-queries#using-with-react-suspense) for more details. ## Transaction Error Handling @@ -810,6 +810,6 @@ const TodoApp = () => { ## See Also -- [API Reference](../../overview.md#api-reference) - Detailed API documentation -- [Mutations Guide](../../overview.md#making-optimistic-mutations) - Learn about optimistic updates and rollbacks +- [API Reference](../overview.md#api-reference) - Detailed API documentation +- [Mutations Guide](../overview.md#making-optimistic-mutations) - Learn about optimistic updates and rollbacks - [TanStack Query Error Handling](https://tanstack.com/query/latest/docs/react/guides/error-handling) - Query-specific error handling diff --git a/docs/guides/live-queries.md b/docs/guides/live-queries.md index f02c68d22..409b87cac 100644 --- a/docs/guides/live-queries.md +++ b/docs/guides/live-queries.md @@ -161,9 +161,9 @@ export class UserListComponent { } ``` -> **Note:** React hooks (`useLiveQuery`, `useLiveInfiniteQuery`, `useLiveSuspenseQuery`) accept an optional dependency array parameter to re-execute queries when values change, similar to React's `useEffect`. See the [React Adapter documentation](../../framework/react/adapter#dependency-arrays) for details on when and how to use dependency arrays. +> **Note:** React hooks (`useLiveQuery`, `useLiveInfiniteQuery`, `useLiveSuspenseQuery`) accept an optional dependency array parameter to re-execute queries when values change, similar to React's `useEffect`. See the [React Adapter documentation](../framework/react/overview#dependency-arrays) for details on when and how to use dependency arrays. -For more details on framework integration, see the [React](../../framework/react/adapter), [Vue](../../framework/vue/adapter), and [Angular](../../framework/angular/adapter) adapter documentation. +For more details on framework integration, see the [React](../framework/react/overview), [Vue](../framework/vue/overview), and [Angular](../framework/angular/overview) adapter documentation. ### Using with React Suspense diff --git a/docs/overview.md b/docs/overview.md index 3f068b7c8..8af0254c3 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -87,7 +87,7 @@ Collections can be populated in many ways, including: - fetching data, for example [from API endpoints using TanStack Query](https://tanstack.com/query/latest) - syncing data, for example [using a sync engine like ElectricSQL](https://electric-sql.com/) -- storing local data, for example [using localStorage for user preferences and settings](../collections/local-storage-collection.md) or [in-memory client data or UI state](../collections/local-only-collection.md) +- storing local data, for example [using localStorage for user preferences and settings](./collections/local-storage-collection.md) or [in-memory client data or UI state](./collections/local-only-collection.md) - from live collection queries, creating [derived collections as materialised views](#using-live-queries) Once you have your data in collections, you can query across them using live queries in your components. @@ -118,7 +118,7 @@ const productsCollection = createCollection( TanStack DB automatically collapses duplicate requests, performs delta loading when expanding queries, optimizes joins into minimal batched requests, and respects your TanStack Query cache policies. You often end up with _fewer_ network requests than custom view-specific APIs. -See the [Query Collection documentation](../collections/query-collection.md#queryfn-and-predicate-push-down) for full predicate mapping details. +See the [Query Collection documentation](./collections/query-collection.md#queryfn-and-predicate-push-down) for full predicate mapping details. ### Using live queries @@ -135,7 +135,7 @@ Live queries support joins across collections. This allows you to: Every query returns another collection which can _also_ be queried. -For more details on live queries, see the [Live Queries](../guides/live-queries.md) documentation. +For more details on live queries, see the [Live Queries](./guides/live-queries.md) documentation. ### Making optimistic mutations @@ -162,7 +162,7 @@ The collection maintains optimistic state separately from synced data. When live The optimistic state is held until the handler resolves, at which point the data is persisted to the server and synced back. If the handler throws an error, the optimistic state is rolled back. -For more complex mutations, you can create custom actions with `createOptimisticAction` or custom transactions with `createTransaction`. See the [Mutations guide](../guides/mutations.md) for details. +For more complex mutations, you can create custom actions with `createOptimisticAction` or custom transactions with `createTransaction`. See the [Mutations guide](./guides/mutations.md) for details. ### Uni-directional data flow @@ -186,23 +186,23 @@ TanStack DB provides several built-in collection types for different data source **Fetch Collections** -- **[QueryCollection](../collections/query-collection.md)** — Load data into collections using TanStack Query for REST APIs and data fetching. +- **[QueryCollection](./collections/query-collection.md)** — Load data into collections using TanStack Query for REST APIs and data fetching. **Sync Collections** -- **[ElectricCollection](../collections/electric-collection.md)** — Sync data into collections from Postgres using ElectricSQL's real-time sync engine. +- **[ElectricCollection](./collections/electric-collection.md)** — Sync data into collections from Postgres using ElectricSQL's real-time sync engine. -- **[TrailBaseCollection](../collections/trailbase-collection.md)** — Sync data into collections using TrailBase's self-hosted backend with real-time subscriptions. +- **[TrailBaseCollection](./collections/trailbase-collection.md)** — Sync data into collections using TrailBase's self-hosted backend with real-time subscriptions. -- **[RxDBCollection](../collections/rxdb-collection.md)** — Integrate with RxDB for offline-first local persistence with powerful replication and sync capabilities. +- **[RxDBCollection](./collections/rxdb-collection.md)** — Integrate with RxDB for offline-first local persistence with powerful replication and sync capabilities. -- **[PowerSyncCollection](../collections/powersync-collection.md)** — Sync with PowerSync's SQLite-based database for offline-first persistence with real-time synchronization with PostgreSQL, MongoDB, and MySQL backends. +- **[PowerSyncCollection](./collections/powersync-collection.md)** — Sync with PowerSync's SQLite-based database for offline-first persistence with real-time synchronization with PostgreSQL, MongoDB, and MySQL backends. **Local Collections** -- **[LocalStorageCollection](../collections/local-storage-collection.md)** — Store small amounts of local-only state that persists across sessions and syncs across browser tabs. +- **[LocalStorageCollection](./collections/local-storage-collection.md)** — Store small amounts of local-only state that persists across sessions and syncs across browser tabs. -- **[LocalOnlyCollection](../collections/local-only-collection.md)** — Manage in-memory client data or UI state that doesn't need persistence or cross-tab sync. +- **[LocalOnlyCollection](./collections/local-only-collection.md)** — Manage in-memory client data or UI state that doesn't need persistence or cross-tab sync. #### Collection Schemas @@ -256,7 +256,7 @@ The collection will use the schema for its type inference. If you provide a sche You can create your own collection types by implementing the `Collection` interface found in [`../packages/db/src/collection/index.ts`](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts). -See the existing implementations in [`../packages/db`](https://github.com/TanStack/db/tree/main/packages/db), [`../packages/query-db-collection`](https://github.com/TanStack/db/tree/main/packages/query-db-collection), [`../packages/electric-db-collection`](https://github.com/TanStack/db/tree/main/packages/electric-db-collection) and [`../packages/trailbase-db-collection`](https://github.com/TanStack/db/tree/main/packages/trailbase-db-collection) for reference. Also see the [Collection Options Creator guide](../guides/collection-options-creator.md) for a pattern to create reusable collection configuration factories. +See the existing implementations in [`../packages/db`](https://github.com/TanStack/db/tree/main/packages/db), [`../packages/query-db-collection`](https://github.com/TanStack/db/tree/main/packages/query-db-collection), [`../packages/electric-db-collection`](https://github.com/TanStack/db/tree/main/packages/electric-db-collection) and [`../packages/trailbase-db-collection`](https://github.com/TanStack/db/tree/main/packages/trailbase-db-collection) for reference. Also see the [Collection Options Creator guide](./guides/collection-options-creator.md) for a pattern to create reusable collection configuration factories. ### Live queries @@ -337,7 +337,7 @@ const App = () => ( ) ``` -See the [React Suspense section in Live Queries](../guides/live-queries#using-with-react-suspense) for detailed usage patterns and when to use `useLiveSuspenseQuery` vs `useLiveQuery`. +See the [React Suspense section in Live Queries](./guides/live-queries#using-with-react-suspense) for detailed usage patterns and when to use `useLiveSuspenseQuery` vs `useLiveQuery`. #### `queryBuilder` @@ -362,13 +362,13 @@ Note also that: 1. the query results [are themselves a collection](#derived-collections) 2. the `useLiveQuery` automatically starts and stops live query subscriptions when you mount and unmount your components; if you're creating queries manually, you need to manually manage the subscription lifecycle yourself -See the [Live Queries](../guides/live-queries.md) documentation for more details. +See the [Live Queries](./guides/live-queries.md) documentation for more details. ### Transactional mutators For more complex mutations beyond simple CRUD operations, TanStack DB provides `createOptimisticAction` and `createTransaction` for creating custom mutations with full control over the mutation lifecycle. -See the [Mutations guide](../guides/mutations.md) for comprehensive documentation on: +See the [Mutations guide](./guides/mutations.md) for comprehensive documentation on: - Creating custom actions with `createOptimisticAction` - Manual transactions with `createTransaction` diff --git a/docs/quick-start.md b/docs/quick-start.md index 5b53bff94..ea6799974 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -178,6 +178,6 @@ You now understand the basics of TanStack DB! The collection loads and persists Explore the docs to learn more about: -- **[Installation](../installation.md)** - All framework and collection packages -- **[Overview](../overview.md)** - Complete feature overview and examples -- **[Live Queries](../guides/live-queries.md)** - Advanced querying, joins, and aggregations +- **[Installation](./installation.md)** - All framework and collection packages +- **[Overview](./overview.md)** - Complete feature overview and examples +- **[Live Queries](./guides/live-queries.md)** - Advanced querying, joins, and aggregations diff --git a/docs/reference/@tanstack/namespaces/IR/classes/Aggregate.md b/docs/reference/@tanstack/namespaces/IR/classes/Aggregate.md index 7a9758d72..75915c41c 100644 --- a/docs/reference/@tanstack/namespaces/IR/classes/Aggregate.md +++ b/docs/reference/@tanstack/namespaces/IR/classes/Aggregate.md @@ -35,7 +35,7 @@ Defined in: [packages/db/src/query/ir.ts:127](https://github.com/TanStack/db/blo ##### args -[`BasicExpression`](../../type-aliases/BasicExpression.md)\<`any`\>[] +[`BasicExpression`](../type-aliases/BasicExpression.md)\<`any`\>[] #### Returns diff --git a/docs/reference/@tanstack/namespaces/IR/classes/CollectionRef.md b/docs/reference/@tanstack/namespaces/IR/classes/CollectionRef.md index 0d820a8b1..1550a7e6f 100644 --- a/docs/reference/@tanstack/namespaces/IR/classes/CollectionRef.md +++ b/docs/reference/@tanstack/namespaces/IR/classes/CollectionRef.md @@ -25,7 +25,7 @@ Defined in: [packages/db/src/query/ir.ts:74](https://github.com/TanStack/db/blob ##### collection -[`CollectionImpl`](../../../../../classes/CollectionImpl.md) +[`CollectionImpl`](../../../../classes/CollectionImpl.md) ##### alias diff --git a/docs/reference/@tanstack/namespaces/IR/classes/Func.md b/docs/reference/@tanstack/namespaces/IR/classes/Func.md index 3550d8362..37fe6c377 100644 --- a/docs/reference/@tanstack/namespaces/IR/classes/Func.md +++ b/docs/reference/@tanstack/namespaces/IR/classes/Func.md @@ -35,7 +35,7 @@ Defined in: [packages/db/src/query/ir.ts:112](https://github.com/TanStack/db/blo ##### args -[`BasicExpression`](../../type-aliases/BasicExpression.md)\<`any`\>[] +[`BasicExpression`](../type-aliases/BasicExpression.md)\<`any`\>[] #### Returns diff --git a/docs/reference/@tanstack/namespaces/IR/classes/QueryRef.md b/docs/reference/@tanstack/namespaces/IR/classes/QueryRef.md index 6650b0389..5f29109ba 100644 --- a/docs/reference/@tanstack/namespaces/IR/classes/QueryRef.md +++ b/docs/reference/@tanstack/namespaces/IR/classes/QueryRef.md @@ -25,7 +25,7 @@ Defined in: [packages/db/src/query/ir.ts:84](https://github.com/TanStack/db/blob ##### query -[`QueryIR`](../../interfaces/QueryIR.md) +[`QueryIR`](../interfaces/QueryIR.md) ##### alias diff --git a/docs/reference/@tanstack/namespaces/IR/functions/createResidualWhere.md b/docs/reference/@tanstack/namespaces/IR/functions/createResidualWhere.md index 05ed3ea3d..93851c21c 100644 --- a/docs/reference/@tanstack/namespaces/IR/functions/createResidualWhere.md +++ b/docs/reference/@tanstack/namespaces/IR/functions/createResidualWhere.md @@ -17,8 +17,8 @@ Create a residual Where clause from an expression ### expression -[`BasicExpression`](../../type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../type-aliases/BasicExpression.md)\<`boolean`\> ## Returns -[`Where`](../../type-aliases/Where.md) +[`Where`](../type-aliases/Where.md) diff --git a/docs/reference/@tanstack/namespaces/IR/functions/followRef.md b/docs/reference/@tanstack/namespaces/IR/functions/followRef.md index 8b1fca465..3147d38c1 100644 --- a/docs/reference/@tanstack/namespaces/IR/functions/followRef.md +++ b/docs/reference/@tanstack/namespaces/IR/functions/followRef.md @@ -26,21 +26,21 @@ until its finds the root field the reference points to. ### query -[`QueryIR`](../../interfaces/QueryIR.md) +[`QueryIR`](../interfaces/QueryIR.md) ### ref -[`PropRef`](../../classes/PropRef.md)\<`any`\> +[`PropRef`](../classes/PropRef.md)\<`any`\> ### collection -[`Collection`](../../../../../interfaces/Collection.md) +[`Collection`](../../../../interfaces/Collection.md) ## Returns \| `void` \| \{ - `collection`: [`Collection`](../../../../../interfaces/Collection.md); + `collection`: [`Collection`](../../../../interfaces/Collection.md); `path`: `string`[]; \} diff --git a/docs/reference/@tanstack/namespaces/IR/functions/getHavingExpression.md b/docs/reference/@tanstack/namespaces/IR/functions/getHavingExpression.md index 0fe5ee30c..a52e0646a 100644 --- a/docs/reference/@tanstack/namespaces/IR/functions/getHavingExpression.md +++ b/docs/reference/@tanstack/namespaces/IR/functions/getHavingExpression.md @@ -20,9 +20,9 @@ HAVING clauses can contain aggregates, unlike regular WHERE clauses ### having -[`Where`](../../type-aliases/Where.md) +[`Where`](../type-aliases/Where.md) ## Returns - \| [`Aggregate`](../../classes/Aggregate.md)\<`any`\> - \| [`BasicExpression`](../../type-aliases/BasicExpression.md)\<`any`\> + \| [`Aggregate`](../classes/Aggregate.md)\<`any`\> + \| [`BasicExpression`](../type-aliases/BasicExpression.md)\<`any`\> diff --git a/docs/reference/@tanstack/namespaces/IR/functions/getWhereExpression.md b/docs/reference/@tanstack/namespaces/IR/functions/getWhereExpression.md index fbc8b9808..41bb467a8 100644 --- a/docs/reference/@tanstack/namespaces/IR/functions/getWhereExpression.md +++ b/docs/reference/@tanstack/namespaces/IR/functions/getWhereExpression.md @@ -17,8 +17,8 @@ Extract the expression from a Where clause ### where -[`Where`](../../type-aliases/Where.md) +[`Where`](../type-aliases/Where.md) ## Returns -[`BasicExpression`](../../type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../type-aliases/BasicExpression.md)\<`boolean`\> diff --git a/docs/reference/@tanstack/namespaces/IR/functions/isResidualWhere.md b/docs/reference/@tanstack/namespaces/IR/functions/isResidualWhere.md index 3b433feff..28f2a059c 100644 --- a/docs/reference/@tanstack/namespaces/IR/functions/isResidualWhere.md +++ b/docs/reference/@tanstack/namespaces/IR/functions/isResidualWhere.md @@ -17,7 +17,7 @@ Check if a Where clause is marked as residual ### where -[`Where`](../../type-aliases/Where.md) +[`Where`](../type-aliases/Where.md) ## Returns diff --git a/docs/reference/@tanstack/namespaces/IR/index.md b/docs/reference/@tanstack/namespaces/IR/index.md index e1937961e..2e6b180ed 100644 --- a/docs/reference/@tanstack/namespaces/IR/index.md +++ b/docs/reference/@tanstack/namespaces/IR/index.md @@ -7,38 +7,38 @@ title: IR ## Classes -- [Aggregate](../classes/Aggregate.md) -- [CollectionRef](../classes/CollectionRef.md) -- [Func](../classes/Func.md) -- [PropRef](../classes/PropRef.md) -- [QueryRef](../classes/QueryRef.md) -- [Value](../classes/Value.md) +- [Aggregate](classes/Aggregate.md) +- [CollectionRef](classes/CollectionRef.md) +- [Func](classes/Func.md) +- [PropRef](classes/PropRef.md) +- [QueryRef](classes/QueryRef.md) +- [Value](classes/Value.md) ## Interfaces -- [JoinClause](../interfaces/JoinClause.md) -- [QueryIR](../interfaces/QueryIR.md) +- [JoinClause](interfaces/JoinClause.md) +- [QueryIR](interfaces/QueryIR.md) ## Type Aliases -- [BasicExpression](../type-aliases/BasicExpression.md) -- [From](../type-aliases/From.md) -- [GroupBy](../type-aliases/GroupBy.md) -- [Having](../type-aliases/Having.md) -- [Join](../type-aliases/Join.md) -- [Limit](../type-aliases/Limit.md) -- [Offset](../type-aliases/Offset.md) -- [OrderBy](../type-aliases/OrderBy.md) -- [OrderByClause](../type-aliases/OrderByClause.md) -- [OrderByDirection](../type-aliases/OrderByDirection.md) -- [Select](../type-aliases/Select.md) -- [Where](../type-aliases/Where.md) +- [BasicExpression](type-aliases/BasicExpression.md) +- [From](type-aliases/From.md) +- [GroupBy](type-aliases/GroupBy.md) +- [Having](type-aliases/Having.md) +- [Join](type-aliases/Join.md) +- [Limit](type-aliases/Limit.md) +- [Offset](type-aliases/Offset.md) +- [OrderBy](type-aliases/OrderBy.md) +- [OrderByClause](type-aliases/OrderByClause.md) +- [OrderByDirection](type-aliases/OrderByDirection.md) +- [Select](type-aliases/Select.md) +- [Where](type-aliases/Where.md) ## Functions -- [createResidualWhere](../functions/createResidualWhere.md) -- [followRef](../functions/followRef.md) -- [getHavingExpression](../functions/getHavingExpression.md) -- [getWhereExpression](../functions/getWhereExpression.md) -- [isExpressionLike](../functions/isExpressionLike.md) -- [isResidualWhere](../functions/isResidualWhere.md) +- [createResidualWhere](functions/createResidualWhere.md) +- [followRef](functions/followRef.md) +- [getHavingExpression](functions/getHavingExpression.md) +- [getWhereExpression](functions/getWhereExpression.md) +- [isExpressionLike](functions/isExpressionLike.md) +- [isResidualWhere](functions/isResidualWhere.md) diff --git a/docs/reference/@tanstack/namespaces/IR/interfaces/QueryIR.md b/docs/reference/@tanstack/namespaces/IR/interfaces/QueryIR.md index 835f2b562..c47622a9e 100644 --- a/docs/reference/@tanstack/namespaces/IR/interfaces/QueryIR.md +++ b/docs/reference/@tanstack/namespaces/IR/interfaces/QueryIR.md @@ -31,7 +31,7 @@ Defined in: [packages/db/src/query/ir.ts:25](https://github.com/TanStack/db/blob ##### row -[`NamespacedRow`](../../../../../type-aliases/NamespacedRow.md) +[`NamespacedRow`](../../../../type-aliases/NamespacedRow.md) #### Returns @@ -51,7 +51,7 @@ Defined in: [packages/db/src/query/ir.ts:23](https://github.com/TanStack/db/blob ##### row -[`NamespacedRow`](../../../../../type-aliases/NamespacedRow.md) +[`NamespacedRow`](../../../../type-aliases/NamespacedRow.md) #### Returns @@ -71,7 +71,7 @@ Defined in: [packages/db/src/query/ir.ts:24](https://github.com/TanStack/db/blob ##### row -[`NamespacedRow`](../../../../../type-aliases/NamespacedRow.md) +[`NamespacedRow`](../../../../type-aliases/NamespacedRow.md) #### Returns diff --git a/docs/reference/classes/AggregateFunctionNotInSelectError.md b/docs/reference/classes/AggregateFunctionNotInSelectError.md index d4d41540e..26ca39d02 100644 --- a/docs/reference/classes/AggregateFunctionNotInSelectError.md +++ b/docs/reference/classes/AggregateFunctionNotInSelectError.md @@ -5,11 +5,11 @@ title: AggregateFunctionNotInSelectError # Class: AggregateFunctionNotInSelectError -Defined in: [packages/db/src/errors.ts:556](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L556) +Defined in: [packages/db/src/errors.ts:565](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L565) ## Extends -- [`GroupByError`](../GroupByError.md) +- [`GroupByError`](GroupByError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:556](https://github.com/TanStack/db/blob/ new AggregateFunctionNotInSelectError(functionName): AggregateFunctionNotInSelectError; ``` -Defined in: [packages/db/src/errors.ts:557](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L557) +Defined in: [packages/db/src/errors.ts:566](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L566) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:557](https://github.com/TanStack/db/blob/ #### Overrides -[`GroupByError`](../GroupByError.md).[`constructor`](../GroupByError.md#constructor) +[`GroupByError`](GroupByError.md).[`constructor`](GroupByError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`GroupByError`](../GroupByError.md).[`cause`](../GroupByError.md#cause) +[`GroupByError`](GroupByError.md).[`cause`](GroupByError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`GroupByError`](../GroupByError.md).[`message`](../GroupByError.md#message) +[`GroupByError`](GroupByError.md).[`message`](GroupByError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`GroupByError`](../GroupByError.md).[`name`](../GroupByError.md#name) +[`GroupByError`](GroupByError.md).[`name`](GroupByError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`GroupByError`](../GroupByError.md).[`stack`](../GroupByError.md#stack) +[`GroupByError`](GroupByError.md).[`stack`](GroupByError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`GroupByError`](../GroupByError.md).[`stackTraceLimit`](../GroupByError.md#stacktracelimit) +[`GroupByError`](GroupByError.md).[`stackTraceLimit`](GroupByError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`GroupByError`](../GroupByError.md).[`captureStackTrace`](../GroupByError.md#capturestacktrace) +[`GroupByError`](GroupByError.md).[`captureStackTrace`](GroupByError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`GroupByError`](../GroupByError.md).[`prepareStackTrace`](../GroupByError.md#preparestacktrace) +[`GroupByError`](GroupByError.md).[`prepareStackTrace`](GroupByError.md#preparestacktrace) diff --git a/docs/reference/classes/AggregateNotSupportedError.md b/docs/reference/classes/AggregateNotSupportedError.md index a880fa93a..ef2169e5a 100644 --- a/docs/reference/classes/AggregateNotSupportedError.md +++ b/docs/reference/classes/AggregateNotSupportedError.md @@ -5,13 +5,13 @@ title: AggregateNotSupportedError # Class: AggregateNotSupportedError -Defined in: [packages/db/src/errors.ts:672](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L672) +Defined in: [packages/db/src/errors.ts:681](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L681) Error thrown when aggregate expressions are used outside of a GROUP BY context. ## Extends -- [`QueryCompilationError`](../QueryCompilationError.md) +- [`QueryCompilationError`](QueryCompilationError.md) ## Constructors @@ -21,7 +21,7 @@ Error thrown when aggregate expressions are used outside of a GROUP BY context. new AggregateNotSupportedError(): AggregateNotSupportedError; ``` -Defined in: [packages/db/src/errors.ts:673](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L673) +Defined in: [packages/db/src/errors.ts:682](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L682) #### Returns @@ -29,7 +29,7 @@ Defined in: [packages/db/src/errors.ts:673](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryCompilationError`](../QueryCompilationError.md).[`constructor`](../QueryCompilationError.md#constructor) +[`QueryCompilationError`](QueryCompilationError.md).[`constructor`](QueryCompilationError.md#constructor) ## Properties @@ -43,7 +43,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`cause`](../QueryCompilationError.md#cause) +[`QueryCompilationError`](QueryCompilationError.md).[`cause`](QueryCompilationError.md#cause) *** @@ -57,7 +57,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`message`](../QueryCompilationError.md#message) +[`QueryCompilationError`](QueryCompilationError.md).[`message`](QueryCompilationError.md#message) *** @@ -71,7 +71,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`name`](../QueryCompilationError.md#name) +[`QueryCompilationError`](QueryCompilationError.md).[`name`](QueryCompilationError.md#name) *** @@ -85,7 +85,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stack`](../QueryCompilationError.md#stack) +[`QueryCompilationError`](QueryCompilationError.md).[`stack`](QueryCompilationError.md#stack) *** @@ -109,7 +109,7 @@ not capture any frames. #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stackTraceLimit`](../QueryCompilationError.md#stacktracelimit) +[`QueryCompilationError`](QueryCompilationError.md).[`stackTraceLimit`](QueryCompilationError.md#stacktracelimit) ## Methods @@ -181,7 +181,7 @@ a(); #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`captureStackTrace`](../QueryCompilationError.md#capturestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`captureStackTrace`](QueryCompilationError.md#capturestacktrace) *** @@ -213,4 +213,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`prepareStackTrace`](../QueryCompilationError.md#preparestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`prepareStackTrace`](QueryCompilationError.md#preparestacktrace) diff --git a/docs/reference/classes/BTreeIndex.md b/docs/reference/classes/BTreeIndex.md index fe55cef10..68054f1c3 100644 --- a/docs/reference/classes/BTreeIndex.md +++ b/docs/reference/classes/BTreeIndex.md @@ -5,14 +5,14 @@ title: BTreeIndex # Class: BTreeIndex\ -Defined in: [packages/db/src/indexes/btree-index.ts:30](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L30) +Defined in: [packages/db/src/indexes/btree-index.ts:31](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L31) B+Tree index for sorted data with range queries This maintains items in sorted order and provides efficient range operations ## Extends -- [`BaseIndex`](../BaseIndex.md)\<`TKey`\> +- [`BaseIndex`](BaseIndex.md)\<`TKey`\> ## Type Parameters @@ -32,7 +32,7 @@ new BTreeIndex( options?): BTreeIndex; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:50](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L50) +Defined in: [packages/db/src/indexes/btree-index.ts:51](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L51) #### Parameters @@ -42,7 +42,7 @@ Defined in: [packages/db/src/indexes/btree-index.ts:50](https://github.com/TanSt ##### expression -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md) +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md) ##### name? @@ -58,7 +58,7 @@ Defined in: [packages/db/src/indexes/btree-index.ts:50](https://github.com/TanSt #### Overrides -[`BaseIndex`](../BaseIndex.md).[`constructor`](../BaseIndex.md#constructor) +[`BaseIndex`](BaseIndex.md).[`constructor`](BaseIndex.md#constructor) ## Properties @@ -72,7 +72,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:87](https://github.com/TanSta #### Inherited from -[`BaseIndex`](../BaseIndex.md).[`compareOptions`](../BaseIndex.md#compareoptions) +[`BaseIndex`](BaseIndex.md).[`compareOptions`](BaseIndex.md#compareoptions) *** @@ -86,7 +86,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:81](https://github.com/TanSta #### Inherited from -[`BaseIndex`](../BaseIndex.md).[`expression`](../BaseIndex.md#expression) +[`BaseIndex`](BaseIndex.md).[`expression`](BaseIndex.md#expression) *** @@ -100,7 +100,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:79](https://github.com/TanSta #### Inherited from -[`BaseIndex`](../BaseIndex.md).[`id`](../BaseIndex.md#id) +[`BaseIndex`](BaseIndex.md).[`id`](BaseIndex.md#id) *** @@ -114,7 +114,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:86](https://github.com/TanSta #### Inherited from -[`BaseIndex`](../BaseIndex.md).[`lastUpdated`](../BaseIndex.md#lastupdated) +[`BaseIndex`](BaseIndex.md).[`lastUpdated`](BaseIndex.md#lastupdated) *** @@ -128,7 +128,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:84](https://github.com/TanSta #### Inherited from -[`BaseIndex`](../BaseIndex.md).[`lookupCount`](../BaseIndex.md#lookupcount) +[`BaseIndex`](BaseIndex.md).[`lookupCount`](BaseIndex.md#lookupcount) *** @@ -142,7 +142,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:80](https://github.com/TanSta #### Inherited from -[`BaseIndex`](../BaseIndex.md).[`name`](../BaseIndex.md#name) +[`BaseIndex`](BaseIndex.md).[`name`](BaseIndex.md#name) *** @@ -152,11 +152,11 @@ Defined in: [packages/db/src/indexes/base-index.ts:80](https://github.com/TanSta readonly supportedOperations: Set<"eq" | "gt" | "gte" | "lt" | "lte" | "in" | "like" | "ilike">; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:33](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L33) +Defined in: [packages/db/src/indexes/btree-index.ts:34](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L34) #### Overrides -[`BaseIndex`](../BaseIndex.md).[`supportedOperations`](../BaseIndex.md#supportedoperations) +[`BaseIndex`](BaseIndex.md).[`supportedOperations`](BaseIndex.md#supportedoperations) *** @@ -170,7 +170,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:85](https://github.com/TanSta #### Inherited from -[`BaseIndex`](../BaseIndex.md).[`totalLookupTime`](../BaseIndex.md#totallookuptime) +[`BaseIndex`](BaseIndex.md).[`totalLookupTime`](BaseIndex.md#totallookuptime) ## Accessors @@ -182,7 +182,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:85](https://github.com/TanSta get indexedKeysSet(): Set; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:333](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L333) +Defined in: [packages/db/src/indexes/btree-index.ts:337](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L337) ##### Returns @@ -190,7 +190,7 @@ Defined in: [packages/db/src/indexes/btree-index.ts:333](https://github.com/TanS #### Overrides -[`BaseIndex`](../BaseIndex.md).[`indexedKeysSet`](../BaseIndex.md#indexedkeysset) +[`BaseIndex`](BaseIndex.md).[`indexedKeysSet`](BaseIndex.md#indexedkeysset) *** @@ -202,7 +202,7 @@ Defined in: [packages/db/src/indexes/btree-index.ts:333](https://github.com/TanS get keyCount(): number; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:199](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L199) +Defined in: [packages/db/src/indexes/btree-index.ts:200](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L200) Gets the number of indexed keys @@ -212,7 +212,7 @@ Gets the number of indexed keys #### Overrides -[`BaseIndex`](../BaseIndex.md).[`keyCount`](../BaseIndex.md#keycount) +[`BaseIndex`](BaseIndex.md).[`keyCount`](BaseIndex.md#keycount) *** @@ -224,7 +224,7 @@ Gets the number of indexed keys get orderedEntriesArray(): [any, Set][]; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:337](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L337) +Defined in: [packages/db/src/indexes/btree-index.ts:341](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L341) ##### Returns @@ -232,7 +232,7 @@ Defined in: [packages/db/src/indexes/btree-index.ts:337](https://github.com/TanS #### Overrides -[`BaseIndex`](../BaseIndex.md).[`orderedEntriesArray`](../BaseIndex.md#orderedentriesarray) +[`BaseIndex`](BaseIndex.md).[`orderedEntriesArray`](BaseIndex.md#orderedentriesarray) *** @@ -244,7 +244,7 @@ Defined in: [packages/db/src/indexes/btree-index.ts:337](https://github.com/TanS get orderedEntriesArrayReversed(): [any, Set][]; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:343](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L343) +Defined in: [packages/db/src/indexes/btree-index.ts:347](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L347) ##### Returns @@ -252,7 +252,7 @@ Defined in: [packages/db/src/indexes/btree-index.ts:343](https://github.com/TanS #### Overrides -[`BaseIndex`](../BaseIndex.md).[`orderedEntriesArrayReversed`](../BaseIndex.md#orderedentriesarrayreversed) +[`BaseIndex`](BaseIndex.md).[`orderedEntriesArrayReversed`](BaseIndex.md#orderedentriesarrayreversed) *** @@ -264,7 +264,7 @@ Defined in: [packages/db/src/indexes/btree-index.ts:343](https://github.com/TanS get valueMapData(): Map>; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:350](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L350) +Defined in: [packages/db/src/indexes/btree-index.ts:354](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L354) ##### Returns @@ -272,7 +272,7 @@ Defined in: [packages/db/src/indexes/btree-index.ts:350](https://github.com/TanS #### Overrides -[`BaseIndex`](../BaseIndex.md).[`valueMapData`](../BaseIndex.md#valuemapdata) +[`BaseIndex`](BaseIndex.md).[`valueMapData`](BaseIndex.md#valuemapdata) ## Methods @@ -282,7 +282,7 @@ Defined in: [packages/db/src/indexes/btree-index.ts:350](https://github.com/TanS add(key, item): void; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:69](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L69) +Defined in: [packages/db/src/indexes/btree-index.ts:70](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L70) Adds a value to the index @@ -302,7 +302,7 @@ Adds a value to the index #### Overrides -[`BaseIndex`](../BaseIndex.md).[`add`](../BaseIndex.md#add) +[`BaseIndex`](BaseIndex.md).[`add`](BaseIndex.md#add) *** @@ -312,7 +312,7 @@ Adds a value to the index build(entries): void; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:143](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L143) +Defined in: [packages/db/src/indexes/btree-index.ts:144](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L144) Builds the index from a collection of entries @@ -328,7 +328,7 @@ Builds the index from a collection of entries #### Overrides -[`BaseIndex`](../BaseIndex.md).[`build`](../BaseIndex.md#build) +[`BaseIndex`](BaseIndex.md).[`build`](BaseIndex.md#build) *** @@ -338,7 +338,7 @@ Builds the index from a collection of entries clear(): void; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:154](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L154) +Defined in: [packages/db/src/indexes/btree-index.ts:155](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L155) Clears all data from the index @@ -348,7 +348,7 @@ Clears all data from the index #### Overrides -[`BaseIndex`](../BaseIndex.md).[`clear`](../BaseIndex.md#clear) +[`BaseIndex`](BaseIndex.md).[`clear`](BaseIndex.md#clear) *** @@ -358,7 +358,7 @@ Clears all data from the index equalityLookup(value): Set; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:208](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L208) +Defined in: [packages/db/src/indexes/btree-index.ts:209](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L209) Performs an equality lookup @@ -374,7 +374,7 @@ Performs an equality lookup #### Overrides -[`BaseIndex`](../BaseIndex.md).[`equalityLookup`](../BaseIndex.md#equalitylookup) +[`BaseIndex`](BaseIndex.md).[`equalityLookup`](BaseIndex.md#equalitylookup) *** @@ -398,7 +398,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:182](https://github.com/TanSt #### Inherited from -[`BaseIndex`](../BaseIndex.md).[`evaluateIndexExpression`](../BaseIndex.md#evaluateindexexpression) +[`BaseIndex`](BaseIndex.md).[`evaluateIndexExpression`](BaseIndex.md#evaluateindexexpression) *** @@ -412,11 +412,11 @@ Defined in: [packages/db/src/indexes/base-index.ts:169](https://github.com/TanSt #### Returns -[`IndexStats`](../../interfaces/IndexStats.md) +[`IndexStats`](../interfaces/IndexStats.md) #### Inherited from -[`BaseIndex`](../BaseIndex.md).[`getStats`](../BaseIndex.md#getstats) +[`BaseIndex`](BaseIndex.md).[`getStats`](BaseIndex.md#getstats) *** @@ -426,7 +426,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:169](https://github.com/TanSt inArrayLookup(values): Set; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:318](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L318) +Defined in: [packages/db/src/indexes/btree-index.ts:322](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L322) Performs an IN array lookup @@ -442,7 +442,7 @@ Performs an IN array lookup #### Overrides -[`BaseIndex`](../BaseIndex.md).[`inArrayLookup`](../BaseIndex.md#inarraylookup) +[`BaseIndex`](BaseIndex.md).[`inArrayLookup`](BaseIndex.md#inarraylookup) *** @@ -452,13 +452,13 @@ Performs an IN array lookup protected initialize(_options?): void; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:64](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L64) +Defined in: [packages/db/src/indexes/btree-index.ts:65](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L65) #### Parameters ##### \_options? -[`BTreeIndexOptions`](../../interfaces/BTreeIndexOptions.md) +[`BTreeIndexOptions`](../interfaces/BTreeIndexOptions.md) #### Returns @@ -466,7 +466,7 @@ Defined in: [packages/db/src/indexes/btree-index.ts:64](https://github.com/TanSt #### Overrides -[`BaseIndex`](../BaseIndex.md).[`initialize`](../BaseIndex.md#initialize) +[`BaseIndex`](BaseIndex.md).[`initialize`](BaseIndex.md#initialize) *** @@ -476,7 +476,7 @@ Defined in: [packages/db/src/indexes/btree-index.ts:64](https://github.com/TanSt lookup(operation, value): Set; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:164](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L164) +Defined in: [packages/db/src/indexes/btree-index.ts:165](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L165) Performs a lookup operation @@ -496,7 +496,7 @@ Performs a lookup operation #### Overrides -[`BaseIndex`](../BaseIndex.md).[`lookup`](../BaseIndex.md#lookup) +[`BaseIndex`](BaseIndex.md).[`lookup`](BaseIndex.md#lookup) *** @@ -523,7 +523,7 @@ The direction is ignored because the index can be reversed if the direction is d #### Inherited from -[`BaseIndex`](../BaseIndex.md).[`matchesCompareOptions`](../BaseIndex.md#matchescompareoptions) +[`BaseIndex`](BaseIndex.md).[`matchesCompareOptions`](BaseIndex.md#matchescompareoptions) *** @@ -541,7 +541,7 @@ Checks if the index matches the provided direction. ##### direction -[`OrderByDirection`](../../@tanstack/namespaces/IR/type-aliases/OrderByDirection.md) +[`OrderByDirection`](../@tanstack/namespaces/IR/type-aliases/OrderByDirection.md) #### Returns @@ -549,7 +549,7 @@ Checks if the index matches the provided direction. #### Inherited from -[`BaseIndex`](../BaseIndex.md).[`matchesDirection`](../BaseIndex.md#matchesdirection) +[`BaseIndex`](BaseIndex.md).[`matchesDirection`](BaseIndex.md#matchesdirection) *** @@ -573,7 +573,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:134](https://github.com/TanSt #### Inherited from -[`BaseIndex`](../BaseIndex.md).[`matchesField`](../BaseIndex.md#matchesfield) +[`BaseIndex`](BaseIndex.md).[`matchesField`](BaseIndex.md#matchesfield) *** @@ -583,7 +583,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:134](https://github.com/TanSt rangeQuery(options): Set; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:217](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L217) +Defined in: [packages/db/src/indexes/btree-index.ts:218](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L218) Performs a range query with options This is more efficient for compound queries like "WHERE a > 5 AND a < 10" @@ -592,7 +592,7 @@ This is more efficient for compound queries like "WHERE a > 5 AND a < 10" ##### options -[`RangeQueryOptions`](../../interfaces/RangeQueryOptions.md) = `{}` +[`RangeQueryOptions`](../interfaces/RangeQueryOptions.md) = `{}` #### Returns @@ -600,7 +600,7 @@ This is more efficient for compound queries like "WHERE a > 5 AND a < 10" #### Overrides -[`BaseIndex`](../BaseIndex.md).[`rangeQuery`](../BaseIndex.md#rangequery) +[`BaseIndex`](BaseIndex.md).[`rangeQuery`](BaseIndex.md#rangequery) *** @@ -610,7 +610,7 @@ This is more efficient for compound queries like "WHERE a > 5 AND a < 10" rangeQueryReversed(options): Set; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:250](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L250) +Defined in: [packages/db/src/indexes/btree-index.ts:251](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L251) Performs a reversed range query @@ -618,7 +618,7 @@ Performs a reversed range query ##### options -[`RangeQueryOptions`](../../interfaces/RangeQueryOptions.md) = `{}` +[`RangeQueryOptions`](../interfaces/RangeQueryOptions.md) = `{}` #### Returns @@ -626,7 +626,7 @@ Performs a reversed range query #### Overrides -[`BaseIndex`](../BaseIndex.md).[`rangeQueryReversed`](../BaseIndex.md#rangequeryreversed) +[`BaseIndex`](BaseIndex.md).[`rangeQueryReversed`](BaseIndex.md#rangequeryreversed) *** @@ -636,7 +636,7 @@ Performs a reversed range query remove(key, item): void; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:100](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L100) +Defined in: [packages/db/src/indexes/btree-index.ts:101](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L101) Removes a value from the index @@ -656,7 +656,7 @@ Removes a value from the index #### Overrides -[`BaseIndex`](../BaseIndex.md).[`remove`](../BaseIndex.md#remove) +[`BaseIndex`](BaseIndex.md).[`remove`](BaseIndex.md#remove) *** @@ -680,7 +680,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:130](https://github.com/TanSt #### Inherited from -[`BaseIndex`](../BaseIndex.md).[`supports`](../BaseIndex.md#supports) +[`BaseIndex`](BaseIndex.md).[`supports`](BaseIndex.md#supports) *** @@ -693,7 +693,7 @@ take( filterFn?): TKey[]; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:295](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L295) +Defined in: [packages/db/src/indexes/btree-index.ts:299](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L299) Returns the next n items after the provided item or the first n items if no from item is provided. @@ -723,7 +723,7 @@ The next n items after the provided key. Returns the first n items if no from it #### Overrides -[`BaseIndex`](../BaseIndex.md).[`take`](../BaseIndex.md#take) +[`BaseIndex`](BaseIndex.md).[`take`](BaseIndex.md#take) *** @@ -736,7 +736,7 @@ takeReversed( filterFn?): TKey[]; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:306](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L306) +Defined in: [packages/db/src/indexes/btree-index.ts:310](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L310) Returns the next n items **before** the provided item (in descending order) or the last n items if no from item is provided. @@ -766,7 +766,7 @@ The next n items **before** the provided key. Returns the last n items if no fro #### Overrides -[`BaseIndex`](../BaseIndex.md).[`takeReversed`](../BaseIndex.md#takereversed) +[`BaseIndex`](BaseIndex.md).[`takeReversed`](BaseIndex.md#takereversed) *** @@ -790,7 +790,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:187](https://github.com/TanSt #### Inherited from -[`BaseIndex`](../BaseIndex.md).[`trackLookup`](../BaseIndex.md#tracklookup) +[`BaseIndex`](BaseIndex.md).[`trackLookup`](BaseIndex.md#tracklookup) *** @@ -803,7 +803,7 @@ update( newItem): void; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:135](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L135) +Defined in: [packages/db/src/indexes/btree-index.ts:136](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L136) Updates a value in the index @@ -827,7 +827,7 @@ Updates a value in the index #### Overrides -[`BaseIndex`](../BaseIndex.md).[`update`](../BaseIndex.md#update) +[`BaseIndex`](BaseIndex.md).[`update`](BaseIndex.md#update) *** @@ -845,4 +845,4 @@ Defined in: [packages/db/src/indexes/base-index.ts:193](https://github.com/TanSt #### Inherited from -[`BaseIndex`](../BaseIndex.md).[`updateTimestamp`](../BaseIndex.md#updatetimestamp) +[`BaseIndex`](BaseIndex.md).[`updateTimestamp`](BaseIndex.md#updatetimestamp) diff --git a/docs/reference/classes/BaseIndex.md b/docs/reference/classes/BaseIndex.md index a1a6434c5..0327f8674 100644 --- a/docs/reference/classes/BaseIndex.md +++ b/docs/reference/classes/BaseIndex.md @@ -11,7 +11,7 @@ Base abstract class that all index types extend ## Extended by -- [`BTreeIndex`](../BTreeIndex.md) +- [`BTreeIndex`](BTreeIndex.md) ## Type Parameters @@ -21,7 +21,7 @@ Base abstract class that all index types extend ## Implements -- [`IndexInterface`](../../interfaces/IndexInterface.md)\<`TKey`\> +- [`IndexInterface`](../interfaces/IndexInterface.md)\<`TKey`\> ## Constructors @@ -45,7 +45,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:89](https://github.com/TanSta ##### expression -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md) +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md) ##### name? @@ -157,7 +157,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:126](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`indexedKeysSet`](../../interfaces/IndexInterface.md#indexedkeysset) +[`IndexInterface`](../interfaces/IndexInterface.md).[`indexedKeysSet`](../interfaces/IndexInterface.md#indexedkeysset) *** @@ -177,7 +177,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:119](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`keyCount`](../../interfaces/IndexInterface.md#keycount) +[`IndexInterface`](../interfaces/IndexInterface.md).[`keyCount`](../interfaces/IndexInterface.md#keycount) *** @@ -197,7 +197,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:124](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`orderedEntriesArray`](../../interfaces/IndexInterface.md#orderedentriesarray) +[`IndexInterface`](../interfaces/IndexInterface.md).[`orderedEntriesArray`](../interfaces/IndexInterface.md#orderedentriesarray) *** @@ -217,7 +217,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:125](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`orderedEntriesArrayReversed`](../../interfaces/IndexInterface.md#orderedentriesarrayreversed) +[`IndexInterface`](../interfaces/IndexInterface.md).[`orderedEntriesArrayReversed`](../interfaces/IndexInterface.md#orderedentriesarrayreversed) *** @@ -237,7 +237,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:127](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`valueMapData`](../../interfaces/IndexInterface.md#valuemapdata) +[`IndexInterface`](../interfaces/IndexInterface.md).[`valueMapData`](../interfaces/IndexInterface.md#valuemapdata) ## Methods @@ -265,7 +265,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:103](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`add`](../../interfaces/IndexInterface.md#add) +[`IndexInterface`](../interfaces/IndexInterface.md).[`add`](../interfaces/IndexInterface.md#add) *** @@ -289,7 +289,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:106](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`build`](../../interfaces/IndexInterface.md#build) +[`IndexInterface`](../interfaces/IndexInterface.md).[`build`](../interfaces/IndexInterface.md#build) *** @@ -307,7 +307,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:107](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`clear`](../../interfaces/IndexInterface.md#clear) +[`IndexInterface`](../interfaces/IndexInterface.md).[`clear`](../interfaces/IndexInterface.md#clear) *** @@ -331,7 +331,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:120](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`equalityLookup`](../../interfaces/IndexInterface.md#equalitylookup) +[`IndexInterface`](../interfaces/IndexInterface.md).[`equalityLookup`](../interfaces/IndexInterface.md#equalitylookup) *** @@ -365,11 +365,11 @@ Defined in: [packages/db/src/indexes/base-index.ts:169](https://github.com/TanSt #### Returns -[`IndexStats`](../../interfaces/IndexStats.md) +[`IndexStats`](../interfaces/IndexStats.md) #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`getStats`](../../interfaces/IndexInterface.md#getstats) +[`IndexInterface`](../interfaces/IndexInterface.md).[`getStats`](../interfaces/IndexInterface.md#getstats) *** @@ -393,7 +393,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:121](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`inArrayLookup`](../../interfaces/IndexInterface.md#inarraylookup) +[`IndexInterface`](../interfaces/IndexInterface.md).[`inArrayLookup`](../interfaces/IndexInterface.md#inarraylookup) *** @@ -441,7 +441,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:108](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`lookup`](../../interfaces/IndexInterface.md#lookup) +[`IndexInterface`](../interfaces/IndexInterface.md).[`lookup`](../interfaces/IndexInterface.md#lookup) *** @@ -468,7 +468,7 @@ The direction is ignored because the index can be reversed if the direction is d #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`matchesCompareOptions`](../../interfaces/IndexInterface.md#matchescompareoptions) +[`IndexInterface`](../interfaces/IndexInterface.md).[`matchesCompareOptions`](../interfaces/IndexInterface.md#matchescompareoptions) *** @@ -486,7 +486,7 @@ Checks if the index matches the provided direction. ##### direction -[`OrderByDirection`](../../@tanstack/namespaces/IR/type-aliases/OrderByDirection.md) +[`OrderByDirection`](../@tanstack/namespaces/IR/type-aliases/OrderByDirection.md) #### Returns @@ -494,7 +494,7 @@ Checks if the index matches the provided direction. #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`matchesDirection`](../../interfaces/IndexInterface.md#matchesdirection) +[`IndexInterface`](../interfaces/IndexInterface.md).[`matchesDirection`](../interfaces/IndexInterface.md#matchesdirection) *** @@ -518,7 +518,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:134](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`matchesField`](../../interfaces/IndexInterface.md#matchesfield) +[`IndexInterface`](../interfaces/IndexInterface.md).[`matchesField`](../interfaces/IndexInterface.md#matchesfield) *** @@ -534,7 +534,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:122](https://github.com/TanSt ##### options -[`RangeQueryOptions`](../../interfaces/RangeQueryOptions.md) +[`RangeQueryOptions`](../interfaces/RangeQueryOptions.md) #### Returns @@ -542,7 +542,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:122](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`rangeQuery`](../../interfaces/IndexInterface.md#rangequery) +[`IndexInterface`](../interfaces/IndexInterface.md).[`rangeQuery`](../interfaces/IndexInterface.md#rangequery) *** @@ -558,7 +558,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:123](https://github.com/TanSt ##### options -[`RangeQueryOptions`](../../interfaces/RangeQueryOptions.md) +[`RangeQueryOptions`](../interfaces/RangeQueryOptions.md) #### Returns @@ -566,7 +566,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:123](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`rangeQueryReversed`](../../interfaces/IndexInterface.md#rangequeryreversed) +[`IndexInterface`](../interfaces/IndexInterface.md).[`rangeQueryReversed`](../interfaces/IndexInterface.md#rangequeryreversed) *** @@ -594,7 +594,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:104](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`remove`](../../interfaces/IndexInterface.md#remove) +[`IndexInterface`](../interfaces/IndexInterface.md).[`remove`](../interfaces/IndexInterface.md#remove) *** @@ -618,7 +618,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:130](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`supports`](../../interfaces/IndexInterface.md#supports) +[`IndexInterface`](../interfaces/IndexInterface.md).[`supports`](../interfaces/IndexInterface.md#supports) *** @@ -653,7 +653,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:109](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`take`](../../interfaces/IndexInterface.md#take) +[`IndexInterface`](../interfaces/IndexInterface.md).[`take`](../interfaces/IndexInterface.md#take) *** @@ -688,7 +688,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:114](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`takeReversed`](../../interfaces/IndexInterface.md#takereversed) +[`IndexInterface`](../interfaces/IndexInterface.md).[`takeReversed`](../interfaces/IndexInterface.md#takereversed) *** @@ -743,7 +743,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:105](https://github.com/TanSt #### Implementation of -[`IndexInterface`](../../interfaces/IndexInterface.md).[`update`](../../interfaces/IndexInterface.md#update) +[`IndexInterface`](../interfaces/IndexInterface.md).[`update`](../interfaces/IndexInterface.md#update) *** diff --git a/docs/reference/classes/BaseQueryBuilder.md b/docs/reference/classes/BaseQueryBuilder.md index 7789b52f1..57b094f15 100644 --- a/docs/reference/classes/BaseQueryBuilder.md +++ b/docs/reference/classes/BaseQueryBuilder.md @@ -11,7 +11,7 @@ Defined in: [packages/db/src/query/builder/index.ts:47](https://github.com/TanSt ### TContext -`TContext` *extends* [`Context`](../../interfaces/Context.md) = [`Context`](../../interfaces/Context.md) +`TContext` *extends* [`Context`](../interfaces/Context.md) = [`Context`](../interfaces/Context.md) ## Constructors @@ -27,7 +27,7 @@ Defined in: [packages/db/src/query/builder/index.ts:50](https://github.com/TanSt ##### query -`Partial`\<[`QueryIR`](../../@tanstack/namespaces/IR/interfaces/QueryIR.md)\> = `{}` +`Partial`\<[`QueryIR`](../@tanstack/namespaces/IR/interfaces/QueryIR.md)\> = `{}` #### Returns @@ -80,7 +80,7 @@ A function that receives an aggregated row and returns a boolean ###### Returns -[`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<`TContext`\> +[`QueryBuilder`](../type-aliases/QueryBuilder.md)\<`TContext`\> A QueryBuilder with functional having filter applied @@ -119,7 +119,7 @@ A function that receives a row and returns the selected value ###### Returns -[`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<`WithResult`\<`TContext`, `TFuncSelectResult`\>\> +[`QueryBuilder`](../type-aliases/QueryBuilder.md)\<`WithResult`\<`TContext`, `TFuncSelectResult`\>\> A QueryBuilder with functional selection applied @@ -154,7 +154,7 @@ A function that receives a row and returns a boolean ###### Returns -[`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<`TContext`\> +[`QueryBuilder`](../type-aliases/QueryBuilder.md)\<`TContext`\> A QueryBuilder with functional filtering applied @@ -179,7 +179,7 @@ Defined in: [packages/db/src/query/builder/index.ts:784](https://github.com/TanS #### Returns -[`QueryIR`](../../@tanstack/namespaces/IR/interfaces/QueryIR.md) +[`QueryIR`](../@tanstack/namespaces/IR/interfaces/QueryIR.md) *** @@ -196,7 +196,7 @@ Deduplicates rows based on the selected columns. #### Returns -[`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<`TContext`\> +[`QueryBuilder`](../type-aliases/QueryBuilder.md)\<`TContext`\> A QueryBuilder with distinct enabled @@ -224,7 +224,7 @@ Specify that the query should return a single result #### Returns -[`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<`TContext` & [`SingleResult`](../../type-aliases/SingleResult.md)\> +[`QueryBuilder`](../type-aliases/QueryBuilder.md)\<`TContext` & [`SingleResult`](../type-aliases/SingleResult.md)\> A QueryBuilder that returns the first result @@ -259,7 +259,7 @@ Specify the source table or subquery for the query ##### TSource -`TSource` *extends* [`Source`](../../type-aliases/Source.md) +`TSource` *extends* [`Source`](../type-aliases/Source.md) #### Parameters @@ -271,7 +271,7 @@ An object with a single key-value pair where the key is the table alias and the #### Returns -[`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<\{ +[`QueryBuilder`](../type-aliases/QueryBuilder.md)\<\{ `baseSchema`: `SchemaFromSource`\<`TSource`\>; `fromSourceName`: keyof `TSource` & `string`; `hasJoins`: `false`; @@ -307,7 +307,7 @@ Perform a FULL JOIN with another table or subquery ##### TSource -`TSource` *extends* [`Source`](../../type-aliases/Source.md) +`TSource` *extends* [`Source`](../type-aliases/Source.md) #### Parameters @@ -325,7 +325,7 @@ A function that receives table references and returns the join condition #### Returns -[`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<`MergeContextWithJoinType`\<`TContext`, `SchemaFromSource`\<`TSource`\>, `"full"`\>\> +[`QueryBuilder`](../type-aliases/QueryBuilder.md)\<`MergeContextWithJoinType`\<`TContext`, `SchemaFromSource`\<`TSource`\>, `"full"`\>\> A QueryBuilder with the full joined table available @@ -360,7 +360,7 @@ A function that receives table references and returns the field(s) to group by #### Returns -[`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<`TContext`\> +[`QueryBuilder`](../type-aliases/QueryBuilder.md)\<`TContext`\> A QueryBuilder with grouping applied (enables aggregate functions in SELECT and HAVING) @@ -409,7 +409,7 @@ A function that receives table references and returns an expression #### Returns -[`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<`TContext`\> +[`QueryBuilder`](../type-aliases/QueryBuilder.md)\<`TContext`\> A QueryBuilder with the having condition applied @@ -452,7 +452,7 @@ Perform an INNER JOIN with another table or subquery ##### TSource -`TSource` *extends* [`Source`](../../type-aliases/Source.md) +`TSource` *extends* [`Source`](../type-aliases/Source.md) #### Parameters @@ -470,7 +470,7 @@ A function that receives table references and returns the join condition #### Returns -[`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<`MergeContextWithJoinType`\<`TContext`, `SchemaFromSource`\<`TSource`\>, `"inner"`\>\> +[`QueryBuilder`](../type-aliases/QueryBuilder.md)\<`MergeContextWithJoinType`\<`TContext`, `SchemaFromSource`\<`TSource`\>, `"inner"`\>\> A QueryBuilder with the inner joined table available @@ -502,7 +502,7 @@ Join another table or subquery to the current query ##### TSource -`TSource` *extends* [`Source`](../../type-aliases/Source.md) +`TSource` *extends* [`Source`](../type-aliases/Source.md) ##### TJoinType @@ -530,7 +530,7 @@ The type of join: 'inner', 'left', 'right', or 'full' (defaults to 'left') #### Returns -[`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<`MergeContextWithJoinType`\<`TContext`, `SchemaFromSource`\<`TSource`\>, `TJoinType`\>\> +[`QueryBuilder`](../type-aliases/QueryBuilder.md)\<`MergeContextWithJoinType`\<`TContext`, `SchemaFromSource`\<`TSource`\>, `TJoinType`\>\> A QueryBuilder with the joined table available @@ -570,7 +570,7 @@ Perform a LEFT JOIN with another table or subquery ##### TSource -`TSource` *extends* [`Source`](../../type-aliases/Source.md) +`TSource` *extends* [`Source`](../type-aliases/Source.md) #### Parameters @@ -588,7 +588,7 @@ A function that receives table references and returns the join condition #### Returns -[`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<`MergeContextWithJoinType`\<`TContext`, `SchemaFromSource`\<`TSource`\>, `"left"`\>\> +[`QueryBuilder`](../type-aliases/QueryBuilder.md)\<`MergeContextWithJoinType`\<`TContext`, `SchemaFromSource`\<`TSource`\>, `"left"`\>\> A QueryBuilder with the left joined table available @@ -624,7 +624,7 @@ Maximum number of rows to return #### Returns -[`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<`TContext`\> +[`QueryBuilder`](../type-aliases/QueryBuilder.md)\<`TContext`\> A QueryBuilder with the limit applied @@ -661,7 +661,7 @@ Number of rows to skip #### Returns -[`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<`TContext`\> +[`QueryBuilder`](../type-aliases/QueryBuilder.md)\<`TContext`\> A QueryBuilder with the offset applied @@ -698,11 +698,11 @@ A function that receives table references and returns the field to sort by ##### options -[`OrderByDirection`](../../@tanstack/namespaces/IR/type-aliases/OrderByDirection.md) | `OrderByOptions` +[`OrderByDirection`](../@tanstack/namespaces/IR/type-aliases/OrderByDirection.md) | `OrderByOptions` #### Returns -[`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<`TContext`\> +[`QueryBuilder`](../type-aliases/QueryBuilder.md)\<`TContext`\> A QueryBuilder with the ordering applied @@ -742,7 +742,7 @@ Perform a RIGHT JOIN with another table or subquery ##### TSource -`TSource` *extends* [`Source`](../../type-aliases/Source.md) +`TSource` *extends* [`Source`](../type-aliases/Source.md) #### Parameters @@ -760,7 +760,7 @@ A function that receives table references and returns the join condition #### Returns -[`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<`MergeContextWithJoinType`\<`TContext`, `SchemaFromSource`\<`TSource`\>, `"right"`\>\> +[`QueryBuilder`](../type-aliases/QueryBuilder.md)\<`MergeContextWithJoinType`\<`TContext`, `SchemaFromSource`\<`TSource`\>, `"right"`\>\> A QueryBuilder with the right joined table available @@ -801,7 +801,7 @@ A function that receives table references and returns an object with selected fi #### Returns -[`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<`WithResult`\<`TContext`, `ResultTypeFromSelect`\<`TSelectObject`\>\>\> +[`QueryBuilder`](../type-aliases/QueryBuilder.md)\<`WithResult`\<`TContext`, `ResultTypeFromSelect`\<`TSelectObject`\>\>\> A QueryBuilder that returns only the selected fields @@ -856,7 +856,7 @@ A function that receives table references and returns an expression #### Returns -[`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<`TContext`\> +[`QueryBuilder`](../type-aliases/QueryBuilder.md)\<`TContext`\> A QueryBuilder with the where condition applied diff --git a/docs/reference/classes/CannotCombineEmptyExpressionListError.md b/docs/reference/classes/CannotCombineEmptyExpressionListError.md index 93536c9f8..fd9b8767c 100644 --- a/docs/reference/classes/CannotCombineEmptyExpressionListError.md +++ b/docs/reference/classes/CannotCombineEmptyExpressionListError.md @@ -5,11 +5,11 @@ title: CannotCombineEmptyExpressionListError # Class: CannotCombineEmptyExpressionListError -Defined in: [packages/db/src/errors.ts:635](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L635) +Defined in: [packages/db/src/errors.ts:644](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L644) ## Extends -- [`QueryOptimizerError`](../QueryOptimizerError.md) +- [`QueryOptimizerError`](QueryOptimizerError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:635](https://github.com/TanStack/db/blob/ new CannotCombineEmptyExpressionListError(): CannotCombineEmptyExpressionListError; ``` -Defined in: [packages/db/src/errors.ts:636](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L636) +Defined in: [packages/db/src/errors.ts:645](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L645) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:636](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryOptimizerError`](../QueryOptimizerError.md).[`constructor`](../QueryOptimizerError.md#constructor) +[`QueryOptimizerError`](QueryOptimizerError.md).[`constructor`](QueryOptimizerError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryOptimizerError`](../QueryOptimizerError.md).[`cause`](../QueryOptimizerError.md#cause) +[`QueryOptimizerError`](QueryOptimizerError.md).[`cause`](QueryOptimizerError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryOptimizerError`](../QueryOptimizerError.md).[`message`](../QueryOptimizerError.md#message) +[`QueryOptimizerError`](QueryOptimizerError.md).[`message`](QueryOptimizerError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryOptimizerError`](../QueryOptimizerError.md).[`name`](../QueryOptimizerError.md#name) +[`QueryOptimizerError`](QueryOptimizerError.md).[`name`](QueryOptimizerError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryOptimizerError`](../QueryOptimizerError.md).[`stack`](../QueryOptimizerError.md#stack) +[`QueryOptimizerError`](QueryOptimizerError.md).[`stack`](QueryOptimizerError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`QueryOptimizerError`](../QueryOptimizerError.md).[`stackTraceLimit`](../QueryOptimizerError.md#stacktracelimit) +[`QueryOptimizerError`](QueryOptimizerError.md).[`stackTraceLimit`](QueryOptimizerError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`QueryOptimizerError`](../QueryOptimizerError.md).[`captureStackTrace`](../QueryOptimizerError.md#capturestacktrace) +[`QueryOptimizerError`](QueryOptimizerError.md).[`captureStackTrace`](QueryOptimizerError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryOptimizerError`](../QueryOptimizerError.md).[`prepareStackTrace`](../QueryOptimizerError.md#preparestacktrace) +[`QueryOptimizerError`](QueryOptimizerError.md).[`prepareStackTrace`](QueryOptimizerError.md#preparestacktrace) diff --git a/docs/reference/classes/CollectionConfigurationError.md b/docs/reference/classes/CollectionConfigurationError.md index 2a1d4274f..e71badeba 100644 --- a/docs/reference/classes/CollectionConfigurationError.md +++ b/docs/reference/classes/CollectionConfigurationError.md @@ -9,14 +9,14 @@ Defined in: [packages/db/src/errors.ts:71](https://github.com/TanStack/db/blob/m ## Extends -- [`TanStackDBError`](../TanStackDBError.md) +- [`TanStackDBError`](TanStackDBError.md) ## Extended by -- [`CollectionRequiresConfigError`](../CollectionRequiresConfigError.md) -- [`CollectionRequiresSyncConfigError`](../CollectionRequiresSyncConfigError.md) -- [`InvalidSchemaError`](../InvalidSchemaError.md) -- [`SchemaMustBeSynchronousError`](../SchemaMustBeSynchronousError.md) +- [`CollectionRequiresConfigError`](CollectionRequiresConfigError.md) +- [`CollectionRequiresSyncConfigError`](CollectionRequiresSyncConfigError.md) +- [`InvalidSchemaError`](InvalidSchemaError.md) +- [`SchemaMustBeSynchronousError`](SchemaMustBeSynchronousError.md) ## Constructors @@ -40,7 +40,7 @@ Defined in: [packages/db/src/errors.ts:72](https://github.com/TanStack/db/blob/m #### Overrides -[`TanStackDBError`](../TanStackDBError.md).[`constructor`](../TanStackDBError.md#constructor) +[`TanStackDBError`](TanStackDBError.md).[`constructor`](TanStackDBError.md#constructor) ## Properties @@ -54,7 +54,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`cause`](../TanStackDBError.md#cause) +[`TanStackDBError`](TanStackDBError.md).[`cause`](TanStackDBError.md#cause) *** @@ -68,7 +68,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`message`](../TanStackDBError.md#message) +[`TanStackDBError`](TanStackDBError.md).[`message`](TanStackDBError.md#message) *** @@ -82,7 +82,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`name`](../TanStackDBError.md#name) +[`TanStackDBError`](TanStackDBError.md).[`name`](TanStackDBError.md#name) *** @@ -96,7 +96,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stack`](../TanStackDBError.md#stack) +[`TanStackDBError`](TanStackDBError.md).[`stack`](TanStackDBError.md#stack) *** @@ -120,7 +120,7 @@ not capture any frames. #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stackTraceLimit`](../TanStackDBError.md#stacktracelimit) +[`TanStackDBError`](TanStackDBError.md).[`stackTraceLimit`](TanStackDBError.md#stacktracelimit) ## Methods @@ -192,7 +192,7 @@ a(); #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`captureStackTrace`](../TanStackDBError.md#capturestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`captureStackTrace`](TanStackDBError.md#capturestacktrace) *** @@ -224,4 +224,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`prepareStackTrace`](../TanStackDBError.md#preparestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`prepareStackTrace`](TanStackDBError.md#preparestacktrace) diff --git a/docs/reference/classes/CollectionImpl.md b/docs/reference/classes/CollectionImpl.md index 3177f0e93..869656a40 100644 --- a/docs/reference/classes/CollectionImpl.md +++ b/docs/reference/classes/CollectionImpl.md @@ -9,7 +9,7 @@ Defined in: [packages/db/src/collection/index.ts:266](https://github.com/TanStac ## Extended by -- [`Collection`](../../interfaces/Collection.md) +- [`Collection`](../interfaces/Collection.md) ## Type Parameters @@ -23,7 +23,7 @@ Defined in: [packages/db/src/collection/index.ts:266](https://github.com/TanStac ### TUtils -`TUtils` *extends* [`UtilsRecord`](../../type-aliases/UtilsRecord.md) = \{ +`TUtils` *extends* [`UtilsRecord`](../type-aliases/UtilsRecord.md) = \{ \} ### TSchema @@ -50,7 +50,7 @@ Creates a new Collection instance ##### config -[`CollectionConfig`](../../interfaces/CollectionConfig.md)\<`TOutput`, `TKey`, `TSchema`\> +[`CollectionConfig`](../interfaces/CollectionConfig.md)\<`TOutput`, `TKey`, `TSchema`\> Configuration object for the collection @@ -132,11 +132,11 @@ Defined in: [packages/db/src/collection/index.ts:278](https://github.com/TanStac get compareOptions(): StringCollationConfig; ``` -Defined in: [packages/db/src/collection/index.ts:579](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L579) +Defined in: [packages/db/src/collection/index.ts:580](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L580) ##### Returns -[`StringCollationConfig`](../../type-aliases/StringCollationConfig.md) +[`StringCollationConfig`](../type-aliases/StringCollationConfig.md) *** @@ -148,13 +148,13 @@ Defined in: [packages/db/src/collection/index.ts:579](https://github.com/TanStac get indexes(): Map>; ``` -Defined in: [packages/db/src/collection/index.ts:564](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L564) +Defined in: [packages/db/src/collection/index.ts:565](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L565) Get resolved indexes for query optimization ##### Returns -`Map`\<`number`, [`BaseIndex`](../BaseIndex.md)\<`TKey`\>\> +`Map`\<`number`, [`BaseIndex`](BaseIndex.md)\<`TKey`\>\> *** @@ -166,7 +166,7 @@ Get resolved indexes for query optimization get isLoadingSubset(): boolean; ``` -Defined in: [packages/db/src/collection/index.ts:430](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L430) +Defined in: [packages/db/src/collection/index.ts:431](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L431) Check if the collection is currently loading more data @@ -186,7 +186,7 @@ true if the collection has pending load more operations, false otherwise get size(): number; ``` -Defined in: [packages/db/src/collection/index.ts:467](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L467) +Defined in: [packages/db/src/collection/index.ts:468](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L468) Get the current size of the collection (cached) @@ -204,7 +204,7 @@ Get the current size of the collection (cached) get state(): Map; ``` -Defined in: [packages/db/src/collection/index.ts:756](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L756) +Defined in: [packages/db/src/collection/index.ts:757](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L757) Gets the current state of the collection as a Map @@ -240,13 +240,13 @@ Map containing all items in the collection, with keys as identifiers get status(): CollectionStatus; ``` -Defined in: [packages/db/src/collection/index.ts:385](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L385) +Defined in: [packages/db/src/collection/index.ts:386](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L386) Gets the current status of the collection ##### Returns -[`CollectionStatus`](../../type-aliases/CollectionStatus.md) +[`CollectionStatus`](../type-aliases/CollectionStatus.md) *** @@ -258,7 +258,7 @@ Gets the current status of the collection get subscriberCount(): number; ``` -Defined in: [packages/db/src/collection/index.ts:392](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L392) +Defined in: [packages/db/src/collection/index.ts:393](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L393) Get the number of subscribers to the collection @@ -276,7 +276,7 @@ Get the number of subscribers to the collection get toArray(): TOutput[]; ``` -Defined in: [packages/db/src/collection/index.ts:785](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L785) +Defined in: [packages/db/src/collection/index.ts:786](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L786) Gets the current state of the collection as an Array @@ -294,7 +294,7 @@ An Array containing all items in the collection iterator: IterableIterator<[TKey, TOutput]>; ``` -Defined in: [packages/db/src/collection/index.ts:495](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L495) +Defined in: [packages/db/src/collection/index.ts:496](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L496) Get all entries (virtual derived state) @@ -310,7 +310,7 @@ Get all entries (virtual derived state) cleanup(): Promise; ``` -Defined in: [packages/db/src/collection/index.ts:919](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L919) +Defined in: [packages/db/src/collection/index.ts:920](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L920) Clean up the collection by stopping sync and clearing data This can be called manually or automatically by garbage collection @@ -327,7 +327,7 @@ This can be called manually or automatically by garbage collection createIndex(indexCallback, config): IndexProxy; ``` -Defined in: [packages/db/src/collection/index.ts:554](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L554) +Defined in: [packages/db/src/collection/index.ts:555](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L555) Creates an index on a collection for faster queries. Indexes significantly improve query performance by allowing constant time lookups @@ -337,7 +337,7 @@ and logarithmic time range queries instead of full scans. ##### TResolver -`TResolver` *extends* [`IndexResolver`](../../type-aliases/IndexResolver.md)\<`TKey`\> = *typeof* [`BTreeIndex`](../BTreeIndex.md) +`TResolver` *extends* [`IndexResolver`](../type-aliases/IndexResolver.md)\<`TKey`\> = *typeof* [`BTreeIndex`](BTreeIndex.md) The type of the index resolver (constructor or async loader) @@ -351,13 +351,13 @@ Function that extracts the indexed value from each item ##### config -[`IndexOptions`](../../interfaces/IndexOptions.md)\<`TResolver`\> = `{}` +[`IndexOptions`](../interfaces/IndexOptions.md)\<`TResolver`\> = `{}` Configuration including index type and type-specific options #### Returns -[`IndexProxy`](../IndexProxy.md)\<`TKey`\> +[`IndexProxy`](IndexProxy.md)\<`TKey`\> An index proxy that provides access to the index when ready @@ -397,7 +397,7 @@ currentStateAsChanges(options): | ChangeMessage[]; ``` -Defined in: [packages/db/src/collection/index.ts:823](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L823) +Defined in: [packages/db/src/collection/index.ts:824](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L824) Returns the current state of the collection as an array of changes @@ -405,14 +405,14 @@ Returns the current state of the collection as an array of changes ##### options -[`CurrentStateAsChangesOptions`](../../interfaces/CurrentStateAsChangesOptions.md) = `{}` +[`CurrentStateAsChangesOptions`](../interfaces/CurrentStateAsChangesOptions.md) = `{}` Options including optional where filter #### Returns \| `void` - \| [`ChangeMessage`](../../interfaces/ChangeMessage.md)\<`TOutput`, `string` \| `number`\>[] + \| [`ChangeMessage`](../interfaces/ChangeMessage.md)\<`TOutput`, `string` \| `number`\>[] An array of changes @@ -441,7 +441,7 @@ const activeChanges = collection.currentStateAsChanges({ delete(keys, config?): Transaction; ``` -Defined in: [packages/db/src/collection/index.ts:733](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L733) +Defined in: [packages/db/src/collection/index.ts:734](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L734) Deletes one or more items from the collection @@ -455,13 +455,13 @@ Single key or array of keys to delete ##### config? -[`OperationConfig`](../../interfaces/OperationConfig.md) +[`OperationConfig`](../interfaces/OperationConfig.md) Optional configuration including metadata #### Returns -[`Transaction`](../../interfaces/Transaction.md)\<`any`\> +[`Transaction`](../interfaces/Transaction.md)\<`any`\> A Transaction object representing the delete operation(s) @@ -504,7 +504,7 @@ try { entries(): IterableIterator<[TKey, TOutput]>; ``` -Defined in: [packages/db/src/collection/index.ts:488](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L488) +Defined in: [packages/db/src/collection/index.ts:489](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L489) Get all entries (virtual derived state) @@ -520,7 +520,7 @@ Get all entries (virtual derived state) forEach(callbackfn): void; ``` -Defined in: [packages/db/src/collection/index.ts:502](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L502) +Defined in: [packages/db/src/collection/index.ts:503](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L503) Execute a callback for each entry in the collection @@ -542,7 +542,7 @@ Execute a callback for each entry in the collection get(key): TOutput | undefined; ``` -Defined in: [packages/db/src/collection/index.ts:453](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L453) +Defined in: [packages/db/src/collection/index.ts:454](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L454) Get the current value for a key (virtual derived state) @@ -564,7 +564,7 @@ Get the current value for a key (virtual derived state) getKeyFromItem(item): TKey; ``` -Defined in: [packages/db/src/collection/index.ts:517](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L517) +Defined in: [packages/db/src/collection/index.ts:518](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L518) #### Parameters @@ -584,7 +584,7 @@ Defined in: [packages/db/src/collection/index.ts:517](https://github.com/TanStac has(key): boolean; ``` -Defined in: [packages/db/src/collection/index.ts:460](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L460) +Defined in: [packages/db/src/collection/index.ts:461](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L461) Check if a key exists in the collection (virtual derived state) @@ -608,7 +608,7 @@ insert(data, config?): | Transaction; ``` -Defined in: [packages/db/src/collection/index.ts:620](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L620) +Defined in: [packages/db/src/collection/index.ts:621](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L621) Inserts one or more items into the collection @@ -620,14 +620,14 @@ Inserts one or more items into the collection ##### config? -[`InsertConfig`](../../interfaces/InsertConfig.md) +[`InsertConfig`](../interfaces/InsertConfig.md) Optional configuration including metadata #### Returns - \| [`Transaction`](../../interfaces/Transaction.md)\<`Record`\<`string`, `unknown`\>\> - \| [`Transaction`](../../interfaces/Transaction.md)\<`TOutput`\> + \| [`Transaction`](../interfaces/Transaction.md)\<`Record`\<`string`, `unknown`\>\> + \| [`Transaction`](../interfaces/Transaction.md)\<`TOutput`\> A Transaction object representing the insert operation(s) @@ -679,7 +679,7 @@ try { isReady(): boolean; ``` -Defined in: [packages/db/src/collection/index.ts:422](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L422) +Defined in: [packages/db/src/collection/index.ts:423](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L423) Check if the collection is ready for use Returns true if the collection has been marked as ready by its sync implementation @@ -709,7 +709,7 @@ if (collection.isReady()) { keys(): IterableIterator; ``` -Defined in: [packages/db/src/collection/index.ts:474](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L474) +Defined in: [packages/db/src/collection/index.ts:475](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L475) Get all keys (virtual derived state) @@ -725,7 +725,7 @@ Get all keys (virtual derived state) map(callbackfn): U[]; ``` -Defined in: [packages/db/src/collection/index.ts:511](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L511) +Defined in: [packages/db/src/collection/index.ts:512](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L512) Create a new array with the results of calling a function for each entry in the collection @@ -753,7 +753,7 @@ Create a new array with the results of calling a function for each entry in the off(event, callback): void; ``` -Defined in: [packages/db/src/collection/index.ts:898](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L898) +Defined in: [packages/db/src/collection/index.ts:899](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L899) Unsubscribe from a collection event @@ -770,6 +770,7 @@ Unsubscribe from a collection event \| `"status:change"` \| `"subscribers:change"` \| `"loadingSubset:change"` + \| `"truncate"` #### Parameters @@ -793,7 +794,7 @@ Unsubscribe from a collection event on(event, callback): () => void; ``` -Defined in: [packages/db/src/collection/index.ts:878](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L878) +Defined in: [packages/db/src/collection/index.ts:879](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L879) Subscribe to a collection event @@ -810,6 +811,7 @@ Subscribe to a collection event \| `"status:change"` \| `"subscribers:change"` \| `"loadingSubset:change"` + \| `"truncate"` #### Parameters @@ -839,7 +841,7 @@ Subscribe to a collection event once(event, callback): () => void; ``` -Defined in: [packages/db/src/collection/index.ts:888](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L888) +Defined in: [packages/db/src/collection/index.ts:889](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L889) Subscribe to a collection event once @@ -856,6 +858,7 @@ Subscribe to a collection event once \| `"status:change"` \| `"subscribers:change"` \| `"loadingSubset:change"` + \| `"truncate"` #### Parameters @@ -885,7 +888,7 @@ Subscribe to a collection event once onFirstReady(callback): void; ``` -Defined in: [packages/db/src/collection/index.ts:406](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L406) +Defined in: [packages/db/src/collection/index.ts:407](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L407) Register a callback to be executed when the collection first becomes ready Useful for preloading collections @@ -919,7 +922,7 @@ collection.onFirstReady(() => { preload(): Promise; ``` -Defined in: [packages/db/src/collection/index.ts:446](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L446) +Defined in: [packages/db/src/collection/index.ts:447](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L447) Preload the collection data by starting sync if not already started Multiple concurrent calls will share the same promise @@ -936,7 +939,7 @@ Multiple concurrent calls will share the same promise startSyncImmediate(): void; ``` -Defined in: [packages/db/src/collection/index.ts:438](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L438) +Defined in: [packages/db/src/collection/index.ts:439](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L439) Start sync immediately - internal method for compiled queries This bypasses lazy loading for special cases like live query results @@ -953,7 +956,7 @@ This bypasses lazy loading for special cases like live query results stateWhenReady(): Promise>; ``` -Defined in: [packages/db/src/collection/index.ts:770](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L770) +Defined in: [packages/db/src/collection/index.ts:771](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L771) Gets the current state of the collection as a Map, but only resolves when data is available Waits for the first sync commit to complete before resolving @@ -972,7 +975,7 @@ Promise that resolves to a Map containing all items in the collection subscribeChanges(callback, options): CollectionSubscription; ``` -Defined in: [packages/db/src/collection/index.ts:868](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L868) +Defined in: [packages/db/src/collection/index.ts:869](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L869) Subscribe to changes in the collection @@ -986,7 +989,7 @@ Function called when items change ##### options -[`SubscribeChangesOptions`](../../interfaces/SubscribeChangesOptions.md) = `{}` +[`SubscribeChangesOptions`](../interfaces/SubscribeChangesOptions.md) = `{}` Subscription options including includeInitialState and where filter @@ -1044,7 +1047,7 @@ const subscription = collection.subscribeChanges((changes) => { toArrayWhenReady(): Promise; ``` -Defined in: [packages/db/src/collection/index.ts:795](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L795) +Defined in: [packages/db/src/collection/index.ts:796](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L796) Gets the current state of the collection as an Array, but only resolves when data is available Waits for the first sync commit to complete before resolving @@ -1065,7 +1068,7 @@ Promise that resolves to an Array containing all items in the collection update(key, callback): Transaction; ``` -Defined in: [packages/db/src/collection/index.ts:665](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L665) +Defined in: [packages/db/src/collection/index.ts:666](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L666) Updates one or more items in the collection using a callback function @@ -1081,7 +1084,7 @@ Updates one or more items in the collection using a callback function ##### Returns -[`Transaction`](../../interfaces/Transaction.md) +[`Transaction`](../interfaces/Transaction.md) A Transaction object representing the update operation(s) @@ -1136,7 +1139,7 @@ update( callback): Transaction; ``` -Defined in: [packages/db/src/collection/index.ts:671](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L671) +Defined in: [packages/db/src/collection/index.ts:672](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L672) Updates one or more items in the collection using a callback function @@ -1150,7 +1153,7 @@ Single key or array of keys to update ###### config -[`OperationConfig`](../../interfaces/OperationConfig.md) +[`OperationConfig`](../interfaces/OperationConfig.md) ###### callback @@ -1158,7 +1161,7 @@ Single key or array of keys to update ##### Returns -[`Transaction`](../../interfaces/Transaction.md) +[`Transaction`](../interfaces/Transaction.md) A Transaction object representing the update operation(s) @@ -1210,7 +1213,7 @@ try { update(id, callback): Transaction; ``` -Defined in: [packages/db/src/collection/index.ts:678](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L678) +Defined in: [packages/db/src/collection/index.ts:679](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L679) Updates one or more items in the collection using a callback function @@ -1226,7 +1229,7 @@ Updates one or more items in the collection using a callback function ##### Returns -[`Transaction`](../../interfaces/Transaction.md) +[`Transaction`](../interfaces/Transaction.md) A Transaction object representing the update operation(s) @@ -1281,7 +1284,7 @@ update( callback): Transaction; ``` -Defined in: [packages/db/src/collection/index.ts:684](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L684) +Defined in: [packages/db/src/collection/index.ts:685](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L685) Updates one or more items in the collection using a callback function @@ -1293,7 +1296,7 @@ Updates one or more items in the collection using a callback function ###### config -[`OperationConfig`](../../interfaces/OperationConfig.md) +[`OperationConfig`](../interfaces/OperationConfig.md) ###### callback @@ -1301,7 +1304,7 @@ Updates one or more items in the collection using a callback function ##### Returns -[`Transaction`](../../interfaces/Transaction.md) +[`Transaction`](../interfaces/Transaction.md) A Transaction object representing the update operation(s) @@ -1358,7 +1361,7 @@ validateData( key?): TOutput; ``` -Defined in: [packages/db/src/collection/index.ts:571](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L571) +Defined in: [packages/db/src/collection/index.ts:572](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L572) Validates the data against the schema @@ -1388,7 +1391,7 @@ Validates the data against the schema values(): IterableIterator; ``` -Defined in: [packages/db/src/collection/index.ts:481](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L481) +Defined in: [packages/db/src/collection/index.ts:482](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L482) Get all values (virtual derived state) @@ -1404,7 +1407,7 @@ Get all values (virtual derived state) waitFor(event, timeout?): Promise; ``` -Defined in: [packages/db/src/collection/index.ts:908](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L908) +Defined in: [packages/db/src/collection/index.ts:909](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L909) Wait for a collection event @@ -1421,6 +1424,7 @@ Wait for a collection event \| `"status:change"` \| `"subscribers:change"` \| `"loadingSubset:change"` + \| `"truncate"` #### Parameters diff --git a/docs/reference/classes/CollectionInErrorStateError.md b/docs/reference/classes/CollectionInErrorStateError.md index 6a0da4bd1..8c83cc03a 100644 --- a/docs/reference/classes/CollectionInErrorStateError.md +++ b/docs/reference/classes/CollectionInErrorStateError.md @@ -9,7 +9,7 @@ Defined in: [packages/db/src/errors.ts:110](https://github.com/TanStack/db/blob/ ## Extends -- [`CollectionStateError`](../CollectionStateError.md) +- [`CollectionStateError`](CollectionStateError.md) ## Constructors @@ -37,7 +37,7 @@ Defined in: [packages/db/src/errors.ts:111](https://github.com/TanStack/db/blob/ #### Overrides -[`CollectionStateError`](../CollectionStateError.md).[`constructor`](../CollectionStateError.md#constructor) +[`CollectionStateError`](CollectionStateError.md).[`constructor`](CollectionStateError.md#constructor) ## Properties @@ -51,7 +51,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`cause`](../CollectionStateError.md#cause) +[`CollectionStateError`](CollectionStateError.md).[`cause`](CollectionStateError.md#cause) *** @@ -65,7 +65,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`message`](../CollectionStateError.md#message) +[`CollectionStateError`](CollectionStateError.md).[`message`](CollectionStateError.md#message) *** @@ -79,7 +79,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`name`](../CollectionStateError.md#name) +[`CollectionStateError`](CollectionStateError.md).[`name`](CollectionStateError.md#name) *** @@ -93,7 +93,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`stack`](../CollectionStateError.md#stack) +[`CollectionStateError`](CollectionStateError.md).[`stack`](CollectionStateError.md#stack) *** @@ -117,7 +117,7 @@ not capture any frames. #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`stackTraceLimit`](../CollectionStateError.md#stacktracelimit) +[`CollectionStateError`](CollectionStateError.md).[`stackTraceLimit`](CollectionStateError.md#stacktracelimit) ## Methods @@ -189,7 +189,7 @@ a(); #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`captureStackTrace`](../CollectionStateError.md#capturestacktrace) +[`CollectionStateError`](CollectionStateError.md).[`captureStackTrace`](CollectionStateError.md#capturestacktrace) *** @@ -221,4 +221,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`prepareStackTrace`](../CollectionStateError.md#preparestacktrace) +[`CollectionStateError`](CollectionStateError.md).[`prepareStackTrace`](CollectionStateError.md#preparestacktrace) diff --git a/docs/reference/classes/CollectionInputNotFoundError.md b/docs/reference/classes/CollectionInputNotFoundError.md index 53b6f6970..94a99e04f 100644 --- a/docs/reference/classes/CollectionInputNotFoundError.md +++ b/docs/reference/classes/CollectionInputNotFoundError.md @@ -5,14 +5,14 @@ title: CollectionInputNotFoundError # Class: CollectionInputNotFoundError -Defined in: [packages/db/src/errors.ts:416](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L416) +Defined in: [packages/db/src/errors.ts:425](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L425) Error thrown when a collection input stream is not found during query compilation. In self-joins, each alias (e.g., 'employee', 'manager') requires its own input stream. ## Extends -- [`QueryCompilationError`](../QueryCompilationError.md) +- [`QueryCompilationError`](QueryCompilationError.md) ## Constructors @@ -25,7 +25,7 @@ new CollectionInputNotFoundError( availableKeys?): CollectionInputNotFoundError; ``` -Defined in: [packages/db/src/errors.ts:417](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L417) +Defined in: [packages/db/src/errors.ts:426](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L426) #### Parameters @@ -47,7 +47,7 @@ Defined in: [packages/db/src/errors.ts:417](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryCompilationError`](../QueryCompilationError.md).[`constructor`](../QueryCompilationError.md#constructor) +[`QueryCompilationError`](QueryCompilationError.md).[`constructor`](QueryCompilationError.md#constructor) ## Properties @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`cause`](../QueryCompilationError.md#cause) +[`QueryCompilationError`](QueryCompilationError.md).[`cause`](QueryCompilationError.md#cause) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`message`](../QueryCompilationError.md#message) +[`QueryCompilationError`](QueryCompilationError.md).[`message`](QueryCompilationError.md#message) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`name`](../QueryCompilationError.md#name) +[`QueryCompilationError`](QueryCompilationError.md).[`name`](QueryCompilationError.md#name) *** @@ -103,7 +103,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stack`](../QueryCompilationError.md#stack) +[`QueryCompilationError`](QueryCompilationError.md).[`stack`](QueryCompilationError.md#stack) *** @@ -127,7 +127,7 @@ not capture any frames. #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stackTraceLimit`](../QueryCompilationError.md#stacktracelimit) +[`QueryCompilationError`](QueryCompilationError.md).[`stackTraceLimit`](QueryCompilationError.md#stacktracelimit) ## Methods @@ -199,7 +199,7 @@ a(); #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`captureStackTrace`](../QueryCompilationError.md#capturestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`captureStackTrace`](QueryCompilationError.md#capturestacktrace) *** @@ -231,4 +231,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`prepareStackTrace`](../QueryCompilationError.md#preparestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`prepareStackTrace`](QueryCompilationError.md#preparestacktrace) diff --git a/docs/reference/classes/CollectionIsInErrorStateError.md b/docs/reference/classes/CollectionIsInErrorStateError.md index a116584a7..86a1813a2 100644 --- a/docs/reference/classes/CollectionIsInErrorStateError.md +++ b/docs/reference/classes/CollectionIsInErrorStateError.md @@ -9,7 +9,7 @@ Defined in: [packages/db/src/errors.ts:126](https://github.com/TanStack/db/blob/ ## Extends -- [`CollectionStateError`](../CollectionStateError.md) +- [`CollectionStateError`](CollectionStateError.md) ## Constructors @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:127](https://github.com/TanStack/db/blob/ #### Overrides -[`CollectionStateError`](../CollectionStateError.md).[`constructor`](../CollectionStateError.md#constructor) +[`CollectionStateError`](CollectionStateError.md).[`constructor`](CollectionStateError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`cause`](../CollectionStateError.md#cause) +[`CollectionStateError`](CollectionStateError.md).[`cause`](CollectionStateError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`message`](../CollectionStateError.md#message) +[`CollectionStateError`](CollectionStateError.md).[`message`](CollectionStateError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`name`](../CollectionStateError.md#name) +[`CollectionStateError`](CollectionStateError.md).[`name`](CollectionStateError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`stack`](../CollectionStateError.md#stack) +[`CollectionStateError`](CollectionStateError.md).[`stack`](CollectionStateError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`stackTraceLimit`](../CollectionStateError.md#stacktracelimit) +[`CollectionStateError`](CollectionStateError.md).[`stackTraceLimit`](CollectionStateError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`captureStackTrace`](../CollectionStateError.md#capturestacktrace) +[`CollectionStateError`](CollectionStateError.md).[`captureStackTrace`](CollectionStateError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`prepareStackTrace`](../CollectionStateError.md#preparestacktrace) +[`CollectionStateError`](CollectionStateError.md).[`prepareStackTrace`](CollectionStateError.md#preparestacktrace) diff --git a/docs/reference/classes/CollectionOperationError.md b/docs/reference/classes/CollectionOperationError.md index e9ce186b1..f090d7b44 100644 --- a/docs/reference/classes/CollectionOperationError.md +++ b/docs/reference/classes/CollectionOperationError.md @@ -9,19 +9,20 @@ Defined in: [packages/db/src/errors.ts:139](https://github.com/TanStack/db/blob/ ## Extends -- [`TanStackDBError`](../TanStackDBError.md) +- [`TanStackDBError`](TanStackDBError.md) ## Extended by -- [`UndefinedKeyError`](../UndefinedKeyError.md) -- [`DuplicateKeyError`](../DuplicateKeyError.md) -- [`DuplicateKeySyncError`](../DuplicateKeySyncError.md) -- [`MissingUpdateArgumentError`](../MissingUpdateArgumentError.md) -- [`NoKeysPassedToUpdateError`](../NoKeysPassedToUpdateError.md) -- [`UpdateKeyNotFoundError`](../UpdateKeyNotFoundError.md) -- [`KeyUpdateNotAllowedError`](../KeyUpdateNotAllowedError.md) -- [`NoKeysPassedToDeleteError`](../NoKeysPassedToDeleteError.md) -- [`DeleteKeyNotFoundError`](../DeleteKeyNotFoundError.md) +- [`UndefinedKeyError`](UndefinedKeyError.md) +- [`InvalidKeyError`](InvalidKeyError.md) +- [`DuplicateKeyError`](DuplicateKeyError.md) +- [`DuplicateKeySyncError`](DuplicateKeySyncError.md) +- [`MissingUpdateArgumentError`](MissingUpdateArgumentError.md) +- [`NoKeysPassedToUpdateError`](NoKeysPassedToUpdateError.md) +- [`UpdateKeyNotFoundError`](UpdateKeyNotFoundError.md) +- [`KeyUpdateNotAllowedError`](KeyUpdateNotAllowedError.md) +- [`NoKeysPassedToDeleteError`](NoKeysPassedToDeleteError.md) +- [`DeleteKeyNotFoundError`](DeleteKeyNotFoundError.md) ## Constructors @@ -45,7 +46,7 @@ Defined in: [packages/db/src/errors.ts:140](https://github.com/TanStack/db/blob/ #### Overrides -[`TanStackDBError`](../TanStackDBError.md).[`constructor`](../TanStackDBError.md#constructor) +[`TanStackDBError`](TanStackDBError.md).[`constructor`](TanStackDBError.md#constructor) ## Properties @@ -59,7 +60,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`cause`](../TanStackDBError.md#cause) +[`TanStackDBError`](TanStackDBError.md).[`cause`](TanStackDBError.md#cause) *** @@ -73,7 +74,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`message`](../TanStackDBError.md#message) +[`TanStackDBError`](TanStackDBError.md).[`message`](TanStackDBError.md#message) *** @@ -87,7 +88,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`name`](../TanStackDBError.md#name) +[`TanStackDBError`](TanStackDBError.md).[`name`](TanStackDBError.md#name) *** @@ -101,7 +102,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stack`](../TanStackDBError.md#stack) +[`TanStackDBError`](TanStackDBError.md).[`stack`](TanStackDBError.md#stack) *** @@ -125,7 +126,7 @@ not capture any frames. #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stackTraceLimit`](../TanStackDBError.md#stacktracelimit) +[`TanStackDBError`](TanStackDBError.md).[`stackTraceLimit`](TanStackDBError.md#stacktracelimit) ## Methods @@ -197,7 +198,7 @@ a(); #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`captureStackTrace`](../TanStackDBError.md#capturestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`captureStackTrace`](TanStackDBError.md#capturestacktrace) *** @@ -229,4 +230,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`prepareStackTrace`](../TanStackDBError.md#preparestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`prepareStackTrace`](TanStackDBError.md#preparestacktrace) diff --git a/docs/reference/classes/CollectionRequiresConfigError.md b/docs/reference/classes/CollectionRequiresConfigError.md index 86db7e06d..6e1ac161f 100644 --- a/docs/reference/classes/CollectionRequiresConfigError.md +++ b/docs/reference/classes/CollectionRequiresConfigError.md @@ -9,7 +9,7 @@ Defined in: [packages/db/src/errors.ts:78](https://github.com/TanStack/db/blob/m ## Extends -- [`CollectionConfigurationError`](../CollectionConfigurationError.md) +- [`CollectionConfigurationError`](CollectionConfigurationError.md) ## Constructors @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:79](https://github.com/TanStack/db/blob/m #### Overrides -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`constructor`](../CollectionConfigurationError.md#constructor) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`constructor`](CollectionConfigurationError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`cause`](../CollectionConfigurationError.md#cause) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`cause`](CollectionConfigurationError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`message`](../CollectionConfigurationError.md#message) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`message`](CollectionConfigurationError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`name`](../CollectionConfigurationError.md#name) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`name`](CollectionConfigurationError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`stack`](../CollectionConfigurationError.md#stack) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`stack`](CollectionConfigurationError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`stackTraceLimit`](../CollectionConfigurationError.md#stacktracelimit) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`stackTraceLimit`](CollectionConfigurationError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`captureStackTrace`](../CollectionConfigurationError.md#capturestacktrace) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`captureStackTrace`](CollectionConfigurationError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`prepareStackTrace`](../CollectionConfigurationError.md#preparestacktrace) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`prepareStackTrace`](CollectionConfigurationError.md#preparestacktrace) diff --git a/docs/reference/classes/CollectionRequiresSyncConfigError.md b/docs/reference/classes/CollectionRequiresSyncConfigError.md index 8a2a57092..99e4d12ce 100644 --- a/docs/reference/classes/CollectionRequiresSyncConfigError.md +++ b/docs/reference/classes/CollectionRequiresSyncConfigError.md @@ -9,7 +9,7 @@ Defined in: [packages/db/src/errors.ts:84](https://github.com/TanStack/db/blob/m ## Extends -- [`CollectionConfigurationError`](../CollectionConfigurationError.md) +- [`CollectionConfigurationError`](CollectionConfigurationError.md) ## Constructors @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:85](https://github.com/TanStack/db/blob/m #### Overrides -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`constructor`](../CollectionConfigurationError.md#constructor) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`constructor`](CollectionConfigurationError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`cause`](../CollectionConfigurationError.md#cause) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`cause`](CollectionConfigurationError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`message`](../CollectionConfigurationError.md#message) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`message`](CollectionConfigurationError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`name`](../CollectionConfigurationError.md#name) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`name`](CollectionConfigurationError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`stack`](../CollectionConfigurationError.md#stack) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`stack`](CollectionConfigurationError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`stackTraceLimit`](../CollectionConfigurationError.md#stacktracelimit) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`stackTraceLimit`](CollectionConfigurationError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`captureStackTrace`](../CollectionConfigurationError.md#capturestacktrace) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`captureStackTrace`](CollectionConfigurationError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`prepareStackTrace`](../CollectionConfigurationError.md#preparestacktrace) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`prepareStackTrace`](CollectionConfigurationError.md#preparestacktrace) diff --git a/docs/reference/classes/CollectionStateError.md b/docs/reference/classes/CollectionStateError.md index 891c5b4db..5848428b0 100644 --- a/docs/reference/classes/CollectionStateError.md +++ b/docs/reference/classes/CollectionStateError.md @@ -9,14 +9,14 @@ Defined in: [packages/db/src/errors.ts:103](https://github.com/TanStack/db/blob/ ## Extends -- [`TanStackDBError`](../TanStackDBError.md) +- [`TanStackDBError`](TanStackDBError.md) ## Extended by -- [`CollectionInErrorStateError`](../CollectionInErrorStateError.md) -- [`InvalidCollectionStatusTransitionError`](../InvalidCollectionStatusTransitionError.md) -- [`CollectionIsInErrorStateError`](../CollectionIsInErrorStateError.md) -- [`NegativeActiveSubscribersError`](../NegativeActiveSubscribersError.md) +- [`CollectionInErrorStateError`](CollectionInErrorStateError.md) +- [`InvalidCollectionStatusTransitionError`](InvalidCollectionStatusTransitionError.md) +- [`CollectionIsInErrorStateError`](CollectionIsInErrorStateError.md) +- [`NegativeActiveSubscribersError`](NegativeActiveSubscribersError.md) ## Constructors @@ -40,7 +40,7 @@ Defined in: [packages/db/src/errors.ts:104](https://github.com/TanStack/db/blob/ #### Overrides -[`TanStackDBError`](../TanStackDBError.md).[`constructor`](../TanStackDBError.md#constructor) +[`TanStackDBError`](TanStackDBError.md).[`constructor`](TanStackDBError.md#constructor) ## Properties @@ -54,7 +54,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`cause`](../TanStackDBError.md#cause) +[`TanStackDBError`](TanStackDBError.md).[`cause`](TanStackDBError.md#cause) *** @@ -68,7 +68,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`message`](../TanStackDBError.md#message) +[`TanStackDBError`](TanStackDBError.md).[`message`](TanStackDBError.md#message) *** @@ -82,7 +82,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`name`](../TanStackDBError.md#name) +[`TanStackDBError`](TanStackDBError.md).[`name`](TanStackDBError.md#name) *** @@ -96,7 +96,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stack`](../TanStackDBError.md#stack) +[`TanStackDBError`](TanStackDBError.md).[`stack`](TanStackDBError.md#stack) *** @@ -120,7 +120,7 @@ not capture any frames. #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stackTraceLimit`](../TanStackDBError.md#stacktracelimit) +[`TanStackDBError`](TanStackDBError.md).[`stackTraceLimit`](TanStackDBError.md#stacktracelimit) ## Methods @@ -192,7 +192,7 @@ a(); #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`captureStackTrace`](../TanStackDBError.md#capturestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`captureStackTrace`](TanStackDBError.md#capturestacktrace) *** @@ -224,4 +224,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`prepareStackTrace`](../TanStackDBError.md#preparestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`prepareStackTrace`](TanStackDBError.md#preparestacktrace) diff --git a/docs/reference/classes/DeduplicatedLoadSubset.md b/docs/reference/classes/DeduplicatedLoadSubset.md index 946c4097b..490a8435e 100644 --- a/docs/reference/classes/DeduplicatedLoadSubset.md +++ b/docs/reference/classes/DeduplicatedLoadSubset.md @@ -88,7 +88,7 @@ losing its `this` context (e.g., `loadSubset: dedupe.loadSubset` in a sync confi ##### options -[`LoadSubsetOptions`](../../type-aliases/LoadSubsetOptions.md) +[`LoadSubsetOptions`](../type-aliases/LoadSubsetOptions.md) The predicate options (where, orderBy, limit) diff --git a/docs/reference/classes/DeleteKeyNotFoundError.md b/docs/reference/classes/DeleteKeyNotFoundError.md index bf70f44da..553724a2a 100644 --- a/docs/reference/classes/DeleteKeyNotFoundError.md +++ b/docs/reference/classes/DeleteKeyNotFoundError.md @@ -5,11 +5,11 @@ title: DeleteKeyNotFoundError # Class: DeleteKeyNotFoundError -Defined in: [packages/db/src/errors.ts:220](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L220) +Defined in: [packages/db/src/errors.ts:229](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L229) ## Extends -- [`CollectionOperationError`](../CollectionOperationError.md) +- [`CollectionOperationError`](CollectionOperationError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:220](https://github.com/TanStack/db/blob/ new DeleteKeyNotFoundError(key): DeleteKeyNotFoundError; ``` -Defined in: [packages/db/src/errors.ts:221](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L221) +Defined in: [packages/db/src/errors.ts:230](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L230) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:221](https://github.com/TanStack/db/blob/ #### Overrides -[`CollectionOperationError`](../CollectionOperationError.md).[`constructor`](../CollectionOperationError.md#constructor) +[`CollectionOperationError`](CollectionOperationError.md).[`constructor`](CollectionOperationError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`cause`](../CollectionOperationError.md#cause) +[`CollectionOperationError`](CollectionOperationError.md).[`cause`](CollectionOperationError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`message`](../CollectionOperationError.md#message) +[`CollectionOperationError`](CollectionOperationError.md).[`message`](CollectionOperationError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`name`](../CollectionOperationError.md#name) +[`CollectionOperationError`](CollectionOperationError.md).[`name`](CollectionOperationError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`stack`](../CollectionOperationError.md#stack) +[`CollectionOperationError`](CollectionOperationError.md).[`stack`](CollectionOperationError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`stackTraceLimit`](../CollectionOperationError.md#stacktracelimit) +[`CollectionOperationError`](CollectionOperationError.md).[`stackTraceLimit`](CollectionOperationError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`captureStackTrace`](../CollectionOperationError.md#capturestacktrace) +[`CollectionOperationError`](CollectionOperationError.md).[`captureStackTrace`](CollectionOperationError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`prepareStackTrace`](../CollectionOperationError.md#preparestacktrace) +[`CollectionOperationError`](CollectionOperationError.md).[`prepareStackTrace`](CollectionOperationError.md#preparestacktrace) diff --git a/docs/reference/classes/DistinctRequiresSelectError.md b/docs/reference/classes/DistinctRequiresSelectError.md index 135d46e71..bbaaef4c3 100644 --- a/docs/reference/classes/DistinctRequiresSelectError.md +++ b/docs/reference/classes/DistinctRequiresSelectError.md @@ -5,11 +5,11 @@ title: DistinctRequiresSelectError # Class: DistinctRequiresSelectError -Defined in: [packages/db/src/errors.ts:392](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L392) +Defined in: [packages/db/src/errors.ts:401](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L401) ## Extends -- [`QueryCompilationError`](../QueryCompilationError.md) +- [`QueryCompilationError`](QueryCompilationError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:392](https://github.com/TanStack/db/blob/ new DistinctRequiresSelectError(): DistinctRequiresSelectError; ``` -Defined in: [packages/db/src/errors.ts:393](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L393) +Defined in: [packages/db/src/errors.ts:402](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L402) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:393](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryCompilationError`](../QueryCompilationError.md).[`constructor`](../QueryCompilationError.md#constructor) +[`QueryCompilationError`](QueryCompilationError.md).[`constructor`](QueryCompilationError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`cause`](../QueryCompilationError.md#cause) +[`QueryCompilationError`](QueryCompilationError.md).[`cause`](QueryCompilationError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`message`](../QueryCompilationError.md#message) +[`QueryCompilationError`](QueryCompilationError.md).[`message`](QueryCompilationError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`name`](../QueryCompilationError.md#name) +[`QueryCompilationError`](QueryCompilationError.md).[`name`](QueryCompilationError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stack`](../QueryCompilationError.md#stack) +[`QueryCompilationError`](QueryCompilationError.md).[`stack`](QueryCompilationError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stackTraceLimit`](../QueryCompilationError.md#stacktracelimit) +[`QueryCompilationError`](QueryCompilationError.md).[`stackTraceLimit`](QueryCompilationError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`captureStackTrace`](../QueryCompilationError.md#capturestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`captureStackTrace`](QueryCompilationError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`prepareStackTrace`](../QueryCompilationError.md#preparestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`prepareStackTrace`](QueryCompilationError.md#preparestacktrace) diff --git a/docs/reference/classes/DuplicateAliasInSubqueryError.md b/docs/reference/classes/DuplicateAliasInSubqueryError.md index 5cc24785a..74e7a2e2a 100644 --- a/docs/reference/classes/DuplicateAliasInSubqueryError.md +++ b/docs/reference/classes/DuplicateAliasInSubqueryError.md @@ -5,7 +5,7 @@ title: DuplicateAliasInSubqueryError # Class: DuplicateAliasInSubqueryError -Defined in: [packages/db/src/errors.ts:437](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L437) +Defined in: [packages/db/src/errors.ts:446](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L446) Error thrown when a subquery uses the same alias as its parent query. This causes issues because parent and subquery would share the same input streams, @@ -13,7 +13,7 @@ leading to empty results or incorrect data (aggregation cross-leaking). ## Extends -- [`QueryCompilationError`](../QueryCompilationError.md) +- [`QueryCompilationError`](QueryCompilationError.md) ## Constructors @@ -23,7 +23,7 @@ leading to empty results or incorrect data (aggregation cross-leaking). new DuplicateAliasInSubqueryError(alias, parentAliases): DuplicateAliasInSubqueryError; ``` -Defined in: [packages/db/src/errors.ts:438](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L438) +Defined in: [packages/db/src/errors.ts:447](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L447) #### Parameters @@ -41,7 +41,7 @@ Defined in: [packages/db/src/errors.ts:438](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryCompilationError`](../QueryCompilationError.md).[`constructor`](../QueryCompilationError.md#constructor) +[`QueryCompilationError`](QueryCompilationError.md).[`constructor`](QueryCompilationError.md#constructor) ## Properties @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`cause`](../QueryCompilationError.md#cause) +[`QueryCompilationError`](QueryCompilationError.md).[`cause`](QueryCompilationError.md#cause) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`message`](../QueryCompilationError.md#message) +[`QueryCompilationError`](QueryCompilationError.md).[`message`](QueryCompilationError.md#message) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`name`](../QueryCompilationError.md#name) +[`QueryCompilationError`](QueryCompilationError.md).[`name`](QueryCompilationError.md#name) *** @@ -97,7 +97,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stack`](../QueryCompilationError.md#stack) +[`QueryCompilationError`](QueryCompilationError.md).[`stack`](QueryCompilationError.md#stack) *** @@ -121,7 +121,7 @@ not capture any frames. #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stackTraceLimit`](../QueryCompilationError.md#stacktracelimit) +[`QueryCompilationError`](QueryCompilationError.md).[`stackTraceLimit`](QueryCompilationError.md#stacktracelimit) ## Methods @@ -193,7 +193,7 @@ a(); #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`captureStackTrace`](../QueryCompilationError.md#capturestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`captureStackTrace`](QueryCompilationError.md#capturestacktrace) *** @@ -225,4 +225,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`prepareStackTrace`](../QueryCompilationError.md#preparestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`prepareStackTrace`](QueryCompilationError.md#preparestacktrace) diff --git a/docs/reference/classes/DuplicateDbInstanceError.md b/docs/reference/classes/DuplicateDbInstanceError.md index 2d292ae10..2251277f2 100644 --- a/docs/reference/classes/DuplicateDbInstanceError.md +++ b/docs/reference/classes/DuplicateDbInstanceError.md @@ -9,7 +9,7 @@ Defined in: [packages/db/src/errors.ts:45](https://github.com/TanStack/db/blob/m ## Extends -- [`TanStackDBError`](../TanStackDBError.md) +- [`TanStackDBError`](TanStackDBError.md) ## Constructors @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:46](https://github.com/TanStack/db/blob/m #### Overrides -[`TanStackDBError`](../TanStackDBError.md).[`constructor`](../TanStackDBError.md#constructor) +[`TanStackDBError`](TanStackDBError.md).[`constructor`](TanStackDBError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`cause`](../TanStackDBError.md#cause) +[`TanStackDBError`](TanStackDBError.md).[`cause`](TanStackDBError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`message`](../TanStackDBError.md#message) +[`TanStackDBError`](TanStackDBError.md).[`message`](TanStackDBError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`name`](../TanStackDBError.md#name) +[`TanStackDBError`](TanStackDBError.md).[`name`](TanStackDBError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stack`](../TanStackDBError.md#stack) +[`TanStackDBError`](TanStackDBError.md).[`stack`](TanStackDBError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stackTraceLimit`](../TanStackDBError.md#stacktracelimit) +[`TanStackDBError`](TanStackDBError.md).[`stackTraceLimit`](TanStackDBError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`captureStackTrace`](../TanStackDBError.md#capturestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`captureStackTrace`](TanStackDBError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`prepareStackTrace`](../TanStackDBError.md#preparestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`prepareStackTrace`](TanStackDBError.md#preparestacktrace) diff --git a/docs/reference/classes/DuplicateKeyError.md b/docs/reference/classes/DuplicateKeyError.md index 35d674b3f..fb6e0ba18 100644 --- a/docs/reference/classes/DuplicateKeyError.md +++ b/docs/reference/classes/DuplicateKeyError.md @@ -5,11 +5,11 @@ title: DuplicateKeyError # Class: DuplicateKeyError -Defined in: [packages/db/src/errors.ts:154](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L154) +Defined in: [packages/db/src/errors.ts:163](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L163) ## Extends -- [`CollectionOperationError`](../CollectionOperationError.md) +- [`CollectionOperationError`](CollectionOperationError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:154](https://github.com/TanStack/db/blob/ new DuplicateKeyError(key): DuplicateKeyError; ``` -Defined in: [packages/db/src/errors.ts:155](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L155) +Defined in: [packages/db/src/errors.ts:164](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L164) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:155](https://github.com/TanStack/db/blob/ #### Overrides -[`CollectionOperationError`](../CollectionOperationError.md).[`constructor`](../CollectionOperationError.md#constructor) +[`CollectionOperationError`](CollectionOperationError.md).[`constructor`](CollectionOperationError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`cause`](../CollectionOperationError.md#cause) +[`CollectionOperationError`](CollectionOperationError.md).[`cause`](CollectionOperationError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`message`](../CollectionOperationError.md#message) +[`CollectionOperationError`](CollectionOperationError.md).[`message`](CollectionOperationError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`name`](../CollectionOperationError.md#name) +[`CollectionOperationError`](CollectionOperationError.md).[`name`](CollectionOperationError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`stack`](../CollectionOperationError.md#stack) +[`CollectionOperationError`](CollectionOperationError.md).[`stack`](CollectionOperationError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`stackTraceLimit`](../CollectionOperationError.md#stacktracelimit) +[`CollectionOperationError`](CollectionOperationError.md).[`stackTraceLimit`](CollectionOperationError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`captureStackTrace`](../CollectionOperationError.md#capturestacktrace) +[`CollectionOperationError`](CollectionOperationError.md).[`captureStackTrace`](CollectionOperationError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`prepareStackTrace`](../CollectionOperationError.md#preparestacktrace) +[`CollectionOperationError`](CollectionOperationError.md).[`prepareStackTrace`](CollectionOperationError.md#preparestacktrace) diff --git a/docs/reference/classes/DuplicateKeySyncError.md b/docs/reference/classes/DuplicateKeySyncError.md index 42a98eb28..3ba64d64d 100644 --- a/docs/reference/classes/DuplicateKeySyncError.md +++ b/docs/reference/classes/DuplicateKeySyncError.md @@ -5,11 +5,11 @@ title: DuplicateKeySyncError # Class: DuplicateKeySyncError -Defined in: [packages/db/src/errors.ts:162](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L162) +Defined in: [packages/db/src/errors.ts:171](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L171) ## Extends -- [`CollectionOperationError`](../CollectionOperationError.md) +- [`CollectionOperationError`](CollectionOperationError.md) ## Constructors @@ -22,7 +22,7 @@ new DuplicateKeySyncError( options?): DuplicateKeySyncError; ``` -Defined in: [packages/db/src/errors.ts:163](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L163) +Defined in: [packages/db/src/errors.ts:172](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L172) #### Parameters @@ -50,7 +50,7 @@ Defined in: [packages/db/src/errors.ts:163](https://github.com/TanStack/db/blob/ #### Overrides -[`CollectionOperationError`](../CollectionOperationError.md).[`constructor`](../CollectionOperationError.md#constructor) +[`CollectionOperationError`](CollectionOperationError.md).[`constructor`](CollectionOperationError.md#constructor) ## Properties @@ -64,7 +64,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`cause`](../CollectionOperationError.md#cause) +[`CollectionOperationError`](CollectionOperationError.md).[`cause`](CollectionOperationError.md#cause) *** @@ -78,7 +78,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`message`](../CollectionOperationError.md#message) +[`CollectionOperationError`](CollectionOperationError.md).[`message`](CollectionOperationError.md#message) *** @@ -92,7 +92,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`name`](../CollectionOperationError.md#name) +[`CollectionOperationError`](CollectionOperationError.md).[`name`](CollectionOperationError.md#name) *** @@ -106,7 +106,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`stack`](../CollectionOperationError.md#stack) +[`CollectionOperationError`](CollectionOperationError.md).[`stack`](CollectionOperationError.md#stack) *** @@ -130,7 +130,7 @@ not capture any frames. #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`stackTraceLimit`](../CollectionOperationError.md#stacktracelimit) +[`CollectionOperationError`](CollectionOperationError.md).[`stackTraceLimit`](CollectionOperationError.md#stacktracelimit) ## Methods @@ -202,7 +202,7 @@ a(); #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`captureStackTrace`](../CollectionOperationError.md#capturestacktrace) +[`CollectionOperationError`](CollectionOperationError.md).[`captureStackTrace`](CollectionOperationError.md#capturestacktrace) *** @@ -234,4 +234,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`prepareStackTrace`](../CollectionOperationError.md#preparestacktrace) +[`CollectionOperationError`](CollectionOperationError.md).[`prepareStackTrace`](CollectionOperationError.md#preparestacktrace) diff --git a/docs/reference/classes/EmptyReferencePathError.md b/docs/reference/classes/EmptyReferencePathError.md index 6fbfb6121..160890023 100644 --- a/docs/reference/classes/EmptyReferencePathError.md +++ b/docs/reference/classes/EmptyReferencePathError.md @@ -5,11 +5,11 @@ title: EmptyReferencePathError # Class: EmptyReferencePathError -Defined in: [packages/db/src/errors.ts:460](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L460) +Defined in: [packages/db/src/errors.ts:469](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L469) ## Extends -- [`QueryCompilationError`](../QueryCompilationError.md) +- [`QueryCompilationError`](QueryCompilationError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:460](https://github.com/TanStack/db/blob/ new EmptyReferencePathError(): EmptyReferencePathError; ``` -Defined in: [packages/db/src/errors.ts:461](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L461) +Defined in: [packages/db/src/errors.ts:470](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L470) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:461](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryCompilationError`](../QueryCompilationError.md).[`constructor`](../QueryCompilationError.md#constructor) +[`QueryCompilationError`](QueryCompilationError.md).[`constructor`](QueryCompilationError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`cause`](../QueryCompilationError.md#cause) +[`QueryCompilationError`](QueryCompilationError.md).[`cause`](QueryCompilationError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`message`](../QueryCompilationError.md#message) +[`QueryCompilationError`](QueryCompilationError.md).[`message`](QueryCompilationError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`name`](../QueryCompilationError.md#name) +[`QueryCompilationError`](QueryCompilationError.md).[`name`](QueryCompilationError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stack`](../QueryCompilationError.md#stack) +[`QueryCompilationError`](QueryCompilationError.md).[`stack`](QueryCompilationError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stackTraceLimit`](../QueryCompilationError.md#stacktracelimit) +[`QueryCompilationError`](QueryCompilationError.md).[`stackTraceLimit`](QueryCompilationError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`captureStackTrace`](../QueryCompilationError.md#capturestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`captureStackTrace`](QueryCompilationError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`prepareStackTrace`](../QueryCompilationError.md#preparestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`prepareStackTrace`](QueryCompilationError.md#preparestacktrace) diff --git a/docs/reference/classes/GroupByError.md b/docs/reference/classes/GroupByError.md index 6656def56..70a57f415 100644 --- a/docs/reference/classes/GroupByError.md +++ b/docs/reference/classes/GroupByError.md @@ -5,18 +5,18 @@ title: GroupByError # Class: GroupByError -Defined in: [packages/db/src/errors.ts:535](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L535) +Defined in: [packages/db/src/errors.ts:544](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L544) ## Extends -- [`TanStackDBError`](../TanStackDBError.md) +- [`TanStackDBError`](TanStackDBError.md) ## Extended by -- [`NonAggregateExpressionNotInGroupByError`](../NonAggregateExpressionNotInGroupByError.md) -- [`UnsupportedAggregateFunctionError`](../UnsupportedAggregateFunctionError.md) -- [`AggregateFunctionNotInSelectError`](../AggregateFunctionNotInSelectError.md) -- [`UnknownHavingExpressionTypeError`](../UnknownHavingExpressionTypeError.md) +- [`NonAggregateExpressionNotInGroupByError`](NonAggregateExpressionNotInGroupByError.md) +- [`UnsupportedAggregateFunctionError`](UnsupportedAggregateFunctionError.md) +- [`AggregateFunctionNotInSelectError`](AggregateFunctionNotInSelectError.md) +- [`UnknownHavingExpressionTypeError`](UnknownHavingExpressionTypeError.md) ## Constructors @@ -26,7 +26,7 @@ Defined in: [packages/db/src/errors.ts:535](https://github.com/TanStack/db/blob/ new GroupByError(message): GroupByError; ``` -Defined in: [packages/db/src/errors.ts:536](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L536) +Defined in: [packages/db/src/errors.ts:545](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L545) #### Parameters @@ -40,7 +40,7 @@ Defined in: [packages/db/src/errors.ts:536](https://github.com/TanStack/db/blob/ #### Overrides -[`TanStackDBError`](../TanStackDBError.md).[`constructor`](../TanStackDBError.md#constructor) +[`TanStackDBError`](TanStackDBError.md).[`constructor`](TanStackDBError.md#constructor) ## Properties @@ -54,7 +54,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`cause`](../TanStackDBError.md#cause) +[`TanStackDBError`](TanStackDBError.md).[`cause`](TanStackDBError.md#cause) *** @@ -68,7 +68,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`message`](../TanStackDBError.md#message) +[`TanStackDBError`](TanStackDBError.md).[`message`](TanStackDBError.md#message) *** @@ -82,7 +82,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`name`](../TanStackDBError.md#name) +[`TanStackDBError`](TanStackDBError.md).[`name`](TanStackDBError.md#name) *** @@ -96,7 +96,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stack`](../TanStackDBError.md#stack) +[`TanStackDBError`](TanStackDBError.md).[`stack`](TanStackDBError.md#stack) *** @@ -120,7 +120,7 @@ not capture any frames. #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stackTraceLimit`](../TanStackDBError.md#stacktracelimit) +[`TanStackDBError`](TanStackDBError.md).[`stackTraceLimit`](TanStackDBError.md#stacktracelimit) ## Methods @@ -192,7 +192,7 @@ a(); #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`captureStackTrace`](../TanStackDBError.md#capturestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`captureStackTrace`](TanStackDBError.md#capturestacktrace) *** @@ -224,4 +224,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`prepareStackTrace`](../TanStackDBError.md#preparestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`prepareStackTrace`](TanStackDBError.md#preparestacktrace) diff --git a/docs/reference/classes/HavingRequiresGroupByError.md b/docs/reference/classes/HavingRequiresGroupByError.md index 423d3a083..2116ffcdd 100644 --- a/docs/reference/classes/HavingRequiresGroupByError.md +++ b/docs/reference/classes/HavingRequiresGroupByError.md @@ -5,11 +5,11 @@ title: HavingRequiresGroupByError # Class: HavingRequiresGroupByError -Defined in: [packages/db/src/errors.ts:398](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L398) +Defined in: [packages/db/src/errors.ts:407](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L407) ## Extends -- [`QueryCompilationError`](../QueryCompilationError.md) +- [`QueryCompilationError`](QueryCompilationError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:398](https://github.com/TanStack/db/blob/ new HavingRequiresGroupByError(): HavingRequiresGroupByError; ``` -Defined in: [packages/db/src/errors.ts:399](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L399) +Defined in: [packages/db/src/errors.ts:408](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L408) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:399](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryCompilationError`](../QueryCompilationError.md).[`constructor`](../QueryCompilationError.md#constructor) +[`QueryCompilationError`](QueryCompilationError.md).[`constructor`](QueryCompilationError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`cause`](../QueryCompilationError.md#cause) +[`QueryCompilationError`](QueryCompilationError.md).[`cause`](QueryCompilationError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`message`](../QueryCompilationError.md#message) +[`QueryCompilationError`](QueryCompilationError.md).[`message`](QueryCompilationError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`name`](../QueryCompilationError.md#name) +[`QueryCompilationError`](QueryCompilationError.md).[`name`](QueryCompilationError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stack`](../QueryCompilationError.md#stack) +[`QueryCompilationError`](QueryCompilationError.md).[`stack`](QueryCompilationError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stackTraceLimit`](../QueryCompilationError.md#stacktracelimit) +[`QueryCompilationError`](QueryCompilationError.md).[`stackTraceLimit`](QueryCompilationError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`captureStackTrace`](../QueryCompilationError.md#capturestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`captureStackTrace`](QueryCompilationError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`prepareStackTrace`](../QueryCompilationError.md#preparestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`prepareStackTrace`](QueryCompilationError.md#preparestacktrace) diff --git a/docs/reference/classes/IndexProxy.md b/docs/reference/classes/IndexProxy.md index 0ff7dff72..203620ae0 100644 --- a/docs/reference/classes/IndexProxy.md +++ b/docs/reference/classes/IndexProxy.md @@ -33,7 +33,7 @@ Defined in: [packages/db/src/indexes/lazy-index.ts:132](https://github.com/TanSt ##### lazyIndex -[`LazyIndexWrapper`](../LazyIndexWrapper.md)\<`TKey`\> +[`LazyIndexWrapper`](LazyIndexWrapper.md)\<`TKey`\> #### Returns @@ -55,7 +55,7 @@ Get the index expression (available immediately) ##### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md) +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md) *** @@ -91,7 +91,7 @@ Get the resolved index (throws if not ready) ##### Returns -[`BaseIndex`](../BaseIndex.md)\<`TKey`\> +[`BaseIndex`](BaseIndex.md)\<`TKey`\> *** @@ -207,7 +207,7 @@ Defined in: [packages/db/src/indexes/lazy-index.ts:248](https://github.com/TanSt #### Returns -[`LazyIndexWrapper`](../LazyIndexWrapper.md)\<`TKey`\> +[`LazyIndexWrapper`](LazyIndexWrapper.md)\<`TKey`\> *** @@ -243,7 +243,7 @@ Get index statistics (throws if not ready) #### Returns -[`IndexStats`](../../interfaces/IndexStats.md) +[`IndexStats`](../interfaces/IndexStats.md) *** @@ -343,4 +343,4 @@ Wait for index to be ready #### Returns -`Promise`\<[`BaseIndex`](../BaseIndex.md)\<`TKey`\>\> +`Promise`\<[`BaseIndex`](BaseIndex.md)\<`TKey`\>\> diff --git a/docs/reference/classes/InvalidCollectionStatusTransitionError.md b/docs/reference/classes/InvalidCollectionStatusTransitionError.md index 81c1a3d0c..8881268af 100644 --- a/docs/reference/classes/InvalidCollectionStatusTransitionError.md +++ b/docs/reference/classes/InvalidCollectionStatusTransitionError.md @@ -9,7 +9,7 @@ Defined in: [packages/db/src/errors.ts:118](https://github.com/TanStack/db/blob/ ## Extends -- [`CollectionStateError`](../CollectionStateError.md) +- [`CollectionStateError`](CollectionStateError.md) ## Constructors @@ -44,7 +44,7 @@ Defined in: [packages/db/src/errors.ts:119](https://github.com/TanStack/db/blob/ #### Overrides -[`CollectionStateError`](../CollectionStateError.md).[`constructor`](../CollectionStateError.md#constructor) +[`CollectionStateError`](CollectionStateError.md).[`constructor`](CollectionStateError.md#constructor) ## Properties @@ -58,7 +58,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`cause`](../CollectionStateError.md#cause) +[`CollectionStateError`](CollectionStateError.md).[`cause`](CollectionStateError.md#cause) *** @@ -72,7 +72,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`message`](../CollectionStateError.md#message) +[`CollectionStateError`](CollectionStateError.md).[`message`](CollectionStateError.md#message) *** @@ -86,7 +86,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`name`](../CollectionStateError.md#name) +[`CollectionStateError`](CollectionStateError.md).[`name`](CollectionStateError.md#name) *** @@ -100,7 +100,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`stack`](../CollectionStateError.md#stack) +[`CollectionStateError`](CollectionStateError.md).[`stack`](CollectionStateError.md#stack) *** @@ -124,7 +124,7 @@ not capture any frames. #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`stackTraceLimit`](../CollectionStateError.md#stacktracelimit) +[`CollectionStateError`](CollectionStateError.md).[`stackTraceLimit`](CollectionStateError.md#stacktracelimit) ## Methods @@ -196,7 +196,7 @@ a(); #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`captureStackTrace`](../CollectionStateError.md#capturestacktrace) +[`CollectionStateError`](CollectionStateError.md).[`captureStackTrace`](CollectionStateError.md#capturestacktrace) *** @@ -228,4 +228,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`prepareStackTrace`](../CollectionStateError.md#preparestacktrace) +[`CollectionStateError`](CollectionStateError.md).[`prepareStackTrace`](CollectionStateError.md#preparestacktrace) diff --git a/docs/reference/classes/InvalidJoinCondition.md b/docs/reference/classes/InvalidJoinCondition.md index da478f258..86fbf51ea 100644 --- a/docs/reference/classes/InvalidJoinCondition.md +++ b/docs/reference/classes/InvalidJoinCondition.md @@ -5,11 +5,11 @@ title: InvalidJoinCondition # Class: InvalidJoinCondition -Defined in: [packages/db/src/errors.ts:522](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L522) +Defined in: [packages/db/src/errors.ts:531](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L531) ## Extends -- [`JoinError`](../JoinError.md) +- [`JoinError`](JoinError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:522](https://github.com/TanStack/db/blob/ new InvalidJoinCondition(): InvalidJoinCondition; ``` -Defined in: [packages/db/src/errors.ts:523](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L523) +Defined in: [packages/db/src/errors.ts:532](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L532) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:523](https://github.com/TanStack/db/blob/ #### Overrides -[`JoinError`](../JoinError.md).[`constructor`](../JoinError.md#constructor) +[`JoinError`](JoinError.md).[`constructor`](JoinError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`cause`](../JoinError.md#cause) +[`JoinError`](JoinError.md).[`cause`](JoinError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`message`](../JoinError.md#message) +[`JoinError`](JoinError.md).[`message`](JoinError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`name`](../JoinError.md#name) +[`JoinError`](JoinError.md).[`name`](JoinError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`stack`](../JoinError.md#stack) +[`JoinError`](JoinError.md).[`stack`](JoinError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`JoinError`](../JoinError.md).[`stackTraceLimit`](../JoinError.md#stacktracelimit) +[`JoinError`](JoinError.md).[`stackTraceLimit`](JoinError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`JoinError`](../JoinError.md).[`captureStackTrace`](../JoinError.md#capturestacktrace) +[`JoinError`](JoinError.md).[`captureStackTrace`](JoinError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`JoinError`](../JoinError.md).[`prepareStackTrace`](../JoinError.md#preparestacktrace) +[`JoinError`](JoinError.md).[`prepareStackTrace`](JoinError.md#preparestacktrace) diff --git a/docs/reference/classes/InvalidJoinConditionLeftSourceError.md b/docs/reference/classes/InvalidJoinConditionLeftSourceError.md index 47f2a8e15..4d61d221e 100644 --- a/docs/reference/classes/InvalidJoinConditionLeftSourceError.md +++ b/docs/reference/classes/InvalidJoinConditionLeftSourceError.md @@ -5,11 +5,11 @@ title: InvalidJoinConditionLeftSourceError # Class: InvalidJoinConditionLeftSourceError -Defined in: [packages/db/src/errors.ts:506](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L506) +Defined in: [packages/db/src/errors.ts:515](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L515) ## Extends -- [`JoinError`](../JoinError.md) +- [`JoinError`](JoinError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:506](https://github.com/TanStack/db/blob/ new InvalidJoinConditionLeftSourceError(sourceAlias): InvalidJoinConditionLeftSourceError; ``` -Defined in: [packages/db/src/errors.ts:507](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L507) +Defined in: [packages/db/src/errors.ts:516](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L516) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:507](https://github.com/TanStack/db/blob/ #### Overrides -[`JoinError`](../JoinError.md).[`constructor`](../JoinError.md#constructor) +[`JoinError`](JoinError.md).[`constructor`](JoinError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`cause`](../JoinError.md#cause) +[`JoinError`](JoinError.md).[`cause`](JoinError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`message`](../JoinError.md#message) +[`JoinError`](JoinError.md).[`message`](JoinError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`name`](../JoinError.md#name) +[`JoinError`](JoinError.md).[`name`](JoinError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`stack`](../JoinError.md#stack) +[`JoinError`](JoinError.md).[`stack`](JoinError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`JoinError`](../JoinError.md).[`stackTraceLimit`](../JoinError.md#stacktracelimit) +[`JoinError`](JoinError.md).[`stackTraceLimit`](JoinError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`JoinError`](../JoinError.md).[`captureStackTrace`](../JoinError.md#capturestacktrace) +[`JoinError`](JoinError.md).[`captureStackTrace`](JoinError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`JoinError`](../JoinError.md).[`prepareStackTrace`](../JoinError.md#preparestacktrace) +[`JoinError`](JoinError.md).[`prepareStackTrace`](JoinError.md#preparestacktrace) diff --git a/docs/reference/classes/InvalidJoinConditionRightSourceError.md b/docs/reference/classes/InvalidJoinConditionRightSourceError.md index 2294e6d0a..e39c4a1fd 100644 --- a/docs/reference/classes/InvalidJoinConditionRightSourceError.md +++ b/docs/reference/classes/InvalidJoinConditionRightSourceError.md @@ -5,11 +5,11 @@ title: InvalidJoinConditionRightSourceError # Class: InvalidJoinConditionRightSourceError -Defined in: [packages/db/src/errors.ts:514](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L514) +Defined in: [packages/db/src/errors.ts:523](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L523) ## Extends -- [`JoinError`](../JoinError.md) +- [`JoinError`](JoinError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:514](https://github.com/TanStack/db/blob/ new InvalidJoinConditionRightSourceError(sourceAlias): InvalidJoinConditionRightSourceError; ``` -Defined in: [packages/db/src/errors.ts:515](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L515) +Defined in: [packages/db/src/errors.ts:524](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L524) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:515](https://github.com/TanStack/db/blob/ #### Overrides -[`JoinError`](../JoinError.md).[`constructor`](../JoinError.md#constructor) +[`JoinError`](JoinError.md).[`constructor`](JoinError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`cause`](../JoinError.md#cause) +[`JoinError`](JoinError.md).[`cause`](JoinError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`message`](../JoinError.md#message) +[`JoinError`](JoinError.md).[`message`](JoinError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`name`](../JoinError.md#name) +[`JoinError`](JoinError.md).[`name`](JoinError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`stack`](../JoinError.md#stack) +[`JoinError`](JoinError.md).[`stack`](JoinError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`JoinError`](../JoinError.md).[`stackTraceLimit`](../JoinError.md#stacktracelimit) +[`JoinError`](JoinError.md).[`stackTraceLimit`](JoinError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`JoinError`](../JoinError.md).[`captureStackTrace`](../JoinError.md#capturestacktrace) +[`JoinError`](JoinError.md).[`captureStackTrace`](JoinError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`JoinError`](../JoinError.md).[`prepareStackTrace`](../JoinError.md#preparestacktrace) +[`JoinError`](JoinError.md).[`prepareStackTrace`](JoinError.md#preparestacktrace) diff --git a/docs/reference/classes/InvalidJoinConditionSameSourceError.md b/docs/reference/classes/InvalidJoinConditionSameSourceError.md index 942301fdb..89f8d42fa 100644 --- a/docs/reference/classes/InvalidJoinConditionSameSourceError.md +++ b/docs/reference/classes/InvalidJoinConditionSameSourceError.md @@ -5,11 +5,11 @@ title: InvalidJoinConditionSameSourceError # Class: InvalidJoinConditionSameSourceError -Defined in: [packages/db/src/errors.ts:492](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L492) +Defined in: [packages/db/src/errors.ts:501](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L501) ## Extends -- [`JoinError`](../JoinError.md) +- [`JoinError`](JoinError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:492](https://github.com/TanStack/db/blob/ new InvalidJoinConditionSameSourceError(sourceAlias): InvalidJoinConditionSameSourceError; ``` -Defined in: [packages/db/src/errors.ts:493](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L493) +Defined in: [packages/db/src/errors.ts:502](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L502) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:493](https://github.com/TanStack/db/blob/ #### Overrides -[`JoinError`](../JoinError.md).[`constructor`](../JoinError.md#constructor) +[`JoinError`](JoinError.md).[`constructor`](JoinError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`cause`](../JoinError.md#cause) +[`JoinError`](JoinError.md).[`cause`](JoinError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`message`](../JoinError.md#message) +[`JoinError`](JoinError.md).[`message`](JoinError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`name`](../JoinError.md#name) +[`JoinError`](JoinError.md).[`name`](JoinError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`stack`](../JoinError.md#stack) +[`JoinError`](JoinError.md).[`stack`](JoinError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`JoinError`](../JoinError.md).[`stackTraceLimit`](../JoinError.md#stacktracelimit) +[`JoinError`](JoinError.md).[`stackTraceLimit`](JoinError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`JoinError`](../JoinError.md).[`captureStackTrace`](../JoinError.md#capturestacktrace) +[`JoinError`](JoinError.md).[`captureStackTrace`](JoinError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`JoinError`](../JoinError.md).[`prepareStackTrace`](../JoinError.md#preparestacktrace) +[`JoinError`](JoinError.md).[`prepareStackTrace`](JoinError.md#preparestacktrace) diff --git a/docs/reference/classes/InvalidJoinConditionSourceMismatchError.md b/docs/reference/classes/InvalidJoinConditionSourceMismatchError.md index 1a883518c..24130138c 100644 --- a/docs/reference/classes/InvalidJoinConditionSourceMismatchError.md +++ b/docs/reference/classes/InvalidJoinConditionSourceMismatchError.md @@ -5,11 +5,11 @@ title: InvalidJoinConditionSourceMismatchError # Class: InvalidJoinConditionSourceMismatchError -Defined in: [packages/db/src/errors.ts:500](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L500) +Defined in: [packages/db/src/errors.ts:509](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L509) ## Extends -- [`JoinError`](../JoinError.md) +- [`JoinError`](JoinError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:500](https://github.com/TanStack/db/blob/ new InvalidJoinConditionSourceMismatchError(): InvalidJoinConditionSourceMismatchError; ``` -Defined in: [packages/db/src/errors.ts:501](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L501) +Defined in: [packages/db/src/errors.ts:510](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L510) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:501](https://github.com/TanStack/db/blob/ #### Overrides -[`JoinError`](../JoinError.md).[`constructor`](../JoinError.md#constructor) +[`JoinError`](JoinError.md).[`constructor`](JoinError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`cause`](../JoinError.md#cause) +[`JoinError`](JoinError.md).[`cause`](JoinError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`message`](../JoinError.md#message) +[`JoinError`](JoinError.md).[`message`](JoinError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`name`](../JoinError.md#name) +[`JoinError`](JoinError.md).[`name`](JoinError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`stack`](../JoinError.md#stack) +[`JoinError`](JoinError.md).[`stack`](JoinError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`JoinError`](../JoinError.md).[`stackTraceLimit`](../JoinError.md#stacktracelimit) +[`JoinError`](JoinError.md).[`stackTraceLimit`](JoinError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`JoinError`](../JoinError.md).[`captureStackTrace`](../JoinError.md#capturestacktrace) +[`JoinError`](JoinError.md).[`captureStackTrace`](JoinError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`JoinError`](../JoinError.md).[`prepareStackTrace`](../JoinError.md#preparestacktrace) +[`JoinError`](JoinError.md).[`prepareStackTrace`](JoinError.md#preparestacktrace) diff --git a/docs/reference/classes/InvalidKeyError.md b/docs/reference/classes/InvalidKeyError.md new file mode 100644 index 000000000..b06bd9262 --- /dev/null +++ b/docs/reference/classes/InvalidKeyError.md @@ -0,0 +1,224 @@ +--- +id: InvalidKeyError +title: InvalidKeyError +--- + +# Class: InvalidKeyError + +Defined in: [packages/db/src/errors.ts:154](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L154) + +## Extends + +- [`CollectionOperationError`](CollectionOperationError.md) + +## Constructors + +### Constructor + +```ts +new InvalidKeyError(key, item): InvalidKeyError; +``` + +Defined in: [packages/db/src/errors.ts:155](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L155) + +#### Parameters + +##### key + +`unknown` + +##### item + +`unknown` + +#### Returns + +`InvalidKeyError` + +#### Overrides + +[`CollectionOperationError`](CollectionOperationError.md).[`constructor`](CollectionOperationError.md#constructor) + +## Properties + +### cause? + +```ts +optional cause: unknown; +``` + +Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 + +#### Inherited from + +[`CollectionOperationError`](CollectionOperationError.md).[`cause`](CollectionOperationError.md#cause) + +*** + +### message + +```ts +message: string; +``` + +Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 + +#### Inherited from + +[`CollectionOperationError`](CollectionOperationError.md).[`message`](CollectionOperationError.md#message) + +*** + +### name + +```ts +name: string; +``` + +Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 + +#### Inherited from + +[`CollectionOperationError`](CollectionOperationError.md).[`name`](CollectionOperationError.md#name) + +*** + +### stack? + +```ts +optional stack: string; +``` + +Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1078 + +#### Inherited from + +[`CollectionOperationError`](CollectionOperationError.md).[`stack`](CollectionOperationError.md#stack) + +*** + +### stackTraceLimit + +```ts +static stackTraceLimit: number; +``` + +Defined in: node\_modules/.pnpm/@types+node@24.7.0/node\_modules/@types/node/globals.d.ts:68 + +The `Error.stackTraceLimit` property specifies the number of stack frames +collected by a stack trace (whether generated by `new Error().stack` or +`Error.captureStackTrace(obj)`). + +The default value is `10` but may be set to any valid JavaScript number. Changes +will affect any stack trace captured _after_ the value has been changed. + +If set to a non-number value, or set to a negative number, stack traces will +not capture any frames. + +#### Inherited from + +[`CollectionOperationError`](CollectionOperationError.md).[`stackTraceLimit`](CollectionOperationError.md#stacktracelimit) + +## Methods + +### captureStackTrace() + +```ts +static captureStackTrace(targetObject, constructorOpt?): void; +``` + +Defined in: node\_modules/.pnpm/@types+node@24.7.0/node\_modules/@types/node/globals.d.ts:52 + +Creates a `.stack` property on `targetObject`, which when accessed returns +a string representing the location in the code at which +`Error.captureStackTrace()` was called. + +```js +const myObject = {}; +Error.captureStackTrace(myObject); +myObject.stack; // Similar to `new Error().stack` +``` + +The first line of the trace will be prefixed with +`${myObject.name}: ${myObject.message}`. + +The optional `constructorOpt` argument accepts a function. If given, all frames +above `constructorOpt`, including `constructorOpt`, will be omitted from the +generated stack trace. + +The `constructorOpt` argument is useful for hiding implementation +details of error generation from the user. For instance: + +```js +function a() { + b(); +} + +function b() { + c(); +} + +function c() { + // Create an error without stack trace to avoid calculating the stack trace twice. + const { stackTraceLimit } = Error; + Error.stackTraceLimit = 0; + const error = new Error(); + Error.stackTraceLimit = stackTraceLimit; + + // Capture the stack trace above function b + Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace + throw error; +} + +a(); +``` + +#### Parameters + +##### targetObject + +`object` + +##### constructorOpt? + +`Function` + +#### Returns + +`void` + +#### Inherited from + +[`CollectionOperationError`](CollectionOperationError.md).[`captureStackTrace`](CollectionOperationError.md#capturestacktrace) + +*** + +### prepareStackTrace() + +```ts +static prepareStackTrace(err, stackTraces): any; +``` + +Defined in: node\_modules/.pnpm/@types+node@24.7.0/node\_modules/@types/node/globals.d.ts:56 + +#### Parameters + +##### err + +`Error` + +##### stackTraces + +`CallSite`[] + +#### Returns + +`any` + +#### See + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Inherited from + +[`CollectionOperationError`](CollectionOperationError.md).[`prepareStackTrace`](CollectionOperationError.md#preparestacktrace) diff --git a/docs/reference/classes/InvalidSchemaError.md b/docs/reference/classes/InvalidSchemaError.md index a98453c36..b50d2cff0 100644 --- a/docs/reference/classes/InvalidSchemaError.md +++ b/docs/reference/classes/InvalidSchemaError.md @@ -9,7 +9,7 @@ Defined in: [packages/db/src/errors.ts:90](https://github.com/TanStack/db/blob/m ## Extends -- [`CollectionConfigurationError`](../CollectionConfigurationError.md) +- [`CollectionConfigurationError`](CollectionConfigurationError.md) ## Constructors @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:91](https://github.com/TanStack/db/blob/m #### Overrides -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`constructor`](../CollectionConfigurationError.md#constructor) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`constructor`](CollectionConfigurationError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`cause`](../CollectionConfigurationError.md#cause) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`cause`](CollectionConfigurationError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`message`](../CollectionConfigurationError.md#message) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`message`](CollectionConfigurationError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`name`](../CollectionConfigurationError.md#name) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`name`](CollectionConfigurationError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`stack`](../CollectionConfigurationError.md#stack) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`stack`](CollectionConfigurationError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`stackTraceLimit`](../CollectionConfigurationError.md#stacktracelimit) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`stackTraceLimit`](CollectionConfigurationError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`captureStackTrace`](../CollectionConfigurationError.md#capturestacktrace) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`captureStackTrace`](CollectionConfigurationError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`prepareStackTrace`](../CollectionConfigurationError.md#preparestacktrace) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`prepareStackTrace`](CollectionConfigurationError.md#preparestacktrace) diff --git a/docs/reference/classes/InvalidSourceError.md b/docs/reference/classes/InvalidSourceError.md index 4450c1120..cb95d9f94 100644 --- a/docs/reference/classes/InvalidSourceError.md +++ b/docs/reference/classes/InvalidSourceError.md @@ -5,11 +5,11 @@ title: InvalidSourceError # Class: InvalidSourceError -Defined in: [packages/db/src/errors.ts:355](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L355) +Defined in: [packages/db/src/errors.ts:364](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L364) ## Extends -- [`QueryBuilderError`](../QueryBuilderError.md) +- [`QueryBuilderError`](QueryBuilderError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:355](https://github.com/TanStack/db/blob/ new InvalidSourceError(alias): InvalidSourceError; ``` -Defined in: [packages/db/src/errors.ts:356](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L356) +Defined in: [packages/db/src/errors.ts:365](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L365) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:356](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryBuilderError`](../QueryBuilderError.md).[`constructor`](../QueryBuilderError.md#constructor) +[`QueryBuilderError`](QueryBuilderError.md).[`constructor`](QueryBuilderError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`cause`](../QueryBuilderError.md#cause) +[`QueryBuilderError`](QueryBuilderError.md).[`cause`](QueryBuilderError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`message`](../QueryBuilderError.md#message) +[`QueryBuilderError`](QueryBuilderError.md).[`message`](QueryBuilderError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`name`](../QueryBuilderError.md#name) +[`QueryBuilderError`](QueryBuilderError.md).[`name`](QueryBuilderError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`stack`](../QueryBuilderError.md#stack) +[`QueryBuilderError`](QueryBuilderError.md).[`stack`](QueryBuilderError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`stackTraceLimit`](../QueryBuilderError.md#stacktracelimit) +[`QueryBuilderError`](QueryBuilderError.md).[`stackTraceLimit`](QueryBuilderError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`captureStackTrace`](../QueryBuilderError.md#capturestacktrace) +[`QueryBuilderError`](QueryBuilderError.md).[`captureStackTrace`](QueryBuilderError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`prepareStackTrace`](../QueryBuilderError.md#preparestacktrace) +[`QueryBuilderError`](QueryBuilderError.md).[`prepareStackTrace`](QueryBuilderError.md#preparestacktrace) diff --git a/docs/reference/classes/InvalidSourceTypeError.md b/docs/reference/classes/InvalidSourceTypeError.md index 42daca63c..690895015 100644 --- a/docs/reference/classes/InvalidSourceTypeError.md +++ b/docs/reference/classes/InvalidSourceTypeError.md @@ -5,11 +5,11 @@ title: InvalidSourceTypeError # Class: InvalidSourceTypeError -Defined in: [packages/db/src/errors.ts:363](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L363) +Defined in: [packages/db/src/errors.ts:372](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L372) ## Extends -- [`QueryBuilderError`](../QueryBuilderError.md) +- [`QueryBuilderError`](QueryBuilderError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:363](https://github.com/TanStack/db/blob/ new InvalidSourceTypeError(context, type): InvalidSourceTypeError; ``` -Defined in: [packages/db/src/errors.ts:364](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L364) +Defined in: [packages/db/src/errors.ts:373](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L373) #### Parameters @@ -37,7 +37,7 @@ Defined in: [packages/db/src/errors.ts:364](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryBuilderError`](../QueryBuilderError.md).[`constructor`](../QueryBuilderError.md#constructor) +[`QueryBuilderError`](QueryBuilderError.md).[`constructor`](QueryBuilderError.md#constructor) ## Properties @@ -51,7 +51,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`cause`](../QueryBuilderError.md#cause) +[`QueryBuilderError`](QueryBuilderError.md).[`cause`](QueryBuilderError.md#cause) *** @@ -65,7 +65,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`message`](../QueryBuilderError.md#message) +[`QueryBuilderError`](QueryBuilderError.md).[`message`](QueryBuilderError.md#message) *** @@ -79,7 +79,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`name`](../QueryBuilderError.md#name) +[`QueryBuilderError`](QueryBuilderError.md).[`name`](QueryBuilderError.md#name) *** @@ -93,7 +93,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`stack`](../QueryBuilderError.md#stack) +[`QueryBuilderError`](QueryBuilderError.md).[`stack`](QueryBuilderError.md#stack) *** @@ -117,7 +117,7 @@ not capture any frames. #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`stackTraceLimit`](../QueryBuilderError.md#stacktracelimit) +[`QueryBuilderError`](QueryBuilderError.md).[`stackTraceLimit`](QueryBuilderError.md#stacktracelimit) ## Methods @@ -189,7 +189,7 @@ a(); #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`captureStackTrace`](../QueryBuilderError.md#capturestacktrace) +[`QueryBuilderError`](QueryBuilderError.md).[`captureStackTrace`](QueryBuilderError.md#capturestacktrace) *** @@ -221,4 +221,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`prepareStackTrace`](../QueryBuilderError.md#preparestacktrace) +[`QueryBuilderError`](QueryBuilderError.md).[`prepareStackTrace`](QueryBuilderError.md#preparestacktrace) diff --git a/docs/reference/classes/InvalidStorageDataFormatError.md b/docs/reference/classes/InvalidStorageDataFormatError.md index 1a9f10e11..bb6fc704e 100644 --- a/docs/reference/classes/InvalidStorageDataFormatError.md +++ b/docs/reference/classes/InvalidStorageDataFormatError.md @@ -5,11 +5,11 @@ title: InvalidStorageDataFormatError # Class: InvalidStorageDataFormatError -Defined in: [packages/db/src/errors.ts:600](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L600) +Defined in: [packages/db/src/errors.ts:609](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L609) ## Extends -- [`LocalStorageCollectionError`](../LocalStorageCollectionError.md) +- [`LocalStorageCollectionError`](LocalStorageCollectionError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:600](https://github.com/TanStack/db/blob/ new InvalidStorageDataFormatError(storageKey, key): InvalidStorageDataFormatError; ``` -Defined in: [packages/db/src/errors.ts:601](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L601) +Defined in: [packages/db/src/errors.ts:610](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L610) #### Parameters @@ -37,7 +37,7 @@ Defined in: [packages/db/src/errors.ts:601](https://github.com/TanStack/db/blob/ #### Overrides -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`constructor`](../LocalStorageCollectionError.md#constructor) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`constructor`](LocalStorageCollectionError.md#constructor) ## Properties @@ -51,7 +51,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`cause`](../LocalStorageCollectionError.md#cause) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`cause`](LocalStorageCollectionError.md#cause) *** @@ -65,7 +65,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`message`](../LocalStorageCollectionError.md#message) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`message`](LocalStorageCollectionError.md#message) *** @@ -79,7 +79,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`name`](../LocalStorageCollectionError.md#name) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`name`](LocalStorageCollectionError.md#name) *** @@ -93,7 +93,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`stack`](../LocalStorageCollectionError.md#stack) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`stack`](LocalStorageCollectionError.md#stack) *** @@ -117,7 +117,7 @@ not capture any frames. #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`stackTraceLimit`](../LocalStorageCollectionError.md#stacktracelimit) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`stackTraceLimit`](LocalStorageCollectionError.md#stacktracelimit) ## Methods @@ -189,7 +189,7 @@ a(); #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`captureStackTrace`](../LocalStorageCollectionError.md#capturestacktrace) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`captureStackTrace`](LocalStorageCollectionError.md#capturestacktrace) *** @@ -221,4 +221,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`prepareStackTrace`](../LocalStorageCollectionError.md#preparestacktrace) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`prepareStackTrace`](LocalStorageCollectionError.md#preparestacktrace) diff --git a/docs/reference/classes/InvalidStorageObjectFormatError.md b/docs/reference/classes/InvalidStorageObjectFormatError.md index ed3b0efd0..77f06a3bb 100644 --- a/docs/reference/classes/InvalidStorageObjectFormatError.md +++ b/docs/reference/classes/InvalidStorageObjectFormatError.md @@ -5,11 +5,11 @@ title: InvalidStorageObjectFormatError # Class: InvalidStorageObjectFormatError -Defined in: [packages/db/src/errors.ts:608](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L608) +Defined in: [packages/db/src/errors.ts:617](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L617) ## Extends -- [`LocalStorageCollectionError`](../LocalStorageCollectionError.md) +- [`LocalStorageCollectionError`](LocalStorageCollectionError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:608](https://github.com/TanStack/db/blob/ new InvalidStorageObjectFormatError(storageKey): InvalidStorageObjectFormatError; ``` -Defined in: [packages/db/src/errors.ts:609](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L609) +Defined in: [packages/db/src/errors.ts:618](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L618) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:609](https://github.com/TanStack/db/blob/ #### Overrides -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`constructor`](../LocalStorageCollectionError.md#constructor) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`constructor`](LocalStorageCollectionError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`cause`](../LocalStorageCollectionError.md#cause) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`cause`](LocalStorageCollectionError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`message`](../LocalStorageCollectionError.md#message) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`message`](LocalStorageCollectionError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`name`](../LocalStorageCollectionError.md#name) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`name`](LocalStorageCollectionError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`stack`](../LocalStorageCollectionError.md#stack) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`stack`](LocalStorageCollectionError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`stackTraceLimit`](../LocalStorageCollectionError.md#stacktracelimit) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`stackTraceLimit`](LocalStorageCollectionError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`captureStackTrace`](../LocalStorageCollectionError.md#capturestacktrace) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`captureStackTrace`](LocalStorageCollectionError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`prepareStackTrace`](../LocalStorageCollectionError.md#preparestacktrace) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`prepareStackTrace`](LocalStorageCollectionError.md#preparestacktrace) diff --git a/docs/reference/classes/JoinCollectionNotFoundError.md b/docs/reference/classes/JoinCollectionNotFoundError.md index f21f5b9a5..5b3945ddd 100644 --- a/docs/reference/classes/JoinCollectionNotFoundError.md +++ b/docs/reference/classes/JoinCollectionNotFoundError.md @@ -5,11 +5,11 @@ title: JoinCollectionNotFoundError # Class: JoinCollectionNotFoundError -Defined in: [packages/db/src/errors.ts:472](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L472) +Defined in: [packages/db/src/errors.ts:481](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L481) ## Extends -- [`QueryCompilationError`](../QueryCompilationError.md) +- [`QueryCompilationError`](QueryCompilationError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:472](https://github.com/TanStack/db/blob/ new JoinCollectionNotFoundError(collectionId): JoinCollectionNotFoundError; ``` -Defined in: [packages/db/src/errors.ts:473](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L473) +Defined in: [packages/db/src/errors.ts:482](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L482) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:473](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryCompilationError`](../QueryCompilationError.md).[`constructor`](../QueryCompilationError.md#constructor) +[`QueryCompilationError`](QueryCompilationError.md).[`constructor`](QueryCompilationError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`cause`](../QueryCompilationError.md#cause) +[`QueryCompilationError`](QueryCompilationError.md).[`cause`](QueryCompilationError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`message`](../QueryCompilationError.md#message) +[`QueryCompilationError`](QueryCompilationError.md).[`message`](QueryCompilationError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`name`](../QueryCompilationError.md#name) +[`QueryCompilationError`](QueryCompilationError.md).[`name`](QueryCompilationError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stack`](../QueryCompilationError.md#stack) +[`QueryCompilationError`](QueryCompilationError.md).[`stack`](QueryCompilationError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stackTraceLimit`](../QueryCompilationError.md#stacktracelimit) +[`QueryCompilationError`](QueryCompilationError.md).[`stackTraceLimit`](QueryCompilationError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`captureStackTrace`](../QueryCompilationError.md#capturestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`captureStackTrace`](QueryCompilationError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`prepareStackTrace`](../QueryCompilationError.md#preparestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`prepareStackTrace`](QueryCompilationError.md#preparestacktrace) diff --git a/docs/reference/classes/JoinConditionMustBeEqualityError.md b/docs/reference/classes/JoinConditionMustBeEqualityError.md index 6e6240e8c..a4df5fc6a 100644 --- a/docs/reference/classes/JoinConditionMustBeEqualityError.md +++ b/docs/reference/classes/JoinConditionMustBeEqualityError.md @@ -5,11 +5,11 @@ title: JoinConditionMustBeEqualityError # Class: JoinConditionMustBeEqualityError -Defined in: [packages/db/src/errors.ts:372](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L372) +Defined in: [packages/db/src/errors.ts:381](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L381) ## Extends -- [`QueryBuilderError`](../QueryBuilderError.md) +- [`QueryBuilderError`](QueryBuilderError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:372](https://github.com/TanStack/db/blob/ new JoinConditionMustBeEqualityError(): JoinConditionMustBeEqualityError; ``` -Defined in: [packages/db/src/errors.ts:373](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L373) +Defined in: [packages/db/src/errors.ts:382](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L382) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:373](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryBuilderError`](../QueryBuilderError.md).[`constructor`](../QueryBuilderError.md#constructor) +[`QueryBuilderError`](QueryBuilderError.md).[`constructor`](QueryBuilderError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`cause`](../QueryBuilderError.md#cause) +[`QueryBuilderError`](QueryBuilderError.md).[`cause`](QueryBuilderError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`message`](../QueryBuilderError.md#message) +[`QueryBuilderError`](QueryBuilderError.md).[`message`](QueryBuilderError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`name`](../QueryBuilderError.md#name) +[`QueryBuilderError`](QueryBuilderError.md).[`name`](QueryBuilderError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`stack`](../QueryBuilderError.md#stack) +[`QueryBuilderError`](QueryBuilderError.md).[`stack`](QueryBuilderError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`stackTraceLimit`](../QueryBuilderError.md#stacktracelimit) +[`QueryBuilderError`](QueryBuilderError.md).[`stackTraceLimit`](QueryBuilderError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`captureStackTrace`](../QueryBuilderError.md#capturestacktrace) +[`QueryBuilderError`](QueryBuilderError.md).[`captureStackTrace`](QueryBuilderError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`prepareStackTrace`](../QueryBuilderError.md#preparestacktrace) +[`QueryBuilderError`](QueryBuilderError.md).[`prepareStackTrace`](QueryBuilderError.md#preparestacktrace) diff --git a/docs/reference/classes/JoinError.md b/docs/reference/classes/JoinError.md index 6058f4f73..bc02c6bf1 100644 --- a/docs/reference/classes/JoinError.md +++ b/docs/reference/classes/JoinError.md @@ -5,21 +5,21 @@ title: JoinError # Class: JoinError -Defined in: [packages/db/src/errors.ts:479](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L479) +Defined in: [packages/db/src/errors.ts:488](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L488) ## Extends -- [`TanStackDBError`](../TanStackDBError.md) +- [`TanStackDBError`](TanStackDBError.md) ## Extended by -- [`UnsupportedJoinTypeError`](../UnsupportedJoinTypeError.md) -- [`InvalidJoinConditionSameSourceError`](../InvalidJoinConditionSameSourceError.md) -- [`InvalidJoinConditionSourceMismatchError`](../InvalidJoinConditionSourceMismatchError.md) -- [`InvalidJoinConditionLeftSourceError`](../InvalidJoinConditionLeftSourceError.md) -- [`InvalidJoinConditionRightSourceError`](../InvalidJoinConditionRightSourceError.md) -- [`InvalidJoinCondition`](../InvalidJoinCondition.md) -- [`UnsupportedJoinSourceTypeError`](../UnsupportedJoinSourceTypeError.md) +- [`UnsupportedJoinTypeError`](UnsupportedJoinTypeError.md) +- [`InvalidJoinConditionSameSourceError`](InvalidJoinConditionSameSourceError.md) +- [`InvalidJoinConditionSourceMismatchError`](InvalidJoinConditionSourceMismatchError.md) +- [`InvalidJoinConditionLeftSourceError`](InvalidJoinConditionLeftSourceError.md) +- [`InvalidJoinConditionRightSourceError`](InvalidJoinConditionRightSourceError.md) +- [`InvalidJoinCondition`](InvalidJoinCondition.md) +- [`UnsupportedJoinSourceTypeError`](UnsupportedJoinSourceTypeError.md) ## Constructors @@ -29,7 +29,7 @@ Defined in: [packages/db/src/errors.ts:479](https://github.com/TanStack/db/blob/ new JoinError(message): JoinError; ``` -Defined in: [packages/db/src/errors.ts:480](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L480) +Defined in: [packages/db/src/errors.ts:489](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L489) #### Parameters @@ -43,7 +43,7 @@ Defined in: [packages/db/src/errors.ts:480](https://github.com/TanStack/db/blob/ #### Overrides -[`TanStackDBError`](../TanStackDBError.md).[`constructor`](../TanStackDBError.md#constructor) +[`TanStackDBError`](TanStackDBError.md).[`constructor`](TanStackDBError.md#constructor) ## Properties @@ -57,7 +57,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`cause`](../TanStackDBError.md#cause) +[`TanStackDBError`](TanStackDBError.md).[`cause`](TanStackDBError.md#cause) *** @@ -71,7 +71,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`message`](../TanStackDBError.md#message) +[`TanStackDBError`](TanStackDBError.md).[`message`](TanStackDBError.md#message) *** @@ -85,7 +85,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`name`](../TanStackDBError.md#name) +[`TanStackDBError`](TanStackDBError.md).[`name`](TanStackDBError.md#name) *** @@ -99,7 +99,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stack`](../TanStackDBError.md#stack) +[`TanStackDBError`](TanStackDBError.md).[`stack`](TanStackDBError.md#stack) *** @@ -123,7 +123,7 @@ not capture any frames. #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stackTraceLimit`](../TanStackDBError.md#stacktracelimit) +[`TanStackDBError`](TanStackDBError.md).[`stackTraceLimit`](TanStackDBError.md#stacktracelimit) ## Methods @@ -195,7 +195,7 @@ a(); #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`captureStackTrace`](../TanStackDBError.md#capturestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`captureStackTrace`](TanStackDBError.md#capturestacktrace) *** @@ -227,4 +227,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`prepareStackTrace`](../TanStackDBError.md#preparestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`prepareStackTrace`](TanStackDBError.md#preparestacktrace) diff --git a/docs/reference/classes/KeyUpdateNotAllowedError.md b/docs/reference/classes/KeyUpdateNotAllowedError.md index 0396ca6ef..26899d765 100644 --- a/docs/reference/classes/KeyUpdateNotAllowedError.md +++ b/docs/reference/classes/KeyUpdateNotAllowedError.md @@ -5,11 +5,11 @@ title: KeyUpdateNotAllowedError # Class: KeyUpdateNotAllowedError -Defined in: [packages/db/src/errors.ts:206](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L206) +Defined in: [packages/db/src/errors.ts:215](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L215) ## Extends -- [`CollectionOperationError`](../CollectionOperationError.md) +- [`CollectionOperationError`](CollectionOperationError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:206](https://github.com/TanStack/db/blob/ new KeyUpdateNotAllowedError(originalKey, newKey): KeyUpdateNotAllowedError; ``` -Defined in: [packages/db/src/errors.ts:207](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L207) +Defined in: [packages/db/src/errors.ts:216](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L216) #### Parameters @@ -37,7 +37,7 @@ Defined in: [packages/db/src/errors.ts:207](https://github.com/TanStack/db/blob/ #### Overrides -[`CollectionOperationError`](../CollectionOperationError.md).[`constructor`](../CollectionOperationError.md#constructor) +[`CollectionOperationError`](CollectionOperationError.md).[`constructor`](CollectionOperationError.md#constructor) ## Properties @@ -51,7 +51,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`cause`](../CollectionOperationError.md#cause) +[`CollectionOperationError`](CollectionOperationError.md).[`cause`](CollectionOperationError.md#cause) *** @@ -65,7 +65,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`message`](../CollectionOperationError.md#message) +[`CollectionOperationError`](CollectionOperationError.md).[`message`](CollectionOperationError.md#message) *** @@ -79,7 +79,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`name`](../CollectionOperationError.md#name) +[`CollectionOperationError`](CollectionOperationError.md).[`name`](CollectionOperationError.md#name) *** @@ -93,7 +93,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`stack`](../CollectionOperationError.md#stack) +[`CollectionOperationError`](CollectionOperationError.md).[`stack`](CollectionOperationError.md#stack) *** @@ -117,7 +117,7 @@ not capture any frames. #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`stackTraceLimit`](../CollectionOperationError.md#stacktracelimit) +[`CollectionOperationError`](CollectionOperationError.md).[`stackTraceLimit`](CollectionOperationError.md#stacktracelimit) ## Methods @@ -189,7 +189,7 @@ a(); #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`captureStackTrace`](../CollectionOperationError.md#capturestacktrace) +[`CollectionOperationError`](CollectionOperationError.md).[`captureStackTrace`](CollectionOperationError.md#capturestacktrace) *** @@ -221,4 +221,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`prepareStackTrace`](../CollectionOperationError.md#preparestacktrace) +[`CollectionOperationError`](CollectionOperationError.md).[`prepareStackTrace`](CollectionOperationError.md#preparestacktrace) diff --git a/docs/reference/classes/LazyIndexWrapper.md b/docs/reference/classes/LazyIndexWrapper.md index 45592142b..703809366 100644 --- a/docs/reference/classes/LazyIndexWrapper.md +++ b/docs/reference/classes/LazyIndexWrapper.md @@ -39,7 +39,7 @@ Defined in: [packages/db/src/indexes/lazy-index.ts:43](https://github.com/TanSta ##### expression -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md) +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md) ##### name @@ -47,7 +47,7 @@ Defined in: [packages/db/src/indexes/lazy-index.ts:43](https://github.com/TanSta ##### resolver -[`IndexResolver`](../../type-aliases/IndexResolver.md)\<`TKey`\> +[`IndexResolver`](../type-aliases/IndexResolver.md)\<`TKey`\> ##### options @@ -75,7 +75,7 @@ Get the index expression #### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md) +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md) *** @@ -123,7 +123,7 @@ Get resolved index (throws if not ready) #### Returns -[`BaseIndex`](../BaseIndex.md)\<`TKey`\> +[`BaseIndex`](BaseIndex.md)\<`TKey`\> *** @@ -155,4 +155,4 @@ Resolve the actual index #### Returns -`Promise`\<[`BaseIndex`](../BaseIndex.md)\<`TKey`\>\> +`Promise`\<[`BaseIndex`](BaseIndex.md)\<`TKey`\>\> diff --git a/docs/reference/classes/LimitOffsetRequireOrderByError.md b/docs/reference/classes/LimitOffsetRequireOrderByError.md index 53e0be1f1..5023b746e 100644 --- a/docs/reference/classes/LimitOffsetRequireOrderByError.md +++ b/docs/reference/classes/LimitOffsetRequireOrderByError.md @@ -5,11 +5,11 @@ title: LimitOffsetRequireOrderByError # Class: LimitOffsetRequireOrderByError -Defined in: [packages/db/src/errors.ts:404](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L404) +Defined in: [packages/db/src/errors.ts:413](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L413) ## Extends -- [`QueryCompilationError`](../QueryCompilationError.md) +- [`QueryCompilationError`](QueryCompilationError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:404](https://github.com/TanStack/db/blob/ new LimitOffsetRequireOrderByError(): LimitOffsetRequireOrderByError; ``` -Defined in: [packages/db/src/errors.ts:405](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L405) +Defined in: [packages/db/src/errors.ts:414](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L414) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:405](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryCompilationError`](../QueryCompilationError.md).[`constructor`](../QueryCompilationError.md#constructor) +[`QueryCompilationError`](QueryCompilationError.md).[`constructor`](QueryCompilationError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`cause`](../QueryCompilationError.md#cause) +[`QueryCompilationError`](QueryCompilationError.md).[`cause`](QueryCompilationError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`message`](../QueryCompilationError.md#message) +[`QueryCompilationError`](QueryCompilationError.md).[`message`](QueryCompilationError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`name`](../QueryCompilationError.md#name) +[`QueryCompilationError`](QueryCompilationError.md).[`name`](QueryCompilationError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stack`](../QueryCompilationError.md#stack) +[`QueryCompilationError`](QueryCompilationError.md).[`stack`](QueryCompilationError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stackTraceLimit`](../QueryCompilationError.md#stacktracelimit) +[`QueryCompilationError`](QueryCompilationError.md).[`stackTraceLimit`](QueryCompilationError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`captureStackTrace`](../QueryCompilationError.md#capturestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`captureStackTrace`](QueryCompilationError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`prepareStackTrace`](../QueryCompilationError.md#preparestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`prepareStackTrace`](QueryCompilationError.md#preparestacktrace) diff --git a/docs/reference/classes/LocalStorageCollectionError.md b/docs/reference/classes/LocalStorageCollectionError.md index e101629b3..5166ac94a 100644 --- a/docs/reference/classes/LocalStorageCollectionError.md +++ b/docs/reference/classes/LocalStorageCollectionError.md @@ -5,17 +5,17 @@ title: LocalStorageCollectionError # Class: LocalStorageCollectionError -Defined in: [packages/db/src/errors.ts:587](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L587) +Defined in: [packages/db/src/errors.ts:596](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L596) ## Extends -- [`StorageError`](../StorageError.md) +- [`StorageError`](StorageError.md) ## Extended by -- [`StorageKeyRequiredError`](../StorageKeyRequiredError.md) -- [`InvalidStorageDataFormatError`](../InvalidStorageDataFormatError.md) -- [`InvalidStorageObjectFormatError`](../InvalidStorageObjectFormatError.md) +- [`StorageKeyRequiredError`](StorageKeyRequiredError.md) +- [`InvalidStorageDataFormatError`](InvalidStorageDataFormatError.md) +- [`InvalidStorageObjectFormatError`](InvalidStorageObjectFormatError.md) ## Constructors @@ -25,7 +25,7 @@ Defined in: [packages/db/src/errors.ts:587](https://github.com/TanStack/db/blob/ new LocalStorageCollectionError(message): LocalStorageCollectionError; ``` -Defined in: [packages/db/src/errors.ts:588](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L588) +Defined in: [packages/db/src/errors.ts:597](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L597) #### Parameters @@ -39,7 +39,7 @@ Defined in: [packages/db/src/errors.ts:588](https://github.com/TanStack/db/blob/ #### Overrides -[`StorageError`](../StorageError.md).[`constructor`](../StorageError.md#constructor) +[`StorageError`](StorageError.md).[`constructor`](StorageError.md#constructor) ## Properties @@ -53,7 +53,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`StorageError`](../StorageError.md).[`cause`](../StorageError.md#cause) +[`StorageError`](StorageError.md).[`cause`](StorageError.md#cause) *** @@ -67,7 +67,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`StorageError`](../StorageError.md).[`message`](../StorageError.md#message) +[`StorageError`](StorageError.md).[`message`](StorageError.md#message) *** @@ -81,7 +81,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`StorageError`](../StorageError.md).[`name`](../StorageError.md#name) +[`StorageError`](StorageError.md).[`name`](StorageError.md#name) *** @@ -95,7 +95,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`StorageError`](../StorageError.md).[`stack`](../StorageError.md#stack) +[`StorageError`](StorageError.md).[`stack`](StorageError.md#stack) *** @@ -119,7 +119,7 @@ not capture any frames. #### Inherited from -[`StorageError`](../StorageError.md).[`stackTraceLimit`](../StorageError.md#stacktracelimit) +[`StorageError`](StorageError.md).[`stackTraceLimit`](StorageError.md#stacktracelimit) ## Methods @@ -191,7 +191,7 @@ a(); #### Inherited from -[`StorageError`](../StorageError.md).[`captureStackTrace`](../StorageError.md#capturestacktrace) +[`StorageError`](StorageError.md).[`captureStackTrace`](StorageError.md#capturestacktrace) *** @@ -223,4 +223,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`StorageError`](../StorageError.md).[`prepareStackTrace`](../StorageError.md#preparestacktrace) +[`StorageError`](StorageError.md).[`prepareStackTrace`](StorageError.md#preparestacktrace) diff --git a/docs/reference/classes/MissingAliasInputsError.md b/docs/reference/classes/MissingAliasInputsError.md index bd1cb17e5..2b0fb0585 100644 --- a/docs/reference/classes/MissingAliasInputsError.md +++ b/docs/reference/classes/MissingAliasInputsError.md @@ -5,14 +5,14 @@ title: MissingAliasInputsError # Class: MissingAliasInputsError -Defined in: [packages/db/src/errors.ts:684](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L684) +Defined in: [packages/db/src/errors.ts:693](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L693) Internal error when the compiler returns aliases that don't have corresponding input streams. This should never happen since all aliases come from user declarations. ## Extends -- [`QueryCompilationError`](../QueryCompilationError.md) +- [`QueryCompilationError`](QueryCompilationError.md) ## Constructors @@ -22,7 +22,7 @@ This should never happen since all aliases come from user declarations. new MissingAliasInputsError(missingAliases): MissingAliasInputsError; ``` -Defined in: [packages/db/src/errors.ts:685](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L685) +Defined in: [packages/db/src/errors.ts:694](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L694) #### Parameters @@ -36,7 +36,7 @@ Defined in: [packages/db/src/errors.ts:685](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryCompilationError`](../QueryCompilationError.md).[`constructor`](../QueryCompilationError.md#constructor) +[`QueryCompilationError`](QueryCompilationError.md).[`constructor`](QueryCompilationError.md#constructor) ## Properties @@ -50,7 +50,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`cause`](../QueryCompilationError.md#cause) +[`QueryCompilationError`](QueryCompilationError.md).[`cause`](QueryCompilationError.md#cause) *** @@ -64,7 +64,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`message`](../QueryCompilationError.md#message) +[`QueryCompilationError`](QueryCompilationError.md).[`message`](QueryCompilationError.md#message) *** @@ -78,7 +78,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`name`](../QueryCompilationError.md#name) +[`QueryCompilationError`](QueryCompilationError.md).[`name`](QueryCompilationError.md#name) *** @@ -92,7 +92,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stack`](../QueryCompilationError.md#stack) +[`QueryCompilationError`](QueryCompilationError.md).[`stack`](QueryCompilationError.md#stack) *** @@ -116,7 +116,7 @@ not capture any frames. #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stackTraceLimit`](../QueryCompilationError.md#stacktracelimit) +[`QueryCompilationError`](QueryCompilationError.md).[`stackTraceLimit`](QueryCompilationError.md#stacktracelimit) ## Methods @@ -188,7 +188,7 @@ a(); #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`captureStackTrace`](../QueryCompilationError.md#capturestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`captureStackTrace`](QueryCompilationError.md#capturestacktrace) *** @@ -220,4 +220,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`prepareStackTrace`](../QueryCompilationError.md#preparestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`prepareStackTrace`](QueryCompilationError.md#preparestacktrace) diff --git a/docs/reference/classes/MissingDeleteHandlerError.md b/docs/reference/classes/MissingDeleteHandlerError.md index 708d29cf9..dc65b1acf 100644 --- a/docs/reference/classes/MissingDeleteHandlerError.md +++ b/docs/reference/classes/MissingDeleteHandlerError.md @@ -5,11 +5,11 @@ title: MissingDeleteHandlerError # Class: MissingDeleteHandlerError -Defined in: [packages/db/src/errors.ts:252](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L252) +Defined in: [packages/db/src/errors.ts:261](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L261) ## Extends -- [`MissingHandlerError`](../MissingHandlerError.md) +- [`MissingHandlerError`](MissingHandlerError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:252](https://github.com/TanStack/db/blob/ new MissingDeleteHandlerError(): MissingDeleteHandlerError; ``` -Defined in: [packages/db/src/errors.ts:253](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L253) +Defined in: [packages/db/src/errors.ts:262](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L262) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:253](https://github.com/TanStack/db/blob/ #### Overrides -[`MissingHandlerError`](../MissingHandlerError.md).[`constructor`](../MissingHandlerError.md#constructor) +[`MissingHandlerError`](MissingHandlerError.md).[`constructor`](MissingHandlerError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`cause`](../MissingHandlerError.md#cause) +[`MissingHandlerError`](MissingHandlerError.md).[`cause`](MissingHandlerError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`message`](../MissingHandlerError.md#message) +[`MissingHandlerError`](MissingHandlerError.md).[`message`](MissingHandlerError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`name`](../MissingHandlerError.md#name) +[`MissingHandlerError`](MissingHandlerError.md).[`name`](MissingHandlerError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`stack`](../MissingHandlerError.md#stack) +[`MissingHandlerError`](MissingHandlerError.md).[`stack`](MissingHandlerError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`stackTraceLimit`](../MissingHandlerError.md#stacktracelimit) +[`MissingHandlerError`](MissingHandlerError.md).[`stackTraceLimit`](MissingHandlerError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`captureStackTrace`](../MissingHandlerError.md#capturestacktrace) +[`MissingHandlerError`](MissingHandlerError.md).[`captureStackTrace`](MissingHandlerError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`prepareStackTrace`](../MissingHandlerError.md#preparestacktrace) +[`MissingHandlerError`](MissingHandlerError.md).[`prepareStackTrace`](MissingHandlerError.md#preparestacktrace) diff --git a/docs/reference/classes/MissingHandlerError.md b/docs/reference/classes/MissingHandlerError.md index 4f1b02439..8504d778b 100644 --- a/docs/reference/classes/MissingHandlerError.md +++ b/docs/reference/classes/MissingHandlerError.md @@ -5,17 +5,17 @@ title: MissingHandlerError # Class: MissingHandlerError -Defined in: [packages/db/src/errors.ts:229](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L229) +Defined in: [packages/db/src/errors.ts:238](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L238) ## Extends -- [`TanStackDBError`](../TanStackDBError.md) +- [`TanStackDBError`](TanStackDBError.md) ## Extended by -- [`MissingInsertHandlerError`](../MissingInsertHandlerError.md) -- [`MissingUpdateHandlerError`](../MissingUpdateHandlerError.md) -- [`MissingDeleteHandlerError`](../MissingDeleteHandlerError.md) +- [`MissingInsertHandlerError`](MissingInsertHandlerError.md) +- [`MissingUpdateHandlerError`](MissingUpdateHandlerError.md) +- [`MissingDeleteHandlerError`](MissingDeleteHandlerError.md) ## Constructors @@ -25,7 +25,7 @@ Defined in: [packages/db/src/errors.ts:229](https://github.com/TanStack/db/blob/ new MissingHandlerError(message): MissingHandlerError; ``` -Defined in: [packages/db/src/errors.ts:230](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L230) +Defined in: [packages/db/src/errors.ts:239](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L239) #### Parameters @@ -39,7 +39,7 @@ Defined in: [packages/db/src/errors.ts:230](https://github.com/TanStack/db/blob/ #### Overrides -[`TanStackDBError`](../TanStackDBError.md).[`constructor`](../TanStackDBError.md#constructor) +[`TanStackDBError`](TanStackDBError.md).[`constructor`](TanStackDBError.md#constructor) ## Properties @@ -53,7 +53,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`cause`](../TanStackDBError.md#cause) +[`TanStackDBError`](TanStackDBError.md).[`cause`](TanStackDBError.md#cause) *** @@ -67,7 +67,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`message`](../TanStackDBError.md#message) +[`TanStackDBError`](TanStackDBError.md).[`message`](TanStackDBError.md#message) *** @@ -81,7 +81,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`name`](../TanStackDBError.md#name) +[`TanStackDBError`](TanStackDBError.md).[`name`](TanStackDBError.md#name) *** @@ -95,7 +95,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stack`](../TanStackDBError.md#stack) +[`TanStackDBError`](TanStackDBError.md).[`stack`](TanStackDBError.md#stack) *** @@ -119,7 +119,7 @@ not capture any frames. #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stackTraceLimit`](../TanStackDBError.md#stacktracelimit) +[`TanStackDBError`](TanStackDBError.md).[`stackTraceLimit`](TanStackDBError.md#stacktracelimit) ## Methods @@ -191,7 +191,7 @@ a(); #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`captureStackTrace`](../TanStackDBError.md#capturestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`captureStackTrace`](TanStackDBError.md#capturestacktrace) *** @@ -223,4 +223,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`prepareStackTrace`](../TanStackDBError.md#preparestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`prepareStackTrace`](TanStackDBError.md#preparestacktrace) diff --git a/docs/reference/classes/MissingInsertHandlerError.md b/docs/reference/classes/MissingInsertHandlerError.md index f2d1e932a..543da47a5 100644 --- a/docs/reference/classes/MissingInsertHandlerError.md +++ b/docs/reference/classes/MissingInsertHandlerError.md @@ -5,11 +5,11 @@ title: MissingInsertHandlerError # Class: MissingInsertHandlerError -Defined in: [packages/db/src/errors.ts:236](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L236) +Defined in: [packages/db/src/errors.ts:245](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L245) ## Extends -- [`MissingHandlerError`](../MissingHandlerError.md) +- [`MissingHandlerError`](MissingHandlerError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:236](https://github.com/TanStack/db/blob/ new MissingInsertHandlerError(): MissingInsertHandlerError; ``` -Defined in: [packages/db/src/errors.ts:237](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L237) +Defined in: [packages/db/src/errors.ts:246](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L246) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:237](https://github.com/TanStack/db/blob/ #### Overrides -[`MissingHandlerError`](../MissingHandlerError.md).[`constructor`](../MissingHandlerError.md#constructor) +[`MissingHandlerError`](MissingHandlerError.md).[`constructor`](MissingHandlerError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`cause`](../MissingHandlerError.md#cause) +[`MissingHandlerError`](MissingHandlerError.md).[`cause`](MissingHandlerError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`message`](../MissingHandlerError.md#message) +[`MissingHandlerError`](MissingHandlerError.md).[`message`](MissingHandlerError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`name`](../MissingHandlerError.md#name) +[`MissingHandlerError`](MissingHandlerError.md).[`name`](MissingHandlerError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`stack`](../MissingHandlerError.md#stack) +[`MissingHandlerError`](MissingHandlerError.md).[`stack`](MissingHandlerError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`stackTraceLimit`](../MissingHandlerError.md#stacktracelimit) +[`MissingHandlerError`](MissingHandlerError.md).[`stackTraceLimit`](MissingHandlerError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`captureStackTrace`](../MissingHandlerError.md#capturestacktrace) +[`MissingHandlerError`](MissingHandlerError.md).[`captureStackTrace`](MissingHandlerError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`prepareStackTrace`](../MissingHandlerError.md#preparestacktrace) +[`MissingHandlerError`](MissingHandlerError.md).[`prepareStackTrace`](MissingHandlerError.md#preparestacktrace) diff --git a/docs/reference/classes/MissingMutationFunctionError.md b/docs/reference/classes/MissingMutationFunctionError.md index 4d07a7939..464693258 100644 --- a/docs/reference/classes/MissingMutationFunctionError.md +++ b/docs/reference/classes/MissingMutationFunctionError.md @@ -5,11 +5,11 @@ title: MissingMutationFunctionError # Class: MissingMutationFunctionError -Defined in: [packages/db/src/errors.ts:268](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L268) +Defined in: [packages/db/src/errors.ts:277](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L277) ## Extends -- [`TransactionError`](../TransactionError.md) +- [`TransactionError`](TransactionError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:268](https://github.com/TanStack/db/blob/ new MissingMutationFunctionError(): MissingMutationFunctionError; ``` -Defined in: [packages/db/src/errors.ts:269](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L269) +Defined in: [packages/db/src/errors.ts:278](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L278) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:269](https://github.com/TanStack/db/blob/ #### Overrides -[`TransactionError`](../TransactionError.md).[`constructor`](../TransactionError.md#constructor) +[`TransactionError`](TransactionError.md).[`constructor`](TransactionError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`cause`](../TransactionError.md#cause) +[`TransactionError`](TransactionError.md).[`cause`](TransactionError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`message`](../TransactionError.md#message) +[`TransactionError`](TransactionError.md).[`message`](TransactionError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`name`](../TransactionError.md#name) +[`TransactionError`](TransactionError.md).[`name`](TransactionError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`stack`](../TransactionError.md#stack) +[`TransactionError`](TransactionError.md).[`stack`](TransactionError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`TransactionError`](../TransactionError.md).[`stackTraceLimit`](../TransactionError.md#stacktracelimit) +[`TransactionError`](TransactionError.md).[`stackTraceLimit`](TransactionError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`TransactionError`](../TransactionError.md).[`captureStackTrace`](../TransactionError.md#capturestacktrace) +[`TransactionError`](TransactionError.md).[`captureStackTrace`](TransactionError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TransactionError`](../TransactionError.md).[`prepareStackTrace`](../TransactionError.md#preparestacktrace) +[`TransactionError`](TransactionError.md).[`prepareStackTrace`](TransactionError.md#preparestacktrace) diff --git a/docs/reference/classes/MissingUpdateArgumentError.md b/docs/reference/classes/MissingUpdateArgumentError.md index 86d4cfbda..c55942cc2 100644 --- a/docs/reference/classes/MissingUpdateArgumentError.md +++ b/docs/reference/classes/MissingUpdateArgumentError.md @@ -5,11 +5,11 @@ title: MissingUpdateArgumentError # Class: MissingUpdateArgumentError -Defined in: [packages/db/src/errors.ts:186](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L186) +Defined in: [packages/db/src/errors.ts:195](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L195) ## Extends -- [`CollectionOperationError`](../CollectionOperationError.md) +- [`CollectionOperationError`](CollectionOperationError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:186](https://github.com/TanStack/db/blob/ new MissingUpdateArgumentError(): MissingUpdateArgumentError; ``` -Defined in: [packages/db/src/errors.ts:187](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L187) +Defined in: [packages/db/src/errors.ts:196](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L196) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:187](https://github.com/TanStack/db/blob/ #### Overrides -[`CollectionOperationError`](../CollectionOperationError.md).[`constructor`](../CollectionOperationError.md#constructor) +[`CollectionOperationError`](CollectionOperationError.md).[`constructor`](CollectionOperationError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`cause`](../CollectionOperationError.md#cause) +[`CollectionOperationError`](CollectionOperationError.md).[`cause`](CollectionOperationError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`message`](../CollectionOperationError.md#message) +[`CollectionOperationError`](CollectionOperationError.md).[`message`](CollectionOperationError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`name`](../CollectionOperationError.md#name) +[`CollectionOperationError`](CollectionOperationError.md).[`name`](CollectionOperationError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`stack`](../CollectionOperationError.md#stack) +[`CollectionOperationError`](CollectionOperationError.md).[`stack`](CollectionOperationError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`stackTraceLimit`](../CollectionOperationError.md#stacktracelimit) +[`CollectionOperationError`](CollectionOperationError.md).[`stackTraceLimit`](CollectionOperationError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`captureStackTrace`](../CollectionOperationError.md#capturestacktrace) +[`CollectionOperationError`](CollectionOperationError.md).[`captureStackTrace`](CollectionOperationError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`prepareStackTrace`](../CollectionOperationError.md#preparestacktrace) +[`CollectionOperationError`](CollectionOperationError.md).[`prepareStackTrace`](CollectionOperationError.md#preparestacktrace) diff --git a/docs/reference/classes/MissingUpdateHandlerError.md b/docs/reference/classes/MissingUpdateHandlerError.md index 627dbf336..2ae8f2cfb 100644 --- a/docs/reference/classes/MissingUpdateHandlerError.md +++ b/docs/reference/classes/MissingUpdateHandlerError.md @@ -5,11 +5,11 @@ title: MissingUpdateHandlerError # Class: MissingUpdateHandlerError -Defined in: [packages/db/src/errors.ts:244](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L244) +Defined in: [packages/db/src/errors.ts:253](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L253) ## Extends -- [`MissingHandlerError`](../MissingHandlerError.md) +- [`MissingHandlerError`](MissingHandlerError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:244](https://github.com/TanStack/db/blob/ new MissingUpdateHandlerError(): MissingUpdateHandlerError; ``` -Defined in: [packages/db/src/errors.ts:245](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L245) +Defined in: [packages/db/src/errors.ts:254](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L254) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:245](https://github.com/TanStack/db/blob/ #### Overrides -[`MissingHandlerError`](../MissingHandlerError.md).[`constructor`](../MissingHandlerError.md#constructor) +[`MissingHandlerError`](MissingHandlerError.md).[`constructor`](MissingHandlerError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`cause`](../MissingHandlerError.md#cause) +[`MissingHandlerError`](MissingHandlerError.md).[`cause`](MissingHandlerError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`message`](../MissingHandlerError.md#message) +[`MissingHandlerError`](MissingHandlerError.md).[`message`](MissingHandlerError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`name`](../MissingHandlerError.md#name) +[`MissingHandlerError`](MissingHandlerError.md).[`name`](MissingHandlerError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`stack`](../MissingHandlerError.md#stack) +[`MissingHandlerError`](MissingHandlerError.md).[`stack`](MissingHandlerError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`stackTraceLimit`](../MissingHandlerError.md#stacktracelimit) +[`MissingHandlerError`](MissingHandlerError.md).[`stackTraceLimit`](MissingHandlerError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`captureStackTrace`](../MissingHandlerError.md#capturestacktrace) +[`MissingHandlerError`](MissingHandlerError.md).[`captureStackTrace`](MissingHandlerError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`MissingHandlerError`](../MissingHandlerError.md).[`prepareStackTrace`](../MissingHandlerError.md#preparestacktrace) +[`MissingHandlerError`](MissingHandlerError.md).[`prepareStackTrace`](MissingHandlerError.md#preparestacktrace) diff --git a/docs/reference/classes/NegativeActiveSubscribersError.md b/docs/reference/classes/NegativeActiveSubscribersError.md index cd3b1cc36..d94047c24 100644 --- a/docs/reference/classes/NegativeActiveSubscribersError.md +++ b/docs/reference/classes/NegativeActiveSubscribersError.md @@ -9,7 +9,7 @@ Defined in: [packages/db/src/errors.ts:132](https://github.com/TanStack/db/blob/ ## Extends -- [`CollectionStateError`](../CollectionStateError.md) +- [`CollectionStateError`](CollectionStateError.md) ## Constructors @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:133](https://github.com/TanStack/db/blob/ #### Overrides -[`CollectionStateError`](../CollectionStateError.md).[`constructor`](../CollectionStateError.md#constructor) +[`CollectionStateError`](CollectionStateError.md).[`constructor`](CollectionStateError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`cause`](../CollectionStateError.md#cause) +[`CollectionStateError`](CollectionStateError.md).[`cause`](CollectionStateError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`message`](../CollectionStateError.md#message) +[`CollectionStateError`](CollectionStateError.md).[`message`](CollectionStateError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`name`](../CollectionStateError.md#name) +[`CollectionStateError`](CollectionStateError.md).[`name`](CollectionStateError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`stack`](../CollectionStateError.md#stack) +[`CollectionStateError`](CollectionStateError.md).[`stack`](CollectionStateError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`stackTraceLimit`](../CollectionStateError.md#stacktracelimit) +[`CollectionStateError`](CollectionStateError.md).[`stackTraceLimit`](CollectionStateError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`captureStackTrace`](../CollectionStateError.md#capturestacktrace) +[`CollectionStateError`](CollectionStateError.md).[`captureStackTrace`](CollectionStateError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`CollectionStateError`](../CollectionStateError.md).[`prepareStackTrace`](../CollectionStateError.md#preparestacktrace) +[`CollectionStateError`](CollectionStateError.md).[`prepareStackTrace`](CollectionStateError.md#preparestacktrace) diff --git a/docs/reference/classes/NoKeysPassedToDeleteError.md b/docs/reference/classes/NoKeysPassedToDeleteError.md index 6decc6337..035ba7cce 100644 --- a/docs/reference/classes/NoKeysPassedToDeleteError.md +++ b/docs/reference/classes/NoKeysPassedToDeleteError.md @@ -5,11 +5,11 @@ title: NoKeysPassedToDeleteError # Class: NoKeysPassedToDeleteError -Defined in: [packages/db/src/errors.ts:214](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L214) +Defined in: [packages/db/src/errors.ts:223](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L223) ## Extends -- [`CollectionOperationError`](../CollectionOperationError.md) +- [`CollectionOperationError`](CollectionOperationError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:214](https://github.com/TanStack/db/blob/ new NoKeysPassedToDeleteError(): NoKeysPassedToDeleteError; ``` -Defined in: [packages/db/src/errors.ts:215](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L215) +Defined in: [packages/db/src/errors.ts:224](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L224) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:215](https://github.com/TanStack/db/blob/ #### Overrides -[`CollectionOperationError`](../CollectionOperationError.md).[`constructor`](../CollectionOperationError.md#constructor) +[`CollectionOperationError`](CollectionOperationError.md).[`constructor`](CollectionOperationError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`cause`](../CollectionOperationError.md#cause) +[`CollectionOperationError`](CollectionOperationError.md).[`cause`](CollectionOperationError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`message`](../CollectionOperationError.md#message) +[`CollectionOperationError`](CollectionOperationError.md).[`message`](CollectionOperationError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`name`](../CollectionOperationError.md#name) +[`CollectionOperationError`](CollectionOperationError.md).[`name`](CollectionOperationError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`stack`](../CollectionOperationError.md#stack) +[`CollectionOperationError`](CollectionOperationError.md).[`stack`](CollectionOperationError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`stackTraceLimit`](../CollectionOperationError.md#stacktracelimit) +[`CollectionOperationError`](CollectionOperationError.md).[`stackTraceLimit`](CollectionOperationError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`captureStackTrace`](../CollectionOperationError.md#capturestacktrace) +[`CollectionOperationError`](CollectionOperationError.md).[`captureStackTrace`](CollectionOperationError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`prepareStackTrace`](../CollectionOperationError.md#preparestacktrace) +[`CollectionOperationError`](CollectionOperationError.md).[`prepareStackTrace`](CollectionOperationError.md#preparestacktrace) diff --git a/docs/reference/classes/NoKeysPassedToUpdateError.md b/docs/reference/classes/NoKeysPassedToUpdateError.md index e177fb8a5..a00dfbcd6 100644 --- a/docs/reference/classes/NoKeysPassedToUpdateError.md +++ b/docs/reference/classes/NoKeysPassedToUpdateError.md @@ -5,11 +5,11 @@ title: NoKeysPassedToUpdateError # Class: NoKeysPassedToUpdateError -Defined in: [packages/db/src/errors.ts:192](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L192) +Defined in: [packages/db/src/errors.ts:201](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L201) ## Extends -- [`CollectionOperationError`](../CollectionOperationError.md) +- [`CollectionOperationError`](CollectionOperationError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:192](https://github.com/TanStack/db/blob/ new NoKeysPassedToUpdateError(): NoKeysPassedToUpdateError; ``` -Defined in: [packages/db/src/errors.ts:193](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L193) +Defined in: [packages/db/src/errors.ts:202](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L202) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:193](https://github.com/TanStack/db/blob/ #### Overrides -[`CollectionOperationError`](../CollectionOperationError.md).[`constructor`](../CollectionOperationError.md#constructor) +[`CollectionOperationError`](CollectionOperationError.md).[`constructor`](CollectionOperationError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`cause`](../CollectionOperationError.md#cause) +[`CollectionOperationError`](CollectionOperationError.md).[`cause`](CollectionOperationError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`message`](../CollectionOperationError.md#message) +[`CollectionOperationError`](CollectionOperationError.md).[`message`](CollectionOperationError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`name`](../CollectionOperationError.md#name) +[`CollectionOperationError`](CollectionOperationError.md).[`name`](CollectionOperationError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`stack`](../CollectionOperationError.md#stack) +[`CollectionOperationError`](CollectionOperationError.md).[`stack`](CollectionOperationError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`stackTraceLimit`](../CollectionOperationError.md#stacktracelimit) +[`CollectionOperationError`](CollectionOperationError.md).[`stackTraceLimit`](CollectionOperationError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`captureStackTrace`](../CollectionOperationError.md#capturestacktrace) +[`CollectionOperationError`](CollectionOperationError.md).[`captureStackTrace`](CollectionOperationError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`prepareStackTrace`](../CollectionOperationError.md#preparestacktrace) +[`CollectionOperationError`](CollectionOperationError.md).[`prepareStackTrace`](CollectionOperationError.md#preparestacktrace) diff --git a/docs/reference/classes/NoPendingSyncTransactionCommitError.md b/docs/reference/classes/NoPendingSyncTransactionCommitError.md index 4451bf185..09e630c36 100644 --- a/docs/reference/classes/NoPendingSyncTransactionCommitError.md +++ b/docs/reference/classes/NoPendingSyncTransactionCommitError.md @@ -5,11 +5,11 @@ title: NoPendingSyncTransactionCommitError # Class: NoPendingSyncTransactionCommitError -Defined in: [packages/db/src/errors.ts:321](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L321) +Defined in: [packages/db/src/errors.ts:330](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L330) ## Extends -- [`TransactionError`](../TransactionError.md) +- [`TransactionError`](TransactionError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:321](https://github.com/TanStack/db/blob/ new NoPendingSyncTransactionCommitError(): NoPendingSyncTransactionCommitError; ``` -Defined in: [packages/db/src/errors.ts:322](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L322) +Defined in: [packages/db/src/errors.ts:331](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L331) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:322](https://github.com/TanStack/db/blob/ #### Overrides -[`TransactionError`](../TransactionError.md).[`constructor`](../TransactionError.md#constructor) +[`TransactionError`](TransactionError.md).[`constructor`](TransactionError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`cause`](../TransactionError.md#cause) +[`TransactionError`](TransactionError.md).[`cause`](TransactionError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`message`](../TransactionError.md#message) +[`TransactionError`](TransactionError.md).[`message`](TransactionError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`name`](../TransactionError.md#name) +[`TransactionError`](TransactionError.md).[`name`](TransactionError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`stack`](../TransactionError.md#stack) +[`TransactionError`](TransactionError.md).[`stack`](TransactionError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`TransactionError`](../TransactionError.md).[`stackTraceLimit`](../TransactionError.md#stacktracelimit) +[`TransactionError`](TransactionError.md).[`stackTraceLimit`](TransactionError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`TransactionError`](../TransactionError.md).[`captureStackTrace`](../TransactionError.md#capturestacktrace) +[`TransactionError`](TransactionError.md).[`captureStackTrace`](TransactionError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TransactionError`](../TransactionError.md).[`prepareStackTrace`](../TransactionError.md#preparestacktrace) +[`TransactionError`](TransactionError.md).[`prepareStackTrace`](TransactionError.md#preparestacktrace) diff --git a/docs/reference/classes/NoPendingSyncTransactionWriteError.md b/docs/reference/classes/NoPendingSyncTransactionWriteError.md index 38d0ac384..f084b858c 100644 --- a/docs/reference/classes/NoPendingSyncTransactionWriteError.md +++ b/docs/reference/classes/NoPendingSyncTransactionWriteError.md @@ -5,11 +5,11 @@ title: NoPendingSyncTransactionWriteError # Class: NoPendingSyncTransactionWriteError -Defined in: [packages/db/src/errors.ts:307](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L307) +Defined in: [packages/db/src/errors.ts:316](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L316) ## Extends -- [`TransactionError`](../TransactionError.md) +- [`TransactionError`](TransactionError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:307](https://github.com/TanStack/db/blob/ new NoPendingSyncTransactionWriteError(): NoPendingSyncTransactionWriteError; ``` -Defined in: [packages/db/src/errors.ts:308](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L308) +Defined in: [packages/db/src/errors.ts:317](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L317) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:308](https://github.com/TanStack/db/blob/ #### Overrides -[`TransactionError`](../TransactionError.md).[`constructor`](../TransactionError.md#constructor) +[`TransactionError`](TransactionError.md).[`constructor`](TransactionError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`cause`](../TransactionError.md#cause) +[`TransactionError`](TransactionError.md).[`cause`](TransactionError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`message`](../TransactionError.md#message) +[`TransactionError`](TransactionError.md).[`message`](TransactionError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`name`](../TransactionError.md#name) +[`TransactionError`](TransactionError.md).[`name`](TransactionError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`stack`](../TransactionError.md#stack) +[`TransactionError`](TransactionError.md).[`stack`](TransactionError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`TransactionError`](../TransactionError.md).[`stackTraceLimit`](../TransactionError.md#stacktracelimit) +[`TransactionError`](TransactionError.md).[`stackTraceLimit`](TransactionError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`TransactionError`](../TransactionError.md).[`captureStackTrace`](../TransactionError.md#capturestacktrace) +[`TransactionError`](TransactionError.md).[`captureStackTrace`](TransactionError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TransactionError`](../TransactionError.md).[`prepareStackTrace`](../TransactionError.md#preparestacktrace) +[`TransactionError`](TransactionError.md).[`prepareStackTrace`](TransactionError.md#preparestacktrace) diff --git a/docs/reference/classes/NonAggregateExpressionNotInGroupByError.md b/docs/reference/classes/NonAggregateExpressionNotInGroupByError.md index 8a56a9c0b..47df0cff2 100644 --- a/docs/reference/classes/NonAggregateExpressionNotInGroupByError.md +++ b/docs/reference/classes/NonAggregateExpressionNotInGroupByError.md @@ -5,11 +5,11 @@ title: NonAggregateExpressionNotInGroupByError # Class: NonAggregateExpressionNotInGroupByError -Defined in: [packages/db/src/errors.ts:542](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L542) +Defined in: [packages/db/src/errors.ts:551](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L551) ## Extends -- [`GroupByError`](../GroupByError.md) +- [`GroupByError`](GroupByError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:542](https://github.com/TanStack/db/blob/ new NonAggregateExpressionNotInGroupByError(alias): NonAggregateExpressionNotInGroupByError; ``` -Defined in: [packages/db/src/errors.ts:543](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L543) +Defined in: [packages/db/src/errors.ts:552](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L552) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:543](https://github.com/TanStack/db/blob/ #### Overrides -[`GroupByError`](../GroupByError.md).[`constructor`](../GroupByError.md#constructor) +[`GroupByError`](GroupByError.md).[`constructor`](GroupByError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`GroupByError`](../GroupByError.md).[`cause`](../GroupByError.md#cause) +[`GroupByError`](GroupByError.md).[`cause`](GroupByError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`GroupByError`](../GroupByError.md).[`message`](../GroupByError.md#message) +[`GroupByError`](GroupByError.md).[`message`](GroupByError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`GroupByError`](../GroupByError.md).[`name`](../GroupByError.md#name) +[`GroupByError`](GroupByError.md).[`name`](GroupByError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`GroupByError`](../GroupByError.md).[`stack`](../GroupByError.md#stack) +[`GroupByError`](GroupByError.md).[`stack`](GroupByError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`GroupByError`](../GroupByError.md).[`stackTraceLimit`](../GroupByError.md#stacktracelimit) +[`GroupByError`](GroupByError.md).[`stackTraceLimit`](GroupByError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`GroupByError`](../GroupByError.md).[`captureStackTrace`](../GroupByError.md#capturestacktrace) +[`GroupByError`](GroupByError.md).[`captureStackTrace`](GroupByError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`GroupByError`](../GroupByError.md).[`prepareStackTrace`](../GroupByError.md#preparestacktrace) +[`GroupByError`](GroupByError.md).[`prepareStackTrace`](GroupByError.md#preparestacktrace) diff --git a/docs/reference/classes/NonRetriableError.md b/docs/reference/classes/NonRetriableError.md index c048829fd..f7c35f700 100644 --- a/docs/reference/classes/NonRetriableError.md +++ b/docs/reference/classes/NonRetriableError.md @@ -9,7 +9,7 @@ Defined in: [packages/db/src/errors.ts:10](https://github.com/TanStack/db/blob/m ## Extends -- [`TanStackDBError`](../TanStackDBError.md) +- [`TanStackDBError`](TanStackDBError.md) ## Constructors @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:11](https://github.com/TanStack/db/blob/m #### Overrides -[`TanStackDBError`](../TanStackDBError.md).[`constructor`](../TanStackDBError.md#constructor) +[`TanStackDBError`](TanStackDBError.md).[`constructor`](TanStackDBError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`cause`](../TanStackDBError.md#cause) +[`TanStackDBError`](TanStackDBError.md).[`cause`](TanStackDBError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`message`](../TanStackDBError.md#message) +[`TanStackDBError`](TanStackDBError.md).[`message`](TanStackDBError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`name`](../TanStackDBError.md#name) +[`TanStackDBError`](TanStackDBError.md).[`name`](TanStackDBError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stack`](../TanStackDBError.md#stack) +[`TanStackDBError`](TanStackDBError.md).[`stack`](TanStackDBError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stackTraceLimit`](../TanStackDBError.md#stacktracelimit) +[`TanStackDBError`](TanStackDBError.md).[`stackTraceLimit`](TanStackDBError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`captureStackTrace`](../TanStackDBError.md#capturestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`captureStackTrace`](TanStackDBError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`prepareStackTrace`](../TanStackDBError.md#preparestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`prepareStackTrace`](TanStackDBError.md#preparestacktrace) diff --git a/docs/reference/classes/OnMutateMustBeSynchronousError.md b/docs/reference/classes/OnMutateMustBeSynchronousError.md index 9294d8e4f..3a37f0eee 100644 --- a/docs/reference/classes/OnMutateMustBeSynchronousError.md +++ b/docs/reference/classes/OnMutateMustBeSynchronousError.md @@ -5,11 +5,11 @@ title: OnMutateMustBeSynchronousError # Class: OnMutateMustBeSynchronousError -Defined in: [packages/db/src/errors.ts:274](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L274) +Defined in: [packages/db/src/errors.ts:283](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L283) ## Extends -- [`TransactionError`](../TransactionError.md) +- [`TransactionError`](TransactionError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:274](https://github.com/TanStack/db/blob/ new OnMutateMustBeSynchronousError(): OnMutateMustBeSynchronousError; ``` -Defined in: [packages/db/src/errors.ts:275](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L275) +Defined in: [packages/db/src/errors.ts:284](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L284) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:275](https://github.com/TanStack/db/blob/ #### Overrides -[`TransactionError`](../TransactionError.md).[`constructor`](../TransactionError.md#constructor) +[`TransactionError`](TransactionError.md).[`constructor`](TransactionError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`cause`](../TransactionError.md#cause) +[`TransactionError`](TransactionError.md).[`cause`](TransactionError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`message`](../TransactionError.md#message) +[`TransactionError`](TransactionError.md).[`message`](TransactionError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`name`](../TransactionError.md#name) +[`TransactionError`](TransactionError.md).[`name`](TransactionError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`stack`](../TransactionError.md#stack) +[`TransactionError`](TransactionError.md).[`stack`](TransactionError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`TransactionError`](../TransactionError.md).[`stackTraceLimit`](../TransactionError.md#stacktracelimit) +[`TransactionError`](TransactionError.md).[`stackTraceLimit`](TransactionError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`TransactionError`](../TransactionError.md).[`captureStackTrace`](../TransactionError.md#capturestacktrace) +[`TransactionError`](TransactionError.md).[`captureStackTrace`](TransactionError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TransactionError`](../TransactionError.md).[`prepareStackTrace`](../TransactionError.md#preparestacktrace) +[`TransactionError`](TransactionError.md).[`prepareStackTrace`](TransactionError.md#preparestacktrace) diff --git a/docs/reference/classes/OnlyOneSourceAllowedError.md b/docs/reference/classes/OnlyOneSourceAllowedError.md index 81ae7f6fd..0ccd0ddfe 100644 --- a/docs/reference/classes/OnlyOneSourceAllowedError.md +++ b/docs/reference/classes/OnlyOneSourceAllowedError.md @@ -5,11 +5,11 @@ title: OnlyOneSourceAllowedError # Class: OnlyOneSourceAllowedError -Defined in: [packages/db/src/errors.ts:343](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L343) +Defined in: [packages/db/src/errors.ts:352](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L352) ## Extends -- [`QueryBuilderError`](../QueryBuilderError.md) +- [`QueryBuilderError`](QueryBuilderError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:343](https://github.com/TanStack/db/blob/ new OnlyOneSourceAllowedError(context): OnlyOneSourceAllowedError; ``` -Defined in: [packages/db/src/errors.ts:344](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L344) +Defined in: [packages/db/src/errors.ts:353](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L353) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:344](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryBuilderError`](../QueryBuilderError.md).[`constructor`](../QueryBuilderError.md#constructor) +[`QueryBuilderError`](QueryBuilderError.md).[`constructor`](QueryBuilderError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`cause`](../QueryBuilderError.md#cause) +[`QueryBuilderError`](QueryBuilderError.md).[`cause`](QueryBuilderError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`message`](../QueryBuilderError.md#message) +[`QueryBuilderError`](QueryBuilderError.md).[`message`](QueryBuilderError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`name`](../QueryBuilderError.md#name) +[`QueryBuilderError`](QueryBuilderError.md).[`name`](QueryBuilderError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`stack`](../QueryBuilderError.md#stack) +[`QueryBuilderError`](QueryBuilderError.md).[`stack`](QueryBuilderError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`stackTraceLimit`](../QueryBuilderError.md#stacktracelimit) +[`QueryBuilderError`](QueryBuilderError.md).[`stackTraceLimit`](QueryBuilderError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`captureStackTrace`](../QueryBuilderError.md#capturestacktrace) +[`QueryBuilderError`](QueryBuilderError.md).[`captureStackTrace`](QueryBuilderError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`prepareStackTrace`](../QueryBuilderError.md#preparestacktrace) +[`QueryBuilderError`](QueryBuilderError.md).[`prepareStackTrace`](QueryBuilderError.md#preparestacktrace) diff --git a/docs/reference/classes/QueryBuilderError.md b/docs/reference/classes/QueryBuilderError.md index 83c0a2bcc..9298c9ad7 100644 --- a/docs/reference/classes/QueryBuilderError.md +++ b/docs/reference/classes/QueryBuilderError.md @@ -5,20 +5,20 @@ title: QueryBuilderError # Class: QueryBuilderError -Defined in: [packages/db/src/errors.ts:336](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L336) +Defined in: [packages/db/src/errors.ts:345](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L345) ## Extends -- [`TanStackDBError`](../TanStackDBError.md) +- [`TanStackDBError`](TanStackDBError.md) ## Extended by -- [`OnlyOneSourceAllowedError`](../OnlyOneSourceAllowedError.md) -- [`SubQueryMustHaveFromClauseError`](../SubQueryMustHaveFromClauseError.md) -- [`InvalidSourceError`](../InvalidSourceError.md) -- [`InvalidSourceTypeError`](../InvalidSourceTypeError.md) -- [`JoinConditionMustBeEqualityError`](../JoinConditionMustBeEqualityError.md) -- [`QueryMustHaveFromClauseError`](../QueryMustHaveFromClauseError.md) +- [`OnlyOneSourceAllowedError`](OnlyOneSourceAllowedError.md) +- [`SubQueryMustHaveFromClauseError`](SubQueryMustHaveFromClauseError.md) +- [`InvalidSourceError`](InvalidSourceError.md) +- [`InvalidSourceTypeError`](InvalidSourceTypeError.md) +- [`JoinConditionMustBeEqualityError`](JoinConditionMustBeEqualityError.md) +- [`QueryMustHaveFromClauseError`](QueryMustHaveFromClauseError.md) ## Constructors @@ -28,7 +28,7 @@ Defined in: [packages/db/src/errors.ts:336](https://github.com/TanStack/db/blob/ new QueryBuilderError(message): QueryBuilderError; ``` -Defined in: [packages/db/src/errors.ts:337](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L337) +Defined in: [packages/db/src/errors.ts:346](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L346) #### Parameters @@ -42,7 +42,7 @@ Defined in: [packages/db/src/errors.ts:337](https://github.com/TanStack/db/blob/ #### Overrides -[`TanStackDBError`](../TanStackDBError.md).[`constructor`](../TanStackDBError.md#constructor) +[`TanStackDBError`](TanStackDBError.md).[`constructor`](TanStackDBError.md#constructor) ## Properties @@ -56,7 +56,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`cause`](../TanStackDBError.md#cause) +[`TanStackDBError`](TanStackDBError.md).[`cause`](TanStackDBError.md#cause) *** @@ -70,7 +70,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`message`](../TanStackDBError.md#message) +[`TanStackDBError`](TanStackDBError.md).[`message`](TanStackDBError.md#message) *** @@ -84,7 +84,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`name`](../TanStackDBError.md#name) +[`TanStackDBError`](TanStackDBError.md).[`name`](TanStackDBError.md#name) *** @@ -98,7 +98,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stack`](../TanStackDBError.md#stack) +[`TanStackDBError`](TanStackDBError.md).[`stack`](TanStackDBError.md#stack) *** @@ -122,7 +122,7 @@ not capture any frames. #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stackTraceLimit`](../TanStackDBError.md#stacktracelimit) +[`TanStackDBError`](TanStackDBError.md).[`stackTraceLimit`](TanStackDBError.md#stacktracelimit) ## Methods @@ -194,7 +194,7 @@ a(); #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`captureStackTrace`](../TanStackDBError.md#capturestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`captureStackTrace`](TanStackDBError.md#capturestacktrace) *** @@ -226,4 +226,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`prepareStackTrace`](../TanStackDBError.md#preparestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`prepareStackTrace`](TanStackDBError.md#preparestacktrace) diff --git a/docs/reference/classes/QueryCompilationError.md b/docs/reference/classes/QueryCompilationError.md index 7628112a7..554bf1ad0 100644 --- a/docs/reference/classes/QueryCompilationError.md +++ b/docs/reference/classes/QueryCompilationError.md @@ -5,28 +5,28 @@ title: QueryCompilationError # Class: QueryCompilationError -Defined in: [packages/db/src/errors.ts:385](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L385) +Defined in: [packages/db/src/errors.ts:394](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L394) ## Extends -- [`TanStackDBError`](../TanStackDBError.md) +- [`TanStackDBError`](TanStackDBError.md) ## Extended by -- [`DistinctRequiresSelectError`](../DistinctRequiresSelectError.md) -- [`HavingRequiresGroupByError`](../HavingRequiresGroupByError.md) -- [`LimitOffsetRequireOrderByError`](../LimitOffsetRequireOrderByError.md) -- [`CollectionInputNotFoundError`](../CollectionInputNotFoundError.md) -- [`DuplicateAliasInSubqueryError`](../DuplicateAliasInSubqueryError.md) -- [`UnsupportedFromTypeError`](../UnsupportedFromTypeError.md) -- [`UnknownExpressionTypeError`](../UnknownExpressionTypeError.md) -- [`EmptyReferencePathError`](../EmptyReferencePathError.md) -- [`UnknownFunctionError`](../UnknownFunctionError.md) -- [`JoinCollectionNotFoundError`](../JoinCollectionNotFoundError.md) -- [`SubscriptionNotFoundError`](../SubscriptionNotFoundError.md) -- [`AggregateNotSupportedError`](../AggregateNotSupportedError.md) -- [`MissingAliasInputsError`](../MissingAliasInputsError.md) -- [`SetWindowRequiresOrderByError`](../SetWindowRequiresOrderByError.md) +- [`DistinctRequiresSelectError`](DistinctRequiresSelectError.md) +- [`HavingRequiresGroupByError`](HavingRequiresGroupByError.md) +- [`LimitOffsetRequireOrderByError`](LimitOffsetRequireOrderByError.md) +- [`CollectionInputNotFoundError`](CollectionInputNotFoundError.md) +- [`DuplicateAliasInSubqueryError`](DuplicateAliasInSubqueryError.md) +- [`UnsupportedFromTypeError`](UnsupportedFromTypeError.md) +- [`UnknownExpressionTypeError`](UnknownExpressionTypeError.md) +- [`EmptyReferencePathError`](EmptyReferencePathError.md) +- [`UnknownFunctionError`](UnknownFunctionError.md) +- [`JoinCollectionNotFoundError`](JoinCollectionNotFoundError.md) +- [`SubscriptionNotFoundError`](SubscriptionNotFoundError.md) +- [`AggregateNotSupportedError`](AggregateNotSupportedError.md) +- [`MissingAliasInputsError`](MissingAliasInputsError.md) +- [`SetWindowRequiresOrderByError`](SetWindowRequiresOrderByError.md) ## Constructors @@ -36,7 +36,7 @@ Defined in: [packages/db/src/errors.ts:385](https://github.com/TanStack/db/blob/ new QueryCompilationError(message): QueryCompilationError; ``` -Defined in: [packages/db/src/errors.ts:386](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L386) +Defined in: [packages/db/src/errors.ts:395](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L395) #### Parameters @@ -50,7 +50,7 @@ Defined in: [packages/db/src/errors.ts:386](https://github.com/TanStack/db/blob/ #### Overrides -[`TanStackDBError`](../TanStackDBError.md).[`constructor`](../TanStackDBError.md#constructor) +[`TanStackDBError`](TanStackDBError.md).[`constructor`](TanStackDBError.md#constructor) ## Properties @@ -64,7 +64,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`cause`](../TanStackDBError.md#cause) +[`TanStackDBError`](TanStackDBError.md).[`cause`](TanStackDBError.md#cause) *** @@ -78,7 +78,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`message`](../TanStackDBError.md#message) +[`TanStackDBError`](TanStackDBError.md).[`message`](TanStackDBError.md#message) *** @@ -92,7 +92,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`name`](../TanStackDBError.md#name) +[`TanStackDBError`](TanStackDBError.md).[`name`](TanStackDBError.md#name) *** @@ -106,7 +106,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stack`](../TanStackDBError.md#stack) +[`TanStackDBError`](TanStackDBError.md).[`stack`](TanStackDBError.md#stack) *** @@ -130,7 +130,7 @@ not capture any frames. #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stackTraceLimit`](../TanStackDBError.md#stacktracelimit) +[`TanStackDBError`](TanStackDBError.md).[`stackTraceLimit`](TanStackDBError.md#stacktracelimit) ## Methods @@ -202,7 +202,7 @@ a(); #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`captureStackTrace`](../TanStackDBError.md#capturestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`captureStackTrace`](TanStackDBError.md#capturestacktrace) *** @@ -234,4 +234,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`prepareStackTrace`](../TanStackDBError.md#preparestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`prepareStackTrace`](TanStackDBError.md#preparestacktrace) diff --git a/docs/reference/classes/QueryMustHaveFromClauseError.md b/docs/reference/classes/QueryMustHaveFromClauseError.md index 07b085bc2..2c1614f3a 100644 --- a/docs/reference/classes/QueryMustHaveFromClauseError.md +++ b/docs/reference/classes/QueryMustHaveFromClauseError.md @@ -5,11 +5,11 @@ title: QueryMustHaveFromClauseError # Class: QueryMustHaveFromClauseError -Defined in: [packages/db/src/errors.ts:378](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L378) +Defined in: [packages/db/src/errors.ts:387](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L387) ## Extends -- [`QueryBuilderError`](../QueryBuilderError.md) +- [`QueryBuilderError`](QueryBuilderError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:378](https://github.com/TanStack/db/blob/ new QueryMustHaveFromClauseError(): QueryMustHaveFromClauseError; ``` -Defined in: [packages/db/src/errors.ts:379](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L379) +Defined in: [packages/db/src/errors.ts:388](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L388) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:379](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryBuilderError`](../QueryBuilderError.md).[`constructor`](../QueryBuilderError.md#constructor) +[`QueryBuilderError`](QueryBuilderError.md).[`constructor`](QueryBuilderError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`cause`](../QueryBuilderError.md#cause) +[`QueryBuilderError`](QueryBuilderError.md).[`cause`](QueryBuilderError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`message`](../QueryBuilderError.md#message) +[`QueryBuilderError`](QueryBuilderError.md).[`message`](QueryBuilderError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`name`](../QueryBuilderError.md#name) +[`QueryBuilderError`](QueryBuilderError.md).[`name`](QueryBuilderError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`stack`](../QueryBuilderError.md#stack) +[`QueryBuilderError`](QueryBuilderError.md).[`stack`](QueryBuilderError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`stackTraceLimit`](../QueryBuilderError.md#stacktracelimit) +[`QueryBuilderError`](QueryBuilderError.md).[`stackTraceLimit`](QueryBuilderError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`captureStackTrace`](../QueryBuilderError.md#capturestacktrace) +[`QueryBuilderError`](QueryBuilderError.md).[`captureStackTrace`](QueryBuilderError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`prepareStackTrace`](../QueryBuilderError.md#preparestacktrace) +[`QueryBuilderError`](QueryBuilderError.md).[`prepareStackTrace`](QueryBuilderError.md#preparestacktrace) diff --git a/docs/reference/classes/QueryOptimizerError.md b/docs/reference/classes/QueryOptimizerError.md index 310a308e3..5921d72f0 100644 --- a/docs/reference/classes/QueryOptimizerError.md +++ b/docs/reference/classes/QueryOptimizerError.md @@ -5,16 +5,16 @@ title: QueryOptimizerError # Class: QueryOptimizerError -Defined in: [packages/db/src/errors.ts:628](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L628) +Defined in: [packages/db/src/errors.ts:637](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L637) ## Extends -- [`TanStackDBError`](../TanStackDBError.md) +- [`TanStackDBError`](TanStackDBError.md) ## Extended by -- [`CannotCombineEmptyExpressionListError`](../CannotCombineEmptyExpressionListError.md) -- [`WhereClauseConversionError`](../WhereClauseConversionError.md) +- [`CannotCombineEmptyExpressionListError`](CannotCombineEmptyExpressionListError.md) +- [`WhereClauseConversionError`](WhereClauseConversionError.md) ## Constructors @@ -24,7 +24,7 @@ Defined in: [packages/db/src/errors.ts:628](https://github.com/TanStack/db/blob/ new QueryOptimizerError(message): QueryOptimizerError; ``` -Defined in: [packages/db/src/errors.ts:629](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L629) +Defined in: [packages/db/src/errors.ts:638](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L638) #### Parameters @@ -38,7 +38,7 @@ Defined in: [packages/db/src/errors.ts:629](https://github.com/TanStack/db/blob/ #### Overrides -[`TanStackDBError`](../TanStackDBError.md).[`constructor`](../TanStackDBError.md#constructor) +[`TanStackDBError`](TanStackDBError.md).[`constructor`](TanStackDBError.md#constructor) ## Properties @@ -52,7 +52,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`cause`](../TanStackDBError.md#cause) +[`TanStackDBError`](TanStackDBError.md).[`cause`](TanStackDBError.md#cause) *** @@ -66,7 +66,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`message`](../TanStackDBError.md#message) +[`TanStackDBError`](TanStackDBError.md).[`message`](TanStackDBError.md#message) *** @@ -80,7 +80,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`name`](../TanStackDBError.md#name) +[`TanStackDBError`](TanStackDBError.md).[`name`](TanStackDBError.md#name) *** @@ -94,7 +94,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stack`](../TanStackDBError.md#stack) +[`TanStackDBError`](TanStackDBError.md).[`stack`](TanStackDBError.md#stack) *** @@ -118,7 +118,7 @@ not capture any frames. #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stackTraceLimit`](../TanStackDBError.md#stacktracelimit) +[`TanStackDBError`](TanStackDBError.md).[`stackTraceLimit`](TanStackDBError.md#stacktracelimit) ## Methods @@ -190,7 +190,7 @@ a(); #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`captureStackTrace`](../TanStackDBError.md#capturestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`captureStackTrace`](TanStackDBError.md#capturestacktrace) *** @@ -222,4 +222,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`prepareStackTrace`](../TanStackDBError.md#preparestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`prepareStackTrace`](TanStackDBError.md#preparestacktrace) diff --git a/docs/reference/classes/SchemaMustBeSynchronousError.md b/docs/reference/classes/SchemaMustBeSynchronousError.md index 85d06e5fa..875b79afd 100644 --- a/docs/reference/classes/SchemaMustBeSynchronousError.md +++ b/docs/reference/classes/SchemaMustBeSynchronousError.md @@ -9,7 +9,7 @@ Defined in: [packages/db/src/errors.ts:96](https://github.com/TanStack/db/blob/m ## Extends -- [`CollectionConfigurationError`](../CollectionConfigurationError.md) +- [`CollectionConfigurationError`](CollectionConfigurationError.md) ## Constructors @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:97](https://github.com/TanStack/db/blob/m #### Overrides -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`constructor`](../CollectionConfigurationError.md#constructor) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`constructor`](CollectionConfigurationError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`cause`](../CollectionConfigurationError.md#cause) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`cause`](CollectionConfigurationError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`message`](../CollectionConfigurationError.md#message) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`message`](CollectionConfigurationError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`name`](../CollectionConfigurationError.md#name) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`name`](CollectionConfigurationError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`stack`](../CollectionConfigurationError.md#stack) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`stack`](CollectionConfigurationError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`stackTraceLimit`](../CollectionConfigurationError.md#stacktracelimit) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`stackTraceLimit`](CollectionConfigurationError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`captureStackTrace`](../CollectionConfigurationError.md#capturestacktrace) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`captureStackTrace`](CollectionConfigurationError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`CollectionConfigurationError`](../CollectionConfigurationError.md).[`prepareStackTrace`](../CollectionConfigurationError.md#preparestacktrace) +[`CollectionConfigurationError`](CollectionConfigurationError.md).[`prepareStackTrace`](CollectionConfigurationError.md#preparestacktrace) diff --git a/docs/reference/classes/SchemaValidationError.md b/docs/reference/classes/SchemaValidationError.md index fecd17ffa..8c7f1d436 100644 --- a/docs/reference/classes/SchemaValidationError.md +++ b/docs/reference/classes/SchemaValidationError.md @@ -9,7 +9,7 @@ Defined in: [packages/db/src/errors.ts:18](https://github.com/TanStack/db/blob/m ## Extends -- [`TanStackDBError`](../TanStackDBError.md) +- [`TanStackDBError`](TanStackDBError.md) ## Constructors @@ -44,7 +44,7 @@ readonly `object`[] #### Overrides -[`TanStackDBError`](../TanStackDBError.md).[`constructor`](../TanStackDBError.md#constructor) +[`TanStackDBError`](TanStackDBError.md).[`constructor`](TanStackDBError.md#constructor) ## Properties @@ -58,7 +58,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`cause`](../TanStackDBError.md#cause) +[`TanStackDBError`](TanStackDBError.md).[`cause`](TanStackDBError.md#cause) *** @@ -82,7 +82,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`message`](../TanStackDBError.md#message) +[`TanStackDBError`](TanStackDBError.md).[`message`](TanStackDBError.md#message) *** @@ -96,7 +96,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`name`](../TanStackDBError.md#name) +[`TanStackDBError`](TanStackDBError.md).[`name`](TanStackDBError.md#name) *** @@ -110,7 +110,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stack`](../TanStackDBError.md#stack) +[`TanStackDBError`](TanStackDBError.md).[`stack`](TanStackDBError.md#stack) *** @@ -144,7 +144,7 @@ not capture any frames. #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stackTraceLimit`](../TanStackDBError.md#stacktracelimit) +[`TanStackDBError`](TanStackDBError.md).[`stackTraceLimit`](TanStackDBError.md#stacktracelimit) ## Methods @@ -216,7 +216,7 @@ a(); #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`captureStackTrace`](../TanStackDBError.md#capturestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`captureStackTrace`](TanStackDBError.md#capturestacktrace) *** @@ -248,4 +248,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`prepareStackTrace`](../TanStackDBError.md#preparestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`prepareStackTrace`](TanStackDBError.md#preparestacktrace) diff --git a/docs/reference/classes/SerializationError.md b/docs/reference/classes/SerializationError.md index ba8d0cd59..68cb34f6d 100644 --- a/docs/reference/classes/SerializationError.md +++ b/docs/reference/classes/SerializationError.md @@ -5,11 +5,11 @@ title: SerializationError # Class: SerializationError -Defined in: [packages/db/src/errors.ts:578](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L578) +Defined in: [packages/db/src/errors.ts:587](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L587) ## Extends -- [`StorageError`](../StorageError.md) +- [`StorageError`](StorageError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:578](https://github.com/TanStack/db/blob/ new SerializationError(operation, originalError): SerializationError; ``` -Defined in: [packages/db/src/errors.ts:579](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L579) +Defined in: [packages/db/src/errors.ts:588](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L588) #### Parameters @@ -37,7 +37,7 @@ Defined in: [packages/db/src/errors.ts:579](https://github.com/TanStack/db/blob/ #### Overrides -[`StorageError`](../StorageError.md).[`constructor`](../StorageError.md#constructor) +[`StorageError`](StorageError.md).[`constructor`](StorageError.md#constructor) ## Properties @@ -51,7 +51,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`StorageError`](../StorageError.md).[`cause`](../StorageError.md#cause) +[`StorageError`](StorageError.md).[`cause`](StorageError.md#cause) *** @@ -65,7 +65,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`StorageError`](../StorageError.md).[`message`](../StorageError.md#message) +[`StorageError`](StorageError.md).[`message`](StorageError.md#message) *** @@ -79,7 +79,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`StorageError`](../StorageError.md).[`name`](../StorageError.md#name) +[`StorageError`](StorageError.md).[`name`](StorageError.md#name) *** @@ -93,7 +93,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`StorageError`](../StorageError.md).[`stack`](../StorageError.md#stack) +[`StorageError`](StorageError.md).[`stack`](StorageError.md#stack) *** @@ -117,7 +117,7 @@ not capture any frames. #### Inherited from -[`StorageError`](../StorageError.md).[`stackTraceLimit`](../StorageError.md#stacktracelimit) +[`StorageError`](StorageError.md).[`stackTraceLimit`](StorageError.md#stacktracelimit) ## Methods @@ -189,7 +189,7 @@ a(); #### Inherited from -[`StorageError`](../StorageError.md).[`captureStackTrace`](../StorageError.md#capturestacktrace) +[`StorageError`](StorageError.md).[`captureStackTrace`](StorageError.md#capturestacktrace) *** @@ -221,4 +221,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`StorageError`](../StorageError.md).[`prepareStackTrace`](../StorageError.md#preparestacktrace) +[`StorageError`](StorageError.md).[`prepareStackTrace`](StorageError.md#preparestacktrace) diff --git a/docs/reference/classes/SetWindowRequiresOrderByError.md b/docs/reference/classes/SetWindowRequiresOrderByError.md index 68ae1e85e..4184822cf 100644 --- a/docs/reference/classes/SetWindowRequiresOrderByError.md +++ b/docs/reference/classes/SetWindowRequiresOrderByError.md @@ -5,13 +5,13 @@ title: SetWindowRequiresOrderByError # Class: SetWindowRequiresOrderByError -Defined in: [packages/db/src/errors.ts:696](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L696) +Defined in: [packages/db/src/errors.ts:705](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L705) Error thrown when setWindow is called on a collection without an ORDER BY clause. ## Extends -- [`QueryCompilationError`](../QueryCompilationError.md) +- [`QueryCompilationError`](QueryCompilationError.md) ## Constructors @@ -21,7 +21,7 @@ Error thrown when setWindow is called on a collection without an ORDER BY clause new SetWindowRequiresOrderByError(): SetWindowRequiresOrderByError; ``` -Defined in: [packages/db/src/errors.ts:697](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L697) +Defined in: [packages/db/src/errors.ts:706](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L706) #### Returns @@ -29,7 +29,7 @@ Defined in: [packages/db/src/errors.ts:697](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryCompilationError`](../QueryCompilationError.md).[`constructor`](../QueryCompilationError.md#constructor) +[`QueryCompilationError`](QueryCompilationError.md).[`constructor`](QueryCompilationError.md#constructor) ## Properties @@ -43,7 +43,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`cause`](../QueryCompilationError.md#cause) +[`QueryCompilationError`](QueryCompilationError.md).[`cause`](QueryCompilationError.md#cause) *** @@ -57,7 +57,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`message`](../QueryCompilationError.md#message) +[`QueryCompilationError`](QueryCompilationError.md).[`message`](QueryCompilationError.md#message) *** @@ -71,7 +71,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`name`](../QueryCompilationError.md#name) +[`QueryCompilationError`](QueryCompilationError.md).[`name`](QueryCompilationError.md#name) *** @@ -85,7 +85,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stack`](../QueryCompilationError.md#stack) +[`QueryCompilationError`](QueryCompilationError.md).[`stack`](QueryCompilationError.md#stack) *** @@ -109,7 +109,7 @@ not capture any frames. #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stackTraceLimit`](../QueryCompilationError.md#stacktracelimit) +[`QueryCompilationError`](QueryCompilationError.md).[`stackTraceLimit`](QueryCompilationError.md#stacktracelimit) ## Methods @@ -181,7 +181,7 @@ a(); #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`captureStackTrace`](../QueryCompilationError.md#capturestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`captureStackTrace`](QueryCompilationError.md#capturestacktrace) *** @@ -213,4 +213,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`prepareStackTrace`](../QueryCompilationError.md#preparestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`prepareStackTrace`](QueryCompilationError.md#preparestacktrace) diff --git a/docs/reference/classes/SortedMap.md b/docs/reference/classes/SortedMap.md index 9b81f77cf..b61e5adcb 100644 --- a/docs/reference/classes/SortedMap.md +++ b/docs/reference/classes/SortedMap.md @@ -5,7 +5,7 @@ title: SortedMap # Class: SortedMap\ -Defined in: [packages/db/src/SortedMap.ts:6](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L6) +Defined in: [packages/db/src/SortedMap.ts:8](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L8) A Map implementation that keeps its entries sorted based on a comparator function @@ -13,9 +13,9 @@ A Map implementation that keeps its entries sorted based on a comparator functio ### TKey -`TKey` +`TKey` *extends* `string` \| `number` -The type of keys in the map +The type of keys in the map (must be string | number) ### TValue @@ -31,7 +31,7 @@ The type of values in the map new SortedMap(comparator?): SortedMap; ``` -Defined in: [packages/db/src/SortedMap.ts:16](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L16) +Defined in: [packages/db/src/SortedMap.ts:19](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L19) Creates a new SortedMap instance @@ -41,7 +41,8 @@ Creates a new SortedMap instance (`a`, `b`) => `number` -Optional function to compare values for sorting +Optional function to compare values for sorting. + If not provided, entries are sorted by key only. #### Returns @@ -57,7 +58,7 @@ Optional function to compare values for sorting get size(): number; ``` -Defined in: [packages/db/src/SortedMap.ts:138](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L138) +Defined in: [packages/db/src/SortedMap.ts:157](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L157) Gets the number of key-value pairs in the map @@ -73,7 +74,7 @@ Gets the number of key-value pairs in the map iterator: IterableIterator<[TKey, TValue]>; ``` -Defined in: [packages/db/src/SortedMap.ts:147](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L147) +Defined in: [packages/db/src/SortedMap.ts:166](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L166) Default iterator that returns entries in sorted order @@ -91,7 +92,7 @@ An iterator for the map's entries clear(): void; ``` -Defined in: [packages/db/src/SortedMap.ts:130](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L130) +Defined in: [packages/db/src/SortedMap.ts:149](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L149) Removes all key-value pairs from the map @@ -107,7 +108,7 @@ Removes all key-value pairs from the map delete(key): boolean; ``` -Defined in: [packages/db/src/SortedMap.ts:106](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L106) +Defined in: [packages/db/src/SortedMap.ts:125](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L125) Removes a key-value pair from the map @@ -133,7 +134,7 @@ True if the key was found and removed, false otherwise entries(): IterableIterator<[TKey, TValue]>; ``` -Defined in: [packages/db/src/SortedMap.ts:158](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L158) +Defined in: [packages/db/src/SortedMap.ts:177](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L177) Returns an iterator for the map's entries in sorted order @@ -151,7 +152,7 @@ An iterator for the map's entries forEach(callbackfn): void; ``` -Defined in: [packages/db/src/SortedMap.ts:189](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L189) +Defined in: [packages/db/src/SortedMap.ts:208](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L208) Executes a callback function for each key-value pair in the map in sorted order @@ -175,7 +176,7 @@ Function to execute for each entry get(key): TValue | undefined; ``` -Defined in: [packages/db/src/SortedMap.ts:96](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L96) +Defined in: [packages/db/src/SortedMap.ts:115](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L115) Gets a value by its key @@ -201,7 +202,7 @@ The value associated with the key, or undefined if not found has(key): boolean; ``` -Defined in: [packages/db/src/SortedMap.ts:123](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L123) +Defined in: [packages/db/src/SortedMap.ts:142](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L142) Checks if a key exists in the map @@ -227,7 +228,7 @@ True if the key exists, false otherwise keys(): IterableIterator; ``` -Defined in: [packages/db/src/SortedMap.ts:167](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L167) +Defined in: [packages/db/src/SortedMap.ts:186](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L186) Returns an iterator for the map's keys in sorted order @@ -245,7 +246,7 @@ An iterator for the map's keys set(key, value): this; ``` -Defined in: [packages/db/src/SortedMap.ts:73](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L73) +Defined in: [packages/db/src/SortedMap.ts:92](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L92) Sets a key-value pair in the map and maintains sort order @@ -277,7 +278,7 @@ This SortedMap instance for chaining values(): IterableIterator; ``` -Defined in: [packages/db/src/SortedMap.ts:176](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L176) +Defined in: [packages/db/src/SortedMap.ts:195](https://github.com/TanStack/db/blob/main/packages/db/src/SortedMap.ts#L195) Returns an iterator for the map's values in sorted order diff --git a/docs/reference/classes/StorageError.md b/docs/reference/classes/StorageError.md index d8c4fc35b..9cc3dedd8 100644 --- a/docs/reference/classes/StorageError.md +++ b/docs/reference/classes/StorageError.md @@ -5,16 +5,16 @@ title: StorageError # Class: StorageError -Defined in: [packages/db/src/errors.ts:571](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L571) +Defined in: [packages/db/src/errors.ts:580](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L580) ## Extends -- [`TanStackDBError`](../TanStackDBError.md) +- [`TanStackDBError`](TanStackDBError.md) ## Extended by -- [`SerializationError`](../SerializationError.md) -- [`LocalStorageCollectionError`](../LocalStorageCollectionError.md) +- [`SerializationError`](SerializationError.md) +- [`LocalStorageCollectionError`](LocalStorageCollectionError.md) ## Constructors @@ -24,7 +24,7 @@ Defined in: [packages/db/src/errors.ts:571](https://github.com/TanStack/db/blob/ new StorageError(message): StorageError; ``` -Defined in: [packages/db/src/errors.ts:572](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L572) +Defined in: [packages/db/src/errors.ts:581](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L581) #### Parameters @@ -38,7 +38,7 @@ Defined in: [packages/db/src/errors.ts:572](https://github.com/TanStack/db/blob/ #### Overrides -[`TanStackDBError`](../TanStackDBError.md).[`constructor`](../TanStackDBError.md#constructor) +[`TanStackDBError`](TanStackDBError.md).[`constructor`](TanStackDBError.md#constructor) ## Properties @@ -52,7 +52,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`cause`](../TanStackDBError.md#cause) +[`TanStackDBError`](TanStackDBError.md).[`cause`](TanStackDBError.md#cause) *** @@ -66,7 +66,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`message`](../TanStackDBError.md#message) +[`TanStackDBError`](TanStackDBError.md).[`message`](TanStackDBError.md#message) *** @@ -80,7 +80,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`name`](../TanStackDBError.md#name) +[`TanStackDBError`](TanStackDBError.md).[`name`](TanStackDBError.md#name) *** @@ -94,7 +94,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stack`](../TanStackDBError.md#stack) +[`TanStackDBError`](TanStackDBError.md).[`stack`](TanStackDBError.md#stack) *** @@ -118,7 +118,7 @@ not capture any frames. #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stackTraceLimit`](../TanStackDBError.md#stacktracelimit) +[`TanStackDBError`](TanStackDBError.md).[`stackTraceLimit`](TanStackDBError.md#stacktracelimit) ## Methods @@ -190,7 +190,7 @@ a(); #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`captureStackTrace`](../TanStackDBError.md#capturestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`captureStackTrace`](TanStackDBError.md#capturestacktrace) *** @@ -222,4 +222,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`prepareStackTrace`](../TanStackDBError.md#preparestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`prepareStackTrace`](TanStackDBError.md#preparestacktrace) diff --git a/docs/reference/classes/StorageKeyRequiredError.md b/docs/reference/classes/StorageKeyRequiredError.md index ac825a752..14f3628f7 100644 --- a/docs/reference/classes/StorageKeyRequiredError.md +++ b/docs/reference/classes/StorageKeyRequiredError.md @@ -5,11 +5,11 @@ title: StorageKeyRequiredError # Class: StorageKeyRequiredError -Defined in: [packages/db/src/errors.ts:594](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L594) +Defined in: [packages/db/src/errors.ts:603](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L603) ## Extends -- [`LocalStorageCollectionError`](../LocalStorageCollectionError.md) +- [`LocalStorageCollectionError`](LocalStorageCollectionError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:594](https://github.com/TanStack/db/blob/ new StorageKeyRequiredError(): StorageKeyRequiredError; ``` -Defined in: [packages/db/src/errors.ts:595](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L595) +Defined in: [packages/db/src/errors.ts:604](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L604) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:595](https://github.com/TanStack/db/blob/ #### Overrides -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`constructor`](../LocalStorageCollectionError.md#constructor) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`constructor`](LocalStorageCollectionError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`cause`](../LocalStorageCollectionError.md#cause) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`cause`](LocalStorageCollectionError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`message`](../LocalStorageCollectionError.md#message) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`message`](LocalStorageCollectionError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`name`](../LocalStorageCollectionError.md#name) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`name`](LocalStorageCollectionError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`stack`](../LocalStorageCollectionError.md#stack) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`stack`](LocalStorageCollectionError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`stackTraceLimit`](../LocalStorageCollectionError.md#stacktracelimit) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`stackTraceLimit`](LocalStorageCollectionError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`captureStackTrace`](../LocalStorageCollectionError.md#capturestacktrace) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`captureStackTrace`](LocalStorageCollectionError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`LocalStorageCollectionError`](../LocalStorageCollectionError.md).[`prepareStackTrace`](../LocalStorageCollectionError.md#preparestacktrace) +[`LocalStorageCollectionError`](LocalStorageCollectionError.md).[`prepareStackTrace`](LocalStorageCollectionError.md#preparestacktrace) diff --git a/docs/reference/classes/SubQueryMustHaveFromClauseError.md b/docs/reference/classes/SubQueryMustHaveFromClauseError.md index db02ceff9..f9425a733 100644 --- a/docs/reference/classes/SubQueryMustHaveFromClauseError.md +++ b/docs/reference/classes/SubQueryMustHaveFromClauseError.md @@ -5,11 +5,11 @@ title: SubQueryMustHaveFromClauseError # Class: SubQueryMustHaveFromClauseError -Defined in: [packages/db/src/errors.ts:349](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L349) +Defined in: [packages/db/src/errors.ts:358](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L358) ## Extends -- [`QueryBuilderError`](../QueryBuilderError.md) +- [`QueryBuilderError`](QueryBuilderError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:349](https://github.com/TanStack/db/blob/ new SubQueryMustHaveFromClauseError(context): SubQueryMustHaveFromClauseError; ``` -Defined in: [packages/db/src/errors.ts:350](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L350) +Defined in: [packages/db/src/errors.ts:359](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L359) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:350](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryBuilderError`](../QueryBuilderError.md).[`constructor`](../QueryBuilderError.md#constructor) +[`QueryBuilderError`](QueryBuilderError.md).[`constructor`](QueryBuilderError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`cause`](../QueryBuilderError.md#cause) +[`QueryBuilderError`](QueryBuilderError.md).[`cause`](QueryBuilderError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`message`](../QueryBuilderError.md#message) +[`QueryBuilderError`](QueryBuilderError.md).[`message`](QueryBuilderError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`name`](../QueryBuilderError.md#name) +[`QueryBuilderError`](QueryBuilderError.md).[`name`](QueryBuilderError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`stack`](../QueryBuilderError.md#stack) +[`QueryBuilderError`](QueryBuilderError.md).[`stack`](QueryBuilderError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`stackTraceLimit`](../QueryBuilderError.md#stacktracelimit) +[`QueryBuilderError`](QueryBuilderError.md).[`stackTraceLimit`](QueryBuilderError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`captureStackTrace`](../QueryBuilderError.md#capturestacktrace) +[`QueryBuilderError`](QueryBuilderError.md).[`captureStackTrace`](QueryBuilderError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryBuilderError`](../QueryBuilderError.md).[`prepareStackTrace`](../QueryBuilderError.md#preparestacktrace) +[`QueryBuilderError`](QueryBuilderError.md).[`prepareStackTrace`](QueryBuilderError.md#preparestacktrace) diff --git a/docs/reference/classes/SubscriptionNotFoundError.md b/docs/reference/classes/SubscriptionNotFoundError.md index a42d9079f..5fee01cd9 100644 --- a/docs/reference/classes/SubscriptionNotFoundError.md +++ b/docs/reference/classes/SubscriptionNotFoundError.md @@ -5,14 +5,14 @@ title: SubscriptionNotFoundError # Class: SubscriptionNotFoundError -Defined in: [packages/db/src/errors.ts:656](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L656) +Defined in: [packages/db/src/errors.ts:665](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L665) Error when a subscription cannot be found during lazy join processing. For subqueries, aliases may be remapped (e.g., 'activeUser' → 'user'). ## Extends -- [`QueryCompilationError`](../QueryCompilationError.md) +- [`QueryCompilationError`](QueryCompilationError.md) ## Constructors @@ -26,7 +26,7 @@ new SubscriptionNotFoundError( availableAliases): SubscriptionNotFoundError; ``` -Defined in: [packages/db/src/errors.ts:657](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L657) +Defined in: [packages/db/src/errors.ts:666](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L666) #### Parameters @@ -52,7 +52,7 @@ Defined in: [packages/db/src/errors.ts:657](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryCompilationError`](../QueryCompilationError.md).[`constructor`](../QueryCompilationError.md#constructor) +[`QueryCompilationError`](QueryCompilationError.md).[`constructor`](QueryCompilationError.md#constructor) ## Properties @@ -66,7 +66,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`cause`](../QueryCompilationError.md#cause) +[`QueryCompilationError`](QueryCompilationError.md).[`cause`](QueryCompilationError.md#cause) *** @@ -80,7 +80,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`message`](../QueryCompilationError.md#message) +[`QueryCompilationError`](QueryCompilationError.md).[`message`](QueryCompilationError.md#message) *** @@ -94,7 +94,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`name`](../QueryCompilationError.md#name) +[`QueryCompilationError`](QueryCompilationError.md).[`name`](QueryCompilationError.md#name) *** @@ -108,7 +108,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stack`](../QueryCompilationError.md#stack) +[`QueryCompilationError`](QueryCompilationError.md).[`stack`](QueryCompilationError.md#stack) *** @@ -132,7 +132,7 @@ not capture any frames. #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stackTraceLimit`](../QueryCompilationError.md#stacktracelimit) +[`QueryCompilationError`](QueryCompilationError.md).[`stackTraceLimit`](QueryCompilationError.md#stacktracelimit) ## Methods @@ -204,7 +204,7 @@ a(); #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`captureStackTrace`](../QueryCompilationError.md#capturestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`captureStackTrace`](QueryCompilationError.md#capturestacktrace) *** @@ -236,4 +236,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`prepareStackTrace`](../QueryCompilationError.md#preparestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`prepareStackTrace`](QueryCompilationError.md#preparestacktrace) diff --git a/docs/reference/classes/SyncCleanupError.md b/docs/reference/classes/SyncCleanupError.md index d8d7c3b7a..1a0d6fffd 100644 --- a/docs/reference/classes/SyncCleanupError.md +++ b/docs/reference/classes/SyncCleanupError.md @@ -5,11 +5,11 @@ title: SyncCleanupError # Class: SyncCleanupError -Defined in: [packages/db/src/errors.ts:617](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L617) +Defined in: [packages/db/src/errors.ts:626](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L626) ## Extends -- [`TanStackDBError`](../TanStackDBError.md) +- [`TanStackDBError`](TanStackDBError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:617](https://github.com/TanStack/db/blob/ new SyncCleanupError(collectionId, error): SyncCleanupError; ``` -Defined in: [packages/db/src/errors.ts:618](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L618) +Defined in: [packages/db/src/errors.ts:627](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L627) #### Parameters @@ -37,7 +37,7 @@ Defined in: [packages/db/src/errors.ts:618](https://github.com/TanStack/db/blob/ #### Overrides -[`TanStackDBError`](../TanStackDBError.md).[`constructor`](../TanStackDBError.md#constructor) +[`TanStackDBError`](TanStackDBError.md).[`constructor`](TanStackDBError.md#constructor) ## Properties @@ -51,7 +51,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`cause`](../TanStackDBError.md#cause) +[`TanStackDBError`](TanStackDBError.md).[`cause`](TanStackDBError.md#cause) *** @@ -65,7 +65,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`message`](../TanStackDBError.md#message) +[`TanStackDBError`](TanStackDBError.md).[`message`](TanStackDBError.md#message) *** @@ -79,7 +79,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`name`](../TanStackDBError.md#name) +[`TanStackDBError`](TanStackDBError.md).[`name`](TanStackDBError.md#name) *** @@ -93,7 +93,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stack`](../TanStackDBError.md#stack) +[`TanStackDBError`](TanStackDBError.md).[`stack`](TanStackDBError.md#stack) *** @@ -117,7 +117,7 @@ not capture any frames. #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stackTraceLimit`](../TanStackDBError.md#stacktracelimit) +[`TanStackDBError`](TanStackDBError.md).[`stackTraceLimit`](TanStackDBError.md#stacktracelimit) ## Methods @@ -189,7 +189,7 @@ a(); #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`captureStackTrace`](../TanStackDBError.md#capturestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`captureStackTrace`](TanStackDBError.md#capturestacktrace) *** @@ -221,4 +221,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`prepareStackTrace`](../TanStackDBError.md#preparestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`prepareStackTrace`](TanStackDBError.md#preparestacktrace) diff --git a/docs/reference/classes/SyncTransactionAlreadyCommittedError.md b/docs/reference/classes/SyncTransactionAlreadyCommittedError.md index 78daaf215..eccf52231 100644 --- a/docs/reference/classes/SyncTransactionAlreadyCommittedError.md +++ b/docs/reference/classes/SyncTransactionAlreadyCommittedError.md @@ -5,11 +5,11 @@ title: SyncTransactionAlreadyCommittedError # Class: SyncTransactionAlreadyCommittedError -Defined in: [packages/db/src/errors.ts:327](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L327) +Defined in: [packages/db/src/errors.ts:336](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L336) ## Extends -- [`TransactionError`](../TransactionError.md) +- [`TransactionError`](TransactionError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:327](https://github.com/TanStack/db/blob/ new SyncTransactionAlreadyCommittedError(): SyncTransactionAlreadyCommittedError; ``` -Defined in: [packages/db/src/errors.ts:328](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L328) +Defined in: [packages/db/src/errors.ts:337](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L337) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:328](https://github.com/TanStack/db/blob/ #### Overrides -[`TransactionError`](../TransactionError.md).[`constructor`](../TransactionError.md#constructor) +[`TransactionError`](TransactionError.md).[`constructor`](TransactionError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`cause`](../TransactionError.md#cause) +[`TransactionError`](TransactionError.md).[`cause`](TransactionError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`message`](../TransactionError.md#message) +[`TransactionError`](TransactionError.md).[`message`](TransactionError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`name`](../TransactionError.md#name) +[`TransactionError`](TransactionError.md).[`name`](TransactionError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`stack`](../TransactionError.md#stack) +[`TransactionError`](TransactionError.md).[`stack`](TransactionError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`TransactionError`](../TransactionError.md).[`stackTraceLimit`](../TransactionError.md#stacktracelimit) +[`TransactionError`](TransactionError.md).[`stackTraceLimit`](TransactionError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`TransactionError`](../TransactionError.md).[`captureStackTrace`](../TransactionError.md#capturestacktrace) +[`TransactionError`](TransactionError.md).[`captureStackTrace`](TransactionError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TransactionError`](../TransactionError.md).[`prepareStackTrace`](../TransactionError.md#preparestacktrace) +[`TransactionError`](TransactionError.md).[`prepareStackTrace`](TransactionError.md#preparestacktrace) diff --git a/docs/reference/classes/SyncTransactionAlreadyCommittedWriteError.md b/docs/reference/classes/SyncTransactionAlreadyCommittedWriteError.md index 1fa89e16b..d0b28cccc 100644 --- a/docs/reference/classes/SyncTransactionAlreadyCommittedWriteError.md +++ b/docs/reference/classes/SyncTransactionAlreadyCommittedWriteError.md @@ -5,11 +5,11 @@ title: SyncTransactionAlreadyCommittedWriteError # Class: SyncTransactionAlreadyCommittedWriteError -Defined in: [packages/db/src/errors.ts:313](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L313) +Defined in: [packages/db/src/errors.ts:322](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L322) ## Extends -- [`TransactionError`](../TransactionError.md) +- [`TransactionError`](TransactionError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:313](https://github.com/TanStack/db/blob/ new SyncTransactionAlreadyCommittedWriteError(): SyncTransactionAlreadyCommittedWriteError; ``` -Defined in: [packages/db/src/errors.ts:314](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L314) +Defined in: [packages/db/src/errors.ts:323](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L323) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:314](https://github.com/TanStack/db/blob/ #### Overrides -[`TransactionError`](../TransactionError.md).[`constructor`](../TransactionError.md#constructor) +[`TransactionError`](TransactionError.md).[`constructor`](TransactionError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`cause`](../TransactionError.md#cause) +[`TransactionError`](TransactionError.md).[`cause`](TransactionError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`message`](../TransactionError.md#message) +[`TransactionError`](TransactionError.md).[`message`](TransactionError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`name`](../TransactionError.md#name) +[`TransactionError`](TransactionError.md).[`name`](TransactionError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`stack`](../TransactionError.md#stack) +[`TransactionError`](TransactionError.md).[`stack`](TransactionError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`TransactionError`](../TransactionError.md).[`stackTraceLimit`](../TransactionError.md#stacktracelimit) +[`TransactionError`](TransactionError.md).[`stackTraceLimit`](TransactionError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`TransactionError`](../TransactionError.md).[`captureStackTrace`](../TransactionError.md#capturestacktrace) +[`TransactionError`](TransactionError.md).[`captureStackTrace`](TransactionError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TransactionError`](../TransactionError.md).[`prepareStackTrace`](../TransactionError.md#preparestacktrace) +[`TransactionError`](TransactionError.md).[`prepareStackTrace`](TransactionError.md#preparestacktrace) diff --git a/docs/reference/classes/TanStackDBError.md b/docs/reference/classes/TanStackDBError.md index dabc7ccbd..f0566cbf1 100644 --- a/docs/reference/classes/TanStackDBError.md +++ b/docs/reference/classes/TanStackDBError.md @@ -13,21 +13,21 @@ Defined in: [packages/db/src/errors.ts:2](https://github.com/TanStack/db/blob/ma ## Extended by -- [`NonRetriableError`](../NonRetriableError.md) -- [`SchemaValidationError`](../SchemaValidationError.md) -- [`DuplicateDbInstanceError`](../DuplicateDbInstanceError.md) -- [`CollectionConfigurationError`](../CollectionConfigurationError.md) -- [`CollectionStateError`](../CollectionStateError.md) -- [`CollectionOperationError`](../CollectionOperationError.md) -- [`MissingHandlerError`](../MissingHandlerError.md) -- [`TransactionError`](../TransactionError.md) -- [`QueryBuilderError`](../QueryBuilderError.md) -- [`QueryCompilationError`](../QueryCompilationError.md) -- [`JoinError`](../JoinError.md) -- [`GroupByError`](../GroupByError.md) -- [`StorageError`](../StorageError.md) -- [`SyncCleanupError`](../SyncCleanupError.md) -- [`QueryOptimizerError`](../QueryOptimizerError.md) +- [`NonRetriableError`](NonRetriableError.md) +- [`SchemaValidationError`](SchemaValidationError.md) +- [`DuplicateDbInstanceError`](DuplicateDbInstanceError.md) +- [`CollectionConfigurationError`](CollectionConfigurationError.md) +- [`CollectionStateError`](CollectionStateError.md) +- [`CollectionOperationError`](CollectionOperationError.md) +- [`MissingHandlerError`](MissingHandlerError.md) +- [`TransactionError`](TransactionError.md) +- [`QueryBuilderError`](QueryBuilderError.md) +- [`QueryCompilationError`](QueryCompilationError.md) +- [`JoinError`](JoinError.md) +- [`GroupByError`](GroupByError.md) +- [`StorageError`](StorageError.md) +- [`SyncCleanupError`](SyncCleanupError.md) +- [`QueryOptimizerError`](QueryOptimizerError.md) ## Constructors diff --git a/docs/reference/classes/TransactionAlreadyCompletedRollbackError.md b/docs/reference/classes/TransactionAlreadyCompletedRollbackError.md index 6469f7f0c..2dbfcd439 100644 --- a/docs/reference/classes/TransactionAlreadyCompletedRollbackError.md +++ b/docs/reference/classes/TransactionAlreadyCompletedRollbackError.md @@ -5,11 +5,11 @@ title: TransactionAlreadyCompletedRollbackError # Class: TransactionAlreadyCompletedRollbackError -Defined in: [packages/db/src/errors.ts:291](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L291) +Defined in: [packages/db/src/errors.ts:300](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L300) ## Extends -- [`TransactionError`](../TransactionError.md) +- [`TransactionError`](TransactionError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:291](https://github.com/TanStack/db/blob/ new TransactionAlreadyCompletedRollbackError(): TransactionAlreadyCompletedRollbackError; ``` -Defined in: [packages/db/src/errors.ts:292](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L292) +Defined in: [packages/db/src/errors.ts:301](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L301) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:292](https://github.com/TanStack/db/blob/ #### Overrides -[`TransactionError`](../TransactionError.md).[`constructor`](../TransactionError.md#constructor) +[`TransactionError`](TransactionError.md).[`constructor`](TransactionError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`cause`](../TransactionError.md#cause) +[`TransactionError`](TransactionError.md).[`cause`](TransactionError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`message`](../TransactionError.md#message) +[`TransactionError`](TransactionError.md).[`message`](TransactionError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`name`](../TransactionError.md#name) +[`TransactionError`](TransactionError.md).[`name`](TransactionError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`stack`](../TransactionError.md#stack) +[`TransactionError`](TransactionError.md).[`stack`](TransactionError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`TransactionError`](../TransactionError.md).[`stackTraceLimit`](../TransactionError.md#stacktracelimit) +[`TransactionError`](TransactionError.md).[`stackTraceLimit`](TransactionError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`TransactionError`](../TransactionError.md).[`captureStackTrace`](../TransactionError.md#capturestacktrace) +[`TransactionError`](TransactionError.md).[`captureStackTrace`](TransactionError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TransactionError`](../TransactionError.md).[`prepareStackTrace`](../TransactionError.md#preparestacktrace) +[`TransactionError`](TransactionError.md).[`prepareStackTrace`](TransactionError.md#preparestacktrace) diff --git a/docs/reference/classes/TransactionError.md b/docs/reference/classes/TransactionError.md index 29381eeb0..045dad833 100644 --- a/docs/reference/classes/TransactionError.md +++ b/docs/reference/classes/TransactionError.md @@ -5,23 +5,23 @@ title: TransactionError # Class: TransactionError -Defined in: [packages/db/src/errors.ts:261](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L261) +Defined in: [packages/db/src/errors.ts:270](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L270) ## Extends -- [`TanStackDBError`](../TanStackDBError.md) +- [`TanStackDBError`](TanStackDBError.md) ## Extended by -- [`MissingMutationFunctionError`](../MissingMutationFunctionError.md) -- [`OnMutateMustBeSynchronousError`](../OnMutateMustBeSynchronousError.md) -- [`TransactionNotPendingMutateError`](../TransactionNotPendingMutateError.md) -- [`TransactionAlreadyCompletedRollbackError`](../TransactionAlreadyCompletedRollbackError.md) -- [`TransactionNotPendingCommitError`](../TransactionNotPendingCommitError.md) -- [`NoPendingSyncTransactionWriteError`](../NoPendingSyncTransactionWriteError.md) -- [`SyncTransactionAlreadyCommittedWriteError`](../SyncTransactionAlreadyCommittedWriteError.md) -- [`NoPendingSyncTransactionCommitError`](../NoPendingSyncTransactionCommitError.md) -- [`SyncTransactionAlreadyCommittedError`](../SyncTransactionAlreadyCommittedError.md) +- [`MissingMutationFunctionError`](MissingMutationFunctionError.md) +- [`OnMutateMustBeSynchronousError`](OnMutateMustBeSynchronousError.md) +- [`TransactionNotPendingMutateError`](TransactionNotPendingMutateError.md) +- [`TransactionAlreadyCompletedRollbackError`](TransactionAlreadyCompletedRollbackError.md) +- [`TransactionNotPendingCommitError`](TransactionNotPendingCommitError.md) +- [`NoPendingSyncTransactionWriteError`](NoPendingSyncTransactionWriteError.md) +- [`SyncTransactionAlreadyCommittedWriteError`](SyncTransactionAlreadyCommittedWriteError.md) +- [`NoPendingSyncTransactionCommitError`](NoPendingSyncTransactionCommitError.md) +- [`SyncTransactionAlreadyCommittedError`](SyncTransactionAlreadyCommittedError.md) ## Constructors @@ -31,7 +31,7 @@ Defined in: [packages/db/src/errors.ts:261](https://github.com/TanStack/db/blob/ new TransactionError(message): TransactionError; ``` -Defined in: [packages/db/src/errors.ts:262](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L262) +Defined in: [packages/db/src/errors.ts:271](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L271) #### Parameters @@ -45,7 +45,7 @@ Defined in: [packages/db/src/errors.ts:262](https://github.com/TanStack/db/blob/ #### Overrides -[`TanStackDBError`](../TanStackDBError.md).[`constructor`](../TanStackDBError.md#constructor) +[`TanStackDBError`](TanStackDBError.md).[`constructor`](TanStackDBError.md#constructor) ## Properties @@ -59,7 +59,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`cause`](../TanStackDBError.md#cause) +[`TanStackDBError`](TanStackDBError.md).[`cause`](TanStackDBError.md#cause) *** @@ -73,7 +73,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`message`](../TanStackDBError.md#message) +[`TanStackDBError`](TanStackDBError.md).[`message`](TanStackDBError.md#message) *** @@ -87,7 +87,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`name`](../TanStackDBError.md#name) +[`TanStackDBError`](TanStackDBError.md).[`name`](TanStackDBError.md#name) *** @@ -101,7 +101,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stack`](../TanStackDBError.md#stack) +[`TanStackDBError`](TanStackDBError.md).[`stack`](TanStackDBError.md#stack) *** @@ -125,7 +125,7 @@ not capture any frames. #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`stackTraceLimit`](../TanStackDBError.md#stacktracelimit) +[`TanStackDBError`](TanStackDBError.md).[`stackTraceLimit`](TanStackDBError.md#stacktracelimit) ## Methods @@ -197,7 +197,7 @@ a(); #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`captureStackTrace`](../TanStackDBError.md#capturestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`captureStackTrace`](TanStackDBError.md#capturestacktrace) *** @@ -229,4 +229,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TanStackDBError`](../TanStackDBError.md).[`prepareStackTrace`](../TanStackDBError.md#preparestacktrace) +[`TanStackDBError`](TanStackDBError.md).[`prepareStackTrace`](TanStackDBError.md#preparestacktrace) diff --git a/docs/reference/classes/TransactionNotPendingCommitError.md b/docs/reference/classes/TransactionNotPendingCommitError.md index dc9705bb8..10610aba6 100644 --- a/docs/reference/classes/TransactionNotPendingCommitError.md +++ b/docs/reference/classes/TransactionNotPendingCommitError.md @@ -5,11 +5,11 @@ title: TransactionNotPendingCommitError # Class: TransactionNotPendingCommitError -Defined in: [packages/db/src/errors.ts:299](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L299) +Defined in: [packages/db/src/errors.ts:308](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L308) ## Extends -- [`TransactionError`](../TransactionError.md) +- [`TransactionError`](TransactionError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:299](https://github.com/TanStack/db/blob/ new TransactionNotPendingCommitError(): TransactionNotPendingCommitError; ``` -Defined in: [packages/db/src/errors.ts:300](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L300) +Defined in: [packages/db/src/errors.ts:309](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L309) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:300](https://github.com/TanStack/db/blob/ #### Overrides -[`TransactionError`](../TransactionError.md).[`constructor`](../TransactionError.md#constructor) +[`TransactionError`](TransactionError.md).[`constructor`](TransactionError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`cause`](../TransactionError.md#cause) +[`TransactionError`](TransactionError.md).[`cause`](TransactionError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`message`](../TransactionError.md#message) +[`TransactionError`](TransactionError.md).[`message`](TransactionError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`name`](../TransactionError.md#name) +[`TransactionError`](TransactionError.md).[`name`](TransactionError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`stack`](../TransactionError.md#stack) +[`TransactionError`](TransactionError.md).[`stack`](TransactionError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`TransactionError`](../TransactionError.md).[`stackTraceLimit`](../TransactionError.md#stacktracelimit) +[`TransactionError`](TransactionError.md).[`stackTraceLimit`](TransactionError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`TransactionError`](../TransactionError.md).[`captureStackTrace`](../TransactionError.md#capturestacktrace) +[`TransactionError`](TransactionError.md).[`captureStackTrace`](TransactionError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TransactionError`](../TransactionError.md).[`prepareStackTrace`](../TransactionError.md#preparestacktrace) +[`TransactionError`](TransactionError.md).[`prepareStackTrace`](TransactionError.md#preparestacktrace) diff --git a/docs/reference/classes/TransactionNotPendingMutateError.md b/docs/reference/classes/TransactionNotPendingMutateError.md index 57bf6eb32..7fe36cb7c 100644 --- a/docs/reference/classes/TransactionNotPendingMutateError.md +++ b/docs/reference/classes/TransactionNotPendingMutateError.md @@ -5,11 +5,11 @@ title: TransactionNotPendingMutateError # Class: TransactionNotPendingMutateError -Defined in: [packages/db/src/errors.ts:283](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L283) +Defined in: [packages/db/src/errors.ts:292](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L292) ## Extends -- [`TransactionError`](../TransactionError.md) +- [`TransactionError`](TransactionError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:283](https://github.com/TanStack/db/blob/ new TransactionNotPendingMutateError(): TransactionNotPendingMutateError; ``` -Defined in: [packages/db/src/errors.ts:284](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L284) +Defined in: [packages/db/src/errors.ts:293](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L293) #### Returns @@ -27,7 +27,7 @@ Defined in: [packages/db/src/errors.ts:284](https://github.com/TanStack/db/blob/ #### Overrides -[`TransactionError`](../TransactionError.md).[`constructor`](../TransactionError.md#constructor) +[`TransactionError`](TransactionError.md).[`constructor`](TransactionError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`cause`](../TransactionError.md#cause) +[`TransactionError`](TransactionError.md).[`cause`](TransactionError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`message`](../TransactionError.md#message) +[`TransactionError`](TransactionError.md).[`message`](TransactionError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`name`](../TransactionError.md#name) +[`TransactionError`](TransactionError.md).[`name`](TransactionError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`TransactionError`](../TransactionError.md).[`stack`](../TransactionError.md#stack) +[`TransactionError`](TransactionError.md).[`stack`](TransactionError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`TransactionError`](../TransactionError.md).[`stackTraceLimit`](../TransactionError.md#stacktracelimit) +[`TransactionError`](TransactionError.md).[`stackTraceLimit`](TransactionError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`TransactionError`](../TransactionError.md).[`captureStackTrace`](../TransactionError.md#capturestacktrace) +[`TransactionError`](TransactionError.md).[`captureStackTrace`](TransactionError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`TransactionError`](../TransactionError.md).[`prepareStackTrace`](../TransactionError.md#preparestacktrace) +[`TransactionError`](TransactionError.md).[`prepareStackTrace`](TransactionError.md#preparestacktrace) diff --git a/docs/reference/classes/UndefinedKeyError.md b/docs/reference/classes/UndefinedKeyError.md index 24f075ab1..57fa5d9a1 100644 --- a/docs/reference/classes/UndefinedKeyError.md +++ b/docs/reference/classes/UndefinedKeyError.md @@ -9,7 +9,7 @@ Defined in: [packages/db/src/errors.ts:146](https://github.com/TanStack/db/blob/ ## Extends -- [`CollectionOperationError`](../CollectionOperationError.md) +- [`CollectionOperationError`](CollectionOperationError.md) ## Constructors @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:147](https://github.com/TanStack/db/blob/ #### Overrides -[`CollectionOperationError`](../CollectionOperationError.md).[`constructor`](../CollectionOperationError.md#constructor) +[`CollectionOperationError`](CollectionOperationError.md).[`constructor`](CollectionOperationError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`cause`](../CollectionOperationError.md#cause) +[`CollectionOperationError`](CollectionOperationError.md).[`cause`](CollectionOperationError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`message`](../CollectionOperationError.md#message) +[`CollectionOperationError`](CollectionOperationError.md).[`message`](CollectionOperationError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`name`](../CollectionOperationError.md#name) +[`CollectionOperationError`](CollectionOperationError.md).[`name`](CollectionOperationError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`stack`](../CollectionOperationError.md#stack) +[`CollectionOperationError`](CollectionOperationError.md).[`stack`](CollectionOperationError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`stackTraceLimit`](../CollectionOperationError.md#stacktracelimit) +[`CollectionOperationError`](CollectionOperationError.md).[`stackTraceLimit`](CollectionOperationError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`captureStackTrace`](../CollectionOperationError.md#capturestacktrace) +[`CollectionOperationError`](CollectionOperationError.md).[`captureStackTrace`](CollectionOperationError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`prepareStackTrace`](../CollectionOperationError.md#preparestacktrace) +[`CollectionOperationError`](CollectionOperationError.md).[`prepareStackTrace`](CollectionOperationError.md#preparestacktrace) diff --git a/docs/reference/classes/UnknownExpressionTypeError.md b/docs/reference/classes/UnknownExpressionTypeError.md index f4d74a8d2..d3b5fa3dd 100644 --- a/docs/reference/classes/UnknownExpressionTypeError.md +++ b/docs/reference/classes/UnknownExpressionTypeError.md @@ -5,11 +5,11 @@ title: UnknownExpressionTypeError # Class: UnknownExpressionTypeError -Defined in: [packages/db/src/errors.ts:454](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L454) +Defined in: [packages/db/src/errors.ts:463](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L463) ## Extends -- [`QueryCompilationError`](../QueryCompilationError.md) +- [`QueryCompilationError`](QueryCompilationError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:454](https://github.com/TanStack/db/blob/ new UnknownExpressionTypeError(type): UnknownExpressionTypeError; ``` -Defined in: [packages/db/src/errors.ts:455](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L455) +Defined in: [packages/db/src/errors.ts:464](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L464) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:455](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryCompilationError`](../QueryCompilationError.md).[`constructor`](../QueryCompilationError.md#constructor) +[`QueryCompilationError`](QueryCompilationError.md).[`constructor`](QueryCompilationError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`cause`](../QueryCompilationError.md#cause) +[`QueryCompilationError`](QueryCompilationError.md).[`cause`](QueryCompilationError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`message`](../QueryCompilationError.md#message) +[`QueryCompilationError`](QueryCompilationError.md).[`message`](QueryCompilationError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`name`](../QueryCompilationError.md#name) +[`QueryCompilationError`](QueryCompilationError.md).[`name`](QueryCompilationError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stack`](../QueryCompilationError.md#stack) +[`QueryCompilationError`](QueryCompilationError.md).[`stack`](QueryCompilationError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stackTraceLimit`](../QueryCompilationError.md#stacktracelimit) +[`QueryCompilationError`](QueryCompilationError.md).[`stackTraceLimit`](QueryCompilationError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`captureStackTrace`](../QueryCompilationError.md#capturestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`captureStackTrace`](QueryCompilationError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`prepareStackTrace`](../QueryCompilationError.md#preparestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`prepareStackTrace`](QueryCompilationError.md#preparestacktrace) diff --git a/docs/reference/classes/UnknownFunctionError.md b/docs/reference/classes/UnknownFunctionError.md index 7b9c5cd10..e1f7bc56c 100644 --- a/docs/reference/classes/UnknownFunctionError.md +++ b/docs/reference/classes/UnknownFunctionError.md @@ -5,11 +5,11 @@ title: UnknownFunctionError # Class: UnknownFunctionError -Defined in: [packages/db/src/errors.ts:466](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L466) +Defined in: [packages/db/src/errors.ts:475](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L475) ## Extends -- [`QueryCompilationError`](../QueryCompilationError.md) +- [`QueryCompilationError`](QueryCompilationError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:466](https://github.com/TanStack/db/blob/ new UnknownFunctionError(functionName): UnknownFunctionError; ``` -Defined in: [packages/db/src/errors.ts:467](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L467) +Defined in: [packages/db/src/errors.ts:476](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L476) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:467](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryCompilationError`](../QueryCompilationError.md).[`constructor`](../QueryCompilationError.md#constructor) +[`QueryCompilationError`](QueryCompilationError.md).[`constructor`](QueryCompilationError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`cause`](../QueryCompilationError.md#cause) +[`QueryCompilationError`](QueryCompilationError.md).[`cause`](QueryCompilationError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`message`](../QueryCompilationError.md#message) +[`QueryCompilationError`](QueryCompilationError.md).[`message`](QueryCompilationError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`name`](../QueryCompilationError.md#name) +[`QueryCompilationError`](QueryCompilationError.md).[`name`](QueryCompilationError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stack`](../QueryCompilationError.md#stack) +[`QueryCompilationError`](QueryCompilationError.md).[`stack`](QueryCompilationError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stackTraceLimit`](../QueryCompilationError.md#stacktracelimit) +[`QueryCompilationError`](QueryCompilationError.md).[`stackTraceLimit`](QueryCompilationError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`captureStackTrace`](../QueryCompilationError.md#capturestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`captureStackTrace`](QueryCompilationError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`prepareStackTrace`](../QueryCompilationError.md#preparestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`prepareStackTrace`](QueryCompilationError.md#preparestacktrace) diff --git a/docs/reference/classes/UnknownHavingExpressionTypeError.md b/docs/reference/classes/UnknownHavingExpressionTypeError.md index 802a4699c..1b65a6db1 100644 --- a/docs/reference/classes/UnknownHavingExpressionTypeError.md +++ b/docs/reference/classes/UnknownHavingExpressionTypeError.md @@ -5,11 +5,11 @@ title: UnknownHavingExpressionTypeError # Class: UnknownHavingExpressionTypeError -Defined in: [packages/db/src/errors.ts:564](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L564) +Defined in: [packages/db/src/errors.ts:573](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L573) ## Extends -- [`GroupByError`](../GroupByError.md) +- [`GroupByError`](GroupByError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:564](https://github.com/TanStack/db/blob/ new UnknownHavingExpressionTypeError(type): UnknownHavingExpressionTypeError; ``` -Defined in: [packages/db/src/errors.ts:565](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L565) +Defined in: [packages/db/src/errors.ts:574](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L574) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:565](https://github.com/TanStack/db/blob/ #### Overrides -[`GroupByError`](../GroupByError.md).[`constructor`](../GroupByError.md#constructor) +[`GroupByError`](GroupByError.md).[`constructor`](GroupByError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`GroupByError`](../GroupByError.md).[`cause`](../GroupByError.md#cause) +[`GroupByError`](GroupByError.md).[`cause`](GroupByError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`GroupByError`](../GroupByError.md).[`message`](../GroupByError.md#message) +[`GroupByError`](GroupByError.md).[`message`](GroupByError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`GroupByError`](../GroupByError.md).[`name`](../GroupByError.md#name) +[`GroupByError`](GroupByError.md).[`name`](GroupByError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`GroupByError`](../GroupByError.md).[`stack`](../GroupByError.md#stack) +[`GroupByError`](GroupByError.md).[`stack`](GroupByError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`GroupByError`](../GroupByError.md).[`stackTraceLimit`](../GroupByError.md#stacktracelimit) +[`GroupByError`](GroupByError.md).[`stackTraceLimit`](GroupByError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`GroupByError`](../GroupByError.md).[`captureStackTrace`](../GroupByError.md#capturestacktrace) +[`GroupByError`](GroupByError.md).[`captureStackTrace`](GroupByError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`GroupByError`](../GroupByError.md).[`prepareStackTrace`](../GroupByError.md#preparestacktrace) +[`GroupByError`](GroupByError.md).[`prepareStackTrace`](GroupByError.md#preparestacktrace) diff --git a/docs/reference/classes/UnsupportedAggregateFunctionError.md b/docs/reference/classes/UnsupportedAggregateFunctionError.md index 6f377c35f..d9533a3b9 100644 --- a/docs/reference/classes/UnsupportedAggregateFunctionError.md +++ b/docs/reference/classes/UnsupportedAggregateFunctionError.md @@ -5,11 +5,11 @@ title: UnsupportedAggregateFunctionError # Class: UnsupportedAggregateFunctionError -Defined in: [packages/db/src/errors.ts:550](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L550) +Defined in: [packages/db/src/errors.ts:559](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L559) ## Extends -- [`GroupByError`](../GroupByError.md) +- [`GroupByError`](GroupByError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:550](https://github.com/TanStack/db/blob/ new UnsupportedAggregateFunctionError(functionName): UnsupportedAggregateFunctionError; ``` -Defined in: [packages/db/src/errors.ts:551](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L551) +Defined in: [packages/db/src/errors.ts:560](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L560) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:551](https://github.com/TanStack/db/blob/ #### Overrides -[`GroupByError`](../GroupByError.md).[`constructor`](../GroupByError.md#constructor) +[`GroupByError`](GroupByError.md).[`constructor`](GroupByError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`GroupByError`](../GroupByError.md).[`cause`](../GroupByError.md#cause) +[`GroupByError`](GroupByError.md).[`cause`](GroupByError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`GroupByError`](../GroupByError.md).[`message`](../GroupByError.md#message) +[`GroupByError`](GroupByError.md).[`message`](GroupByError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`GroupByError`](../GroupByError.md).[`name`](../GroupByError.md#name) +[`GroupByError`](GroupByError.md).[`name`](GroupByError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`GroupByError`](../GroupByError.md).[`stack`](../GroupByError.md#stack) +[`GroupByError`](GroupByError.md).[`stack`](GroupByError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`GroupByError`](../GroupByError.md).[`stackTraceLimit`](../GroupByError.md#stacktracelimit) +[`GroupByError`](GroupByError.md).[`stackTraceLimit`](GroupByError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`GroupByError`](../GroupByError.md).[`captureStackTrace`](../GroupByError.md#capturestacktrace) +[`GroupByError`](GroupByError.md).[`captureStackTrace`](GroupByError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`GroupByError`](../GroupByError.md).[`prepareStackTrace`](../GroupByError.md#preparestacktrace) +[`GroupByError`](GroupByError.md).[`prepareStackTrace`](GroupByError.md#preparestacktrace) diff --git a/docs/reference/classes/UnsupportedFromTypeError.md b/docs/reference/classes/UnsupportedFromTypeError.md index 5dd5b84cf..052f7e181 100644 --- a/docs/reference/classes/UnsupportedFromTypeError.md +++ b/docs/reference/classes/UnsupportedFromTypeError.md @@ -5,11 +5,11 @@ title: UnsupportedFromTypeError # Class: UnsupportedFromTypeError -Defined in: [packages/db/src/errors.ts:448](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L448) +Defined in: [packages/db/src/errors.ts:457](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L457) ## Extends -- [`QueryCompilationError`](../QueryCompilationError.md) +- [`QueryCompilationError`](QueryCompilationError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:448](https://github.com/TanStack/db/blob/ new UnsupportedFromTypeError(type): UnsupportedFromTypeError; ``` -Defined in: [packages/db/src/errors.ts:449](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L449) +Defined in: [packages/db/src/errors.ts:458](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L458) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:449](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryCompilationError`](../QueryCompilationError.md).[`constructor`](../QueryCompilationError.md#constructor) +[`QueryCompilationError`](QueryCompilationError.md).[`constructor`](QueryCompilationError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`cause`](../QueryCompilationError.md#cause) +[`QueryCompilationError`](QueryCompilationError.md).[`cause`](QueryCompilationError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`message`](../QueryCompilationError.md#message) +[`QueryCompilationError`](QueryCompilationError.md).[`message`](QueryCompilationError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`name`](../QueryCompilationError.md#name) +[`QueryCompilationError`](QueryCompilationError.md).[`name`](QueryCompilationError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stack`](../QueryCompilationError.md#stack) +[`QueryCompilationError`](QueryCompilationError.md).[`stack`](QueryCompilationError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`stackTraceLimit`](../QueryCompilationError.md#stacktracelimit) +[`QueryCompilationError`](QueryCompilationError.md).[`stackTraceLimit`](QueryCompilationError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`captureStackTrace`](../QueryCompilationError.md#capturestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`captureStackTrace`](QueryCompilationError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCompilationError`](../QueryCompilationError.md).[`prepareStackTrace`](../QueryCompilationError.md#preparestacktrace) +[`QueryCompilationError`](QueryCompilationError.md).[`prepareStackTrace`](QueryCompilationError.md#preparestacktrace) diff --git a/docs/reference/classes/UnsupportedJoinSourceTypeError.md b/docs/reference/classes/UnsupportedJoinSourceTypeError.md index 35282dcef..ca2d13df6 100644 --- a/docs/reference/classes/UnsupportedJoinSourceTypeError.md +++ b/docs/reference/classes/UnsupportedJoinSourceTypeError.md @@ -5,11 +5,11 @@ title: UnsupportedJoinSourceTypeError # Class: UnsupportedJoinSourceTypeError -Defined in: [packages/db/src/errors.ts:528](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L528) +Defined in: [packages/db/src/errors.ts:537](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L537) ## Extends -- [`JoinError`](../JoinError.md) +- [`JoinError`](JoinError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:528](https://github.com/TanStack/db/blob/ new UnsupportedJoinSourceTypeError(type): UnsupportedJoinSourceTypeError; ``` -Defined in: [packages/db/src/errors.ts:529](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L529) +Defined in: [packages/db/src/errors.ts:538](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L538) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:529](https://github.com/TanStack/db/blob/ #### Overrides -[`JoinError`](../JoinError.md).[`constructor`](../JoinError.md#constructor) +[`JoinError`](JoinError.md).[`constructor`](JoinError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`cause`](../JoinError.md#cause) +[`JoinError`](JoinError.md).[`cause`](JoinError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`message`](../JoinError.md#message) +[`JoinError`](JoinError.md).[`message`](JoinError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`name`](../JoinError.md#name) +[`JoinError`](JoinError.md).[`name`](JoinError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`stack`](../JoinError.md#stack) +[`JoinError`](JoinError.md).[`stack`](JoinError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`JoinError`](../JoinError.md).[`stackTraceLimit`](../JoinError.md#stacktracelimit) +[`JoinError`](JoinError.md).[`stackTraceLimit`](JoinError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`JoinError`](../JoinError.md).[`captureStackTrace`](../JoinError.md#capturestacktrace) +[`JoinError`](JoinError.md).[`captureStackTrace`](JoinError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`JoinError`](../JoinError.md).[`prepareStackTrace`](../JoinError.md#preparestacktrace) +[`JoinError`](JoinError.md).[`prepareStackTrace`](JoinError.md#preparestacktrace) diff --git a/docs/reference/classes/UnsupportedJoinTypeError.md b/docs/reference/classes/UnsupportedJoinTypeError.md index 9ef53dc56..86e4d6483 100644 --- a/docs/reference/classes/UnsupportedJoinTypeError.md +++ b/docs/reference/classes/UnsupportedJoinTypeError.md @@ -5,11 +5,11 @@ title: UnsupportedJoinTypeError # Class: UnsupportedJoinTypeError -Defined in: [packages/db/src/errors.ts:486](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L486) +Defined in: [packages/db/src/errors.ts:495](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L495) ## Extends -- [`JoinError`](../JoinError.md) +- [`JoinError`](JoinError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:486](https://github.com/TanStack/db/blob/ new UnsupportedJoinTypeError(joinType): UnsupportedJoinTypeError; ``` -Defined in: [packages/db/src/errors.ts:487](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L487) +Defined in: [packages/db/src/errors.ts:496](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L496) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:487](https://github.com/TanStack/db/blob/ #### Overrides -[`JoinError`](../JoinError.md).[`constructor`](../JoinError.md#constructor) +[`JoinError`](JoinError.md).[`constructor`](JoinError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`cause`](../JoinError.md#cause) +[`JoinError`](JoinError.md).[`cause`](JoinError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`message`](../JoinError.md#message) +[`JoinError`](JoinError.md).[`message`](JoinError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`name`](../JoinError.md#name) +[`JoinError`](JoinError.md).[`name`](JoinError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`JoinError`](../JoinError.md).[`stack`](../JoinError.md#stack) +[`JoinError`](JoinError.md).[`stack`](JoinError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`JoinError`](../JoinError.md).[`stackTraceLimit`](../JoinError.md#stacktracelimit) +[`JoinError`](JoinError.md).[`stackTraceLimit`](JoinError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`JoinError`](../JoinError.md).[`captureStackTrace`](../JoinError.md#capturestacktrace) +[`JoinError`](JoinError.md).[`captureStackTrace`](JoinError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`JoinError`](../JoinError.md).[`prepareStackTrace`](../JoinError.md#preparestacktrace) +[`JoinError`](JoinError.md).[`prepareStackTrace`](JoinError.md#preparestacktrace) diff --git a/docs/reference/classes/UpdateKeyNotFoundError.md b/docs/reference/classes/UpdateKeyNotFoundError.md index d029b874b..ad1a7f598 100644 --- a/docs/reference/classes/UpdateKeyNotFoundError.md +++ b/docs/reference/classes/UpdateKeyNotFoundError.md @@ -5,11 +5,11 @@ title: UpdateKeyNotFoundError # Class: UpdateKeyNotFoundError -Defined in: [packages/db/src/errors.ts:198](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L198) +Defined in: [packages/db/src/errors.ts:207](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L207) ## Extends -- [`CollectionOperationError`](../CollectionOperationError.md) +- [`CollectionOperationError`](CollectionOperationError.md) ## Constructors @@ -19,7 +19,7 @@ Defined in: [packages/db/src/errors.ts:198](https://github.com/TanStack/db/blob/ new UpdateKeyNotFoundError(key): UpdateKeyNotFoundError; ``` -Defined in: [packages/db/src/errors.ts:199](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L199) +Defined in: [packages/db/src/errors.ts:208](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L208) #### Parameters @@ -33,7 +33,7 @@ Defined in: [packages/db/src/errors.ts:199](https://github.com/TanStack/db/blob/ #### Overrides -[`CollectionOperationError`](../CollectionOperationError.md).[`constructor`](../CollectionOperationError.md#constructor) +[`CollectionOperationError`](CollectionOperationError.md).[`constructor`](CollectionOperationError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`cause`](../CollectionOperationError.md#cause) +[`CollectionOperationError`](CollectionOperationError.md).[`cause`](CollectionOperationError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`message`](../CollectionOperationError.md#message) +[`CollectionOperationError`](CollectionOperationError.md).[`message`](CollectionOperationError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`name`](../CollectionOperationError.md#name) +[`CollectionOperationError`](CollectionOperationError.md).[`name`](CollectionOperationError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`stack`](../CollectionOperationError.md#stack) +[`CollectionOperationError`](CollectionOperationError.md).[`stack`](CollectionOperationError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`stackTraceLimit`](../CollectionOperationError.md#stacktracelimit) +[`CollectionOperationError`](CollectionOperationError.md).[`stackTraceLimit`](CollectionOperationError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`captureStackTrace`](../CollectionOperationError.md#capturestacktrace) +[`CollectionOperationError`](CollectionOperationError.md).[`captureStackTrace`](CollectionOperationError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`CollectionOperationError`](../CollectionOperationError.md).[`prepareStackTrace`](../CollectionOperationError.md#preparestacktrace) +[`CollectionOperationError`](CollectionOperationError.md).[`prepareStackTrace`](CollectionOperationError.md#preparestacktrace) diff --git a/docs/reference/classes/WhereClauseConversionError.md b/docs/reference/classes/WhereClauseConversionError.md index 98fb6f2d7..0ddb226a0 100644 --- a/docs/reference/classes/WhereClauseConversionError.md +++ b/docs/reference/classes/WhereClauseConversionError.md @@ -5,13 +5,13 @@ title: WhereClauseConversionError # Class: WhereClauseConversionError -Defined in: [packages/db/src/errors.ts:644](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L644) +Defined in: [packages/db/src/errors.ts:653](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L653) Internal error when the query optimizer fails to convert a WHERE clause to a collection filter. ## Extends -- [`QueryOptimizerError`](../QueryOptimizerError.md) +- [`QueryOptimizerError`](QueryOptimizerError.md) ## Constructors @@ -21,7 +21,7 @@ Internal error when the query optimizer fails to convert a WHERE clause to a col new WhereClauseConversionError(collectionId, alias): WhereClauseConversionError; ``` -Defined in: [packages/db/src/errors.ts:645](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L645) +Defined in: [packages/db/src/errors.ts:654](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L654) #### Parameters @@ -39,7 +39,7 @@ Defined in: [packages/db/src/errors.ts:645](https://github.com/TanStack/db/blob/ #### Overrides -[`QueryOptimizerError`](../QueryOptimizerError.md).[`constructor`](../QueryOptimizerError.md#constructor) +[`QueryOptimizerError`](QueryOptimizerError.md).[`constructor`](QueryOptimizerError.md#constructor) ## Properties @@ -53,7 +53,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryOptimizerError`](../QueryOptimizerError.md).[`cause`](../QueryOptimizerError.md#cause) +[`QueryOptimizerError`](QueryOptimizerError.md).[`cause`](QueryOptimizerError.md#cause) *** @@ -67,7 +67,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryOptimizerError`](../QueryOptimizerError.md).[`message`](../QueryOptimizerError.md#message) +[`QueryOptimizerError`](QueryOptimizerError.md).[`message`](QueryOptimizerError.md#message) *** @@ -81,7 +81,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryOptimizerError`](../QueryOptimizerError.md).[`name`](../QueryOptimizerError.md#name) +[`QueryOptimizerError`](QueryOptimizerError.md).[`name`](QueryOptimizerError.md#name) *** @@ -95,7 +95,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryOptimizerError`](../QueryOptimizerError.md).[`stack`](../QueryOptimizerError.md#stack) +[`QueryOptimizerError`](QueryOptimizerError.md).[`stack`](QueryOptimizerError.md#stack) *** @@ -119,7 +119,7 @@ not capture any frames. #### Inherited from -[`QueryOptimizerError`](../QueryOptimizerError.md).[`stackTraceLimit`](../QueryOptimizerError.md#stacktracelimit) +[`QueryOptimizerError`](QueryOptimizerError.md).[`stackTraceLimit`](QueryOptimizerError.md#stacktracelimit) ## Methods @@ -191,7 +191,7 @@ a(); #### Inherited from -[`QueryOptimizerError`](../QueryOptimizerError.md).[`captureStackTrace`](../QueryOptimizerError.md#capturestacktrace) +[`QueryOptimizerError`](QueryOptimizerError.md).[`captureStackTrace`](QueryOptimizerError.md#capturestacktrace) *** @@ -223,4 +223,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryOptimizerError`](../QueryOptimizerError.md).[`prepareStackTrace`](../QueryOptimizerError.md#preparestacktrace) +[`QueryOptimizerError`](QueryOptimizerError.md).[`prepareStackTrace`](QueryOptimizerError.md#preparestacktrace) diff --git a/docs/reference/electric-db-collection/classes/ElectricDBCollectionError.md b/docs/reference/electric-db-collection/classes/ElectricDBCollectionError.md index 8ec928746..a7ee69f1d 100644 --- a/docs/reference/electric-db-collection/classes/ElectricDBCollectionError.md +++ b/docs/reference/electric-db-collection/classes/ElectricDBCollectionError.md @@ -13,10 +13,10 @@ Defined in: [packages/electric-db-collection/src/errors.ts:4](https://github.com ## Extended by -- [`ExpectedNumberInAwaitTxIdError`](../ExpectedNumberInAwaitTxIdError.md) -- [`TimeoutWaitingForTxIdError`](../TimeoutWaitingForTxIdError.md) -- [`TimeoutWaitingForMatchError`](../TimeoutWaitingForMatchError.md) -- [`StreamAbortedError`](../StreamAbortedError.md) +- [`ExpectedNumberInAwaitTxIdError`](ExpectedNumberInAwaitTxIdError.md) +- [`TimeoutWaitingForTxIdError`](TimeoutWaitingForTxIdError.md) +- [`TimeoutWaitingForMatchError`](TimeoutWaitingForMatchError.md) +- [`StreamAbortedError`](StreamAbortedError.md) ## Constructors diff --git a/docs/reference/electric-db-collection/classes/ExpectedNumberInAwaitTxIdError.md b/docs/reference/electric-db-collection/classes/ExpectedNumberInAwaitTxIdError.md index a0c31569e..9b2a3317b 100644 --- a/docs/reference/electric-db-collection/classes/ExpectedNumberInAwaitTxIdError.md +++ b/docs/reference/electric-db-collection/classes/ExpectedNumberInAwaitTxIdError.md @@ -9,7 +9,7 @@ Defined in: [packages/electric-db-collection/src/errors.ts:11](https://github.co ## Extends -- [`ElectricDBCollectionError`](../ElectricDBCollectionError.md) +- [`ElectricDBCollectionError`](ElectricDBCollectionError.md) ## Constructors @@ -37,7 +37,7 @@ Defined in: [packages/electric-db-collection/src/errors.ts:12](https://github.co #### Overrides -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`constructor`](../ElectricDBCollectionError.md#constructor) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`constructor`](ElectricDBCollectionError.md#constructor) ## Properties @@ -51,7 +51,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`cause`](../ElectricDBCollectionError.md#cause) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`cause`](ElectricDBCollectionError.md#cause) *** @@ -65,7 +65,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`message`](../ElectricDBCollectionError.md#message) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`message`](ElectricDBCollectionError.md#message) *** @@ -79,7 +79,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`name`](../ElectricDBCollectionError.md#name) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`name`](ElectricDBCollectionError.md#name) *** @@ -93,7 +93,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`stack`](../ElectricDBCollectionError.md#stack) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`stack`](ElectricDBCollectionError.md#stack) *** @@ -117,7 +117,7 @@ not capture any frames. #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`stackTraceLimit`](../ElectricDBCollectionError.md#stacktracelimit) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`stackTraceLimit`](ElectricDBCollectionError.md#stacktracelimit) ## Methods @@ -189,7 +189,7 @@ a(); #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`captureStackTrace`](../ElectricDBCollectionError.md#capturestacktrace) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`captureStackTrace`](ElectricDBCollectionError.md#capturestacktrace) *** @@ -221,4 +221,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`prepareStackTrace`](../ElectricDBCollectionError.md#preparestacktrace) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`prepareStackTrace`](ElectricDBCollectionError.md#preparestacktrace) diff --git a/docs/reference/electric-db-collection/classes/StreamAbortedError.md b/docs/reference/electric-db-collection/classes/StreamAbortedError.md index d08f6639f..6b2a5c286 100644 --- a/docs/reference/electric-db-collection/classes/StreamAbortedError.md +++ b/docs/reference/electric-db-collection/classes/StreamAbortedError.md @@ -9,7 +9,7 @@ Defined in: [packages/electric-db-collection/src/errors.ts:32](https://github.co ## Extends -- [`ElectricDBCollectionError`](../ElectricDBCollectionError.md) +- [`ElectricDBCollectionError`](ElectricDBCollectionError.md) ## Constructors @@ -33,7 +33,7 @@ Defined in: [packages/electric-db-collection/src/errors.ts:33](https://github.co #### Overrides -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`constructor`](../ElectricDBCollectionError.md#constructor) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`constructor`](ElectricDBCollectionError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`cause`](../ElectricDBCollectionError.md#cause) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`cause`](ElectricDBCollectionError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`message`](../ElectricDBCollectionError.md#message) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`message`](ElectricDBCollectionError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`name`](../ElectricDBCollectionError.md#name) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`name`](ElectricDBCollectionError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`stack`](../ElectricDBCollectionError.md#stack) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`stack`](ElectricDBCollectionError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`stackTraceLimit`](../ElectricDBCollectionError.md#stacktracelimit) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`stackTraceLimit`](ElectricDBCollectionError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`captureStackTrace`](../ElectricDBCollectionError.md#capturestacktrace) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`captureStackTrace`](ElectricDBCollectionError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`prepareStackTrace`](../ElectricDBCollectionError.md#preparestacktrace) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`prepareStackTrace`](ElectricDBCollectionError.md#preparestacktrace) diff --git a/docs/reference/electric-db-collection/classes/TimeoutWaitingForMatchError.md b/docs/reference/electric-db-collection/classes/TimeoutWaitingForMatchError.md index 2cfd78e55..8d6383e1d 100644 --- a/docs/reference/electric-db-collection/classes/TimeoutWaitingForMatchError.md +++ b/docs/reference/electric-db-collection/classes/TimeoutWaitingForMatchError.md @@ -9,7 +9,7 @@ Defined in: [packages/electric-db-collection/src/errors.ts:25](https://github.co ## Extends -- [`ElectricDBCollectionError`](../ElectricDBCollectionError.md) +- [`ElectricDBCollectionError`](ElectricDBCollectionError.md) ## Constructors @@ -33,7 +33,7 @@ Defined in: [packages/electric-db-collection/src/errors.ts:26](https://github.co #### Overrides -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`constructor`](../ElectricDBCollectionError.md#constructor) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`constructor`](ElectricDBCollectionError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`cause`](../ElectricDBCollectionError.md#cause) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`cause`](ElectricDBCollectionError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`message`](../ElectricDBCollectionError.md#message) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`message`](ElectricDBCollectionError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`name`](../ElectricDBCollectionError.md#name) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`name`](ElectricDBCollectionError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`stack`](../ElectricDBCollectionError.md#stack) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`stack`](ElectricDBCollectionError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`stackTraceLimit`](../ElectricDBCollectionError.md#stacktracelimit) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`stackTraceLimit`](ElectricDBCollectionError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`captureStackTrace`](../ElectricDBCollectionError.md#capturestacktrace) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`captureStackTrace`](ElectricDBCollectionError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`prepareStackTrace`](../ElectricDBCollectionError.md#preparestacktrace) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`prepareStackTrace`](ElectricDBCollectionError.md#preparestacktrace) diff --git a/docs/reference/electric-db-collection/classes/TimeoutWaitingForTxIdError.md b/docs/reference/electric-db-collection/classes/TimeoutWaitingForTxIdError.md index 5f7f76187..ec39c57d4 100644 --- a/docs/reference/electric-db-collection/classes/TimeoutWaitingForTxIdError.md +++ b/docs/reference/electric-db-collection/classes/TimeoutWaitingForTxIdError.md @@ -9,7 +9,7 @@ Defined in: [packages/electric-db-collection/src/errors.ts:18](https://github.co ## Extends -- [`ElectricDBCollectionError`](../ElectricDBCollectionError.md) +- [`ElectricDBCollectionError`](ElectricDBCollectionError.md) ## Constructors @@ -37,7 +37,7 @@ Defined in: [packages/electric-db-collection/src/errors.ts:19](https://github.co #### Overrides -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`constructor`](../ElectricDBCollectionError.md#constructor) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`constructor`](ElectricDBCollectionError.md#constructor) ## Properties @@ -51,7 +51,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`cause`](../ElectricDBCollectionError.md#cause) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`cause`](ElectricDBCollectionError.md#cause) *** @@ -65,7 +65,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`message`](../ElectricDBCollectionError.md#message) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`message`](ElectricDBCollectionError.md#message) *** @@ -79,7 +79,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`name`](../ElectricDBCollectionError.md#name) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`name`](ElectricDBCollectionError.md#name) *** @@ -93,7 +93,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`stack`](../ElectricDBCollectionError.md#stack) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`stack`](ElectricDBCollectionError.md#stack) *** @@ -117,7 +117,7 @@ not capture any frames. #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`stackTraceLimit`](../ElectricDBCollectionError.md#stacktracelimit) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`stackTraceLimit`](ElectricDBCollectionError.md#stacktracelimit) ## Methods @@ -189,7 +189,7 @@ a(); #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`captureStackTrace`](../ElectricDBCollectionError.md#capturestacktrace) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`captureStackTrace`](ElectricDBCollectionError.md#capturestacktrace) *** @@ -221,4 +221,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`ElectricDBCollectionError`](../ElectricDBCollectionError.md).[`prepareStackTrace`](../ElectricDBCollectionError.md#preparestacktrace) +[`ElectricDBCollectionError`](ElectricDBCollectionError.md).[`prepareStackTrace`](ElectricDBCollectionError.md#preparestacktrace) diff --git a/docs/reference/electric-db-collection/functions/electricCollectionOptions.md b/docs/reference/electric-db-collection/functions/electricCollectionOptions.md index b4dc3df4e..eaafcc44a 100644 --- a/docs/reference/electric-db-collection/functions/electricCollectionOptions.md +++ b/docs/reference/electric-db-collection/functions/electricCollectionOptions.md @@ -11,7 +11,7 @@ title: electricCollectionOptions function electricCollectionOptions(config): Omit, string | number, T, UtilsRecord>, "utils"> & object; ``` -Defined in: [packages/electric-db-collection/src/electric.ts:427](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L427) +Defined in: [packages/electric-db-collection/src/electric.ts:499](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L499) Creates Electric collection options for use with a standard Collection @@ -27,7 +27,7 @@ The explicit type of items in the collection (highest priority) #### config -[`ElectricCollectionConfig`](../../interfaces/ElectricCollectionConfig.md)\<`InferSchemaOutput`\<`T`\>, `T`\> & `object` +[`ElectricCollectionConfig`](../interfaces/ElectricCollectionConfig.md)\<`InferSchemaOutput`\<`T`\>, `T`\> & `object` Configuration options for the Electric collection @@ -43,7 +43,7 @@ Collection options with utilities function electricCollectionOptions(config): Omit, "utils"> & object; ``` -Defined in: [packages/electric-db-collection/src/electric.ts:438](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L438) +Defined in: [packages/electric-db-collection/src/electric.ts:510](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L510) Creates Electric collection options for use with a standard Collection @@ -59,7 +59,7 @@ The explicit type of items in the collection (highest priority) #### config -[`ElectricCollectionConfig`](../../interfaces/ElectricCollectionConfig.md)\<`T`, `never`\> & `object` +[`ElectricCollectionConfig`](../interfaces/ElectricCollectionConfig.md)\<`T`, `never`\> & `object` Configuration options for the Electric collection diff --git a/docs/reference/electric-db-collection/functions/isChangeMessage.md b/docs/reference/electric-db-collection/functions/isChangeMessage.md new file mode 100644 index 000000000..124fa10eb --- /dev/null +++ b/docs/reference/electric-db-collection/functions/isChangeMessage.md @@ -0,0 +1,46 @@ +--- +id: isChangeMessage +title: isChangeMessage +--- + +# Function: isChangeMessage() + +```ts +function isChangeMessage(message): message is ChangeMessage; +``` + +Defined in: node\_modules/.pnpm/@electric-sql+client@1.3.0/node\_modules/@electric-sql/client/dist/index.d.ts:816 + +Type guard for checking Message is ChangeMessage. + +See [TS docs](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards) +for information on how to use type guards. + +## Type Parameters + +### T + +`T` *extends* `Row`\<`unknown`\> = `Row`\<`never`\> + +## Parameters + +### message + +`Message`\<`T`\> + +the message to check + +## Returns + +`message is ChangeMessage` + +true if the message is a ChangeMessage + +## Example + +```ts +if (isChangeMessage(message)) { + const msgChng: ChangeMessage = message // Ok + const msgCtrl: ControlMessage = message // Err, type mismatch +} +``` diff --git a/docs/reference/electric-db-collection/functions/isControlMessage.md b/docs/reference/electric-db-collection/functions/isControlMessage.md new file mode 100644 index 000000000..d6e025c25 --- /dev/null +++ b/docs/reference/electric-db-collection/functions/isControlMessage.md @@ -0,0 +1,48 @@ +--- +id: isControlMessage +title: isControlMessage +--- + +# Function: isControlMessage() + +```ts +function isControlMessage(message): message is ControlMessage; +``` + +Defined in: node\_modules/.pnpm/@electric-sql+client@1.3.0/node\_modules/@electric-sql/client/dist/index.d.ts:834 + +Type guard for checking Message is ControlMessage. + +See [TS docs](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards) +for information on how to use type guards. + +## Type Parameters + +### T + +`T` *extends* `Row`\<`unknown`\> = `Row`\<`never`\> + +## Parameters + +### message + +`Message`\<`T`\> + +the message to check + +## Returns + +`message is ControlMessage` + +true if the message is a ControlMessage + + * + +## Example + +```ts +if (isControlMessage(message)) { + const msgChng: ChangeMessage = message // Err, type mismatch + const msgCtrl: ControlMessage = message // Ok +} +``` diff --git a/docs/reference/electric-db-collection/index.md b/docs/reference/electric-db-collection/index.md index be4322541..b8b740997 100644 --- a/docs/reference/electric-db-collection/index.md +++ b/docs/reference/electric-db-collection/index.md @@ -7,22 +7,24 @@ title: "@tanstack/electric-db-collection" ## Classes -- [ElectricDBCollectionError](../classes/ElectricDBCollectionError.md) -- [ExpectedNumberInAwaitTxIdError](../classes/ExpectedNumberInAwaitTxIdError.md) -- [StreamAbortedError](../classes/StreamAbortedError.md) -- [TimeoutWaitingForMatchError](../classes/TimeoutWaitingForMatchError.md) -- [TimeoutWaitingForTxIdError](../classes/TimeoutWaitingForTxIdError.md) +- [ElectricDBCollectionError](classes/ElectricDBCollectionError.md) +- [ExpectedNumberInAwaitTxIdError](classes/ExpectedNumberInAwaitTxIdError.md) +- [StreamAbortedError](classes/StreamAbortedError.md) +- [TimeoutWaitingForMatchError](classes/TimeoutWaitingForMatchError.md) +- [TimeoutWaitingForTxIdError](classes/TimeoutWaitingForTxIdError.md) ## Interfaces -- [ElectricCollectionConfig](../interfaces/ElectricCollectionConfig.md) -- [ElectricCollectionUtils](../interfaces/ElectricCollectionUtils.md) +- [ElectricCollectionConfig](interfaces/ElectricCollectionConfig.md) +- [ElectricCollectionUtils](interfaces/ElectricCollectionUtils.md) ## Type Aliases -- [AwaitTxIdFn](../type-aliases/AwaitTxIdFn.md) -- [Txid](../type-aliases/Txid.md) +- [AwaitTxIdFn](type-aliases/AwaitTxIdFn.md) +- [Txid](type-aliases/Txid.md) ## Functions -- [electricCollectionOptions](../functions/electricCollectionOptions.md) +- [electricCollectionOptions](functions/electricCollectionOptions.md) +- [isChangeMessage](functions/isChangeMessage.md) +- [isControlMessage](functions/isControlMessage.md) diff --git a/docs/reference/electric-db-collection/interfaces/ElectricCollectionConfig.md b/docs/reference/electric-db-collection/interfaces/ElectricCollectionConfig.md index b096292e3..46a6dc547 100644 --- a/docs/reference/electric-db-collection/interfaces/ElectricCollectionConfig.md +++ b/docs/reference/electric-db-collection/interfaces/ElectricCollectionConfig.md @@ -5,13 +5,13 @@ title: ElectricCollectionConfig # Interface: ElectricCollectionConfig\ -Defined in: [packages/electric-db-collection/src/electric.ts:124](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L124) +Defined in: [packages/electric-db-collection/src/electric.ts:140](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L140) Configuration interface for Electric collection options ## Extends -- `Omit`\<`BaseCollectionConfig`\<`T`, `string` \| `number`, `TSchema`, [`ElectricCollectionUtils`](../ElectricCollectionUtils.md)\<`T`\>, `any`\>, `"onInsert"` \| `"onUpdate"` \| `"onDelete"` \| `"syncMode"`\> +- `Omit`\<`BaseCollectionConfig`\<`T`, `string` \| `number`, `TSchema`, [`ElectricCollectionUtils`](ElectricCollectionUtils.md)\<`T`\>, `any`\>, `"onInsert"` \| `"onUpdate"` \| `"onDelete"` \| `"syncMode"`\> ## Type Parameters @@ -35,7 +35,7 @@ The schema type for validation optional [ELECTRIC_TEST_HOOKS]: ElectricTestHooks; ``` -Defined in: [packages/electric-db-collection/src/electric.ts:147](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L147) +Defined in: [packages/electric-db-collection/src/electric.ts:163](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L163) Internal test hooks (for testing only) Hidden via Symbol to prevent accidental usage in production @@ -48,7 +48,7 @@ Hidden via Symbol to prevent accidental usage in production optional onDelete: (params) => Promise; ``` -Defined in: [packages/electric-db-collection/src/electric.ts:264](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L264) +Defined in: [packages/electric-db-collection/src/electric.ts:280](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L280) Optional asynchronous handler function called before a delete operation @@ -56,7 +56,7 @@ Optional asynchronous handler function called before a delete operation ##### params -`DeleteMutationFnParams`\<`T`, `string` \| `number`, [`ElectricCollectionUtils`](../ElectricCollectionUtils.md)\<`T`\>\> +`DeleteMutationFnParams`\<`T`, `string` \| `number`, [`ElectricCollectionUtils`](ElectricCollectionUtils.md)\<`T`\>\> Object containing transaction and collection information @@ -100,7 +100,7 @@ onDelete: async ({ transaction, collection }) => { optional onInsert: (params) => Promise; ``` -Defined in: [packages/electric-db-collection/src/electric.ts:195](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L195) +Defined in: [packages/electric-db-collection/src/electric.ts:211](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L211) Optional asynchronous handler function called before an insert operation @@ -108,7 +108,7 @@ Optional asynchronous handler function called before an insert operation ##### params -`InsertMutationFnParams`\<`T`, `string` \| `number`, [`ElectricCollectionUtils`](../ElectricCollectionUtils.md)\<`T`\>\> +`InsertMutationFnParams`\<`T`, `string` \| `number`, [`ElectricCollectionUtils`](ElectricCollectionUtils.md)\<`T`\>\> Object containing transaction and collection information @@ -174,7 +174,7 @@ onInsert: async ({ transaction, collection }) => { optional onUpdate: (params) => Promise; ``` -Defined in: [packages/electric-db-collection/src/electric.ts:230](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L230) +Defined in: [packages/electric-db-collection/src/electric.ts:246](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L246) Optional asynchronous handler function called before an update operation @@ -182,7 +182,7 @@ Optional asynchronous handler function called before an update operation ##### params -`UpdateMutationFnParams`\<`T`, `string` \| `number`, [`ElectricCollectionUtils`](../ElectricCollectionUtils.md)\<`T`\>\> +`UpdateMutationFnParams`\<`T`, `string` \| `number`, [`ElectricCollectionUtils`](ElectricCollectionUtils.md)\<`T`\>\> Object containing transaction and collection information @@ -227,7 +227,7 @@ onUpdate: async ({ transaction, collection }) => { shapeOptions: ShapeStreamOptions>; ``` -Defined in: [packages/electric-db-collection/src/electric.ts:140](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L140) +Defined in: [packages/electric-db-collection/src/electric.ts:156](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L156) Configuration options for the ElectricSQL ShapeStream @@ -239,4 +239,4 @@ Configuration options for the ElectricSQL ShapeStream optional syncMode: ElectricSyncMode; ``` -Defined in: [packages/electric-db-collection/src/electric.ts:141](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L141) +Defined in: [packages/electric-db-collection/src/electric.ts:157](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L157) diff --git a/docs/reference/electric-db-collection/interfaces/ElectricCollectionUtils.md b/docs/reference/electric-db-collection/interfaces/ElectricCollectionUtils.md index 6364e3072..6139732b6 100644 --- a/docs/reference/electric-db-collection/interfaces/ElectricCollectionUtils.md +++ b/docs/reference/electric-db-collection/interfaces/ElectricCollectionUtils.md @@ -5,7 +5,7 @@ title: ElectricCollectionUtils # Interface: ElectricCollectionUtils\ -Defined in: [packages/electric-db-collection/src/electric.ts:409](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L409) +Defined in: [packages/electric-db-collection/src/electric.ts:481](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L481) Electric collection utilities type @@ -33,7 +33,7 @@ Electric collection utilities type awaitMatch: AwaitMatchFn; ``` -Defined in: [packages/electric-db-collection/src/electric.ts:413](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L413) +Defined in: [packages/electric-db-collection/src/electric.ts:485](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L485) *** @@ -43,4 +43,4 @@ Defined in: [packages/electric-db-collection/src/electric.ts:413](https://github awaitTxId: AwaitTxIdFn; ``` -Defined in: [packages/electric-db-collection/src/electric.ts:412](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L412) +Defined in: [packages/electric-db-collection/src/electric.ts:484](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L484) diff --git a/docs/reference/electric-db-collection/type-aliases/AwaitTxIdFn.md b/docs/reference/electric-db-collection/type-aliases/AwaitTxIdFn.md index 8dd0d67e9..93974fec0 100644 --- a/docs/reference/electric-db-collection/type-aliases/AwaitTxIdFn.md +++ b/docs/reference/electric-db-collection/type-aliases/AwaitTxIdFn.md @@ -9,7 +9,7 @@ title: AwaitTxIdFn type AwaitTxIdFn = (txId, timeout?) => Promise; ``` -Defined in: [packages/electric-db-collection/src/electric.ts:396](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L396) +Defined in: [packages/electric-db-collection/src/electric.ts:468](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L468) Type for the awaitTxId utility function @@ -17,7 +17,7 @@ Type for the awaitTxId utility function ### txId -[`Txid`](../Txid.md) +[`Txid`](Txid.md) ### timeout? diff --git a/docs/reference/electric-db-collection/type-aliases/Txid.md b/docs/reference/electric-db-collection/type-aliases/Txid.md index 3870788c6..7c7750aaf 100644 --- a/docs/reference/electric-db-collection/type-aliases/Txid.md +++ b/docs/reference/electric-db-collection/type-aliases/Txid.md @@ -9,6 +9,6 @@ title: Txid type Txid = number; ``` -Defined in: [packages/electric-db-collection/src/electric.ts:62](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L62) +Defined in: [packages/electric-db-collection/src/electric.ts:78](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L78) Type representing a transaction ID in ElectricSQL diff --git a/docs/reference/functions/and.md b/docs/reference/functions/and.md index b48e66633..85a7304a1 100644 --- a/docs/reference/functions/and.md +++ b/docs/reference/functions/and.md @@ -25,7 +25,7 @@ Defined in: [packages/db/src/query/builder/functions.ts:181](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> ## Call Signature @@ -54,4 +54,4 @@ Defined in: [packages/db/src/query/builder/functions.ts:185](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> diff --git a/docs/reference/functions/coalesce.md b/docs/reference/functions/coalesce.md index db59fc945..2849b63e8 100644 --- a/docs/reference/functions/coalesce.md +++ b/docs/reference/functions/coalesce.md @@ -19,4 +19,4 @@ Defined in: [packages/db/src/query/builder/functions.ts:288](https://github.com/ ## Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`any`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`any`\> diff --git a/docs/reference/functions/compileQuery.md b/docs/reference/functions/compileQuery.md index 729b5ae39..ae1e2e08a 100644 --- a/docs/reference/functions/compileQuery.md +++ b/docs/reference/functions/compileQuery.md @@ -27,19 +27,19 @@ Compiles a query IR into a D2 pipeline ### rawQuery -[`QueryIR`](../../@tanstack/namespaces/IR/interfaces/QueryIR.md) +[`QueryIR`](../@tanstack/namespaces/IR/interfaces/QueryIR.md) The query IR to compile ### inputs -`Record`\<`string`, [`KeyedStream`](../../type-aliases/KeyedStream.md)\> +`Record`\<`string`, [`KeyedStream`](../type-aliases/KeyedStream.md)\> Mapping of source aliases to input streams (e.g., `{ employee: input1, manager: input2 }`) ### collections -`Record`\<`string`, [`Collection`](../../interfaces/Collection.md)\<`any`, `any`, `any`, `any`, `any`\>\> +`Record`\<`string`, [`Collection`](../interfaces/Collection.md)\<`any`, `any`, `any`, `any`, `any`\>\> Mapping of collection IDs to Collection instances diff --git a/docs/reference/functions/concat.md b/docs/reference/functions/concat.md index 9c8edfbd6..1da806bc5 100644 --- a/docs/reference/functions/concat.md +++ b/docs/reference/functions/concat.md @@ -19,4 +19,4 @@ Defined in: [packages/db/src/query/builder/functions.ts:279](https://github.com/ ## Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`string`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`string`\> diff --git a/docs/reference/functions/count.md b/docs/reference/functions/count.md index bc82fcf79..ef1a990e9 100644 --- a/docs/reference/functions/count.md +++ b/docs/reference/functions/count.md @@ -19,4 +19,4 @@ Defined in: [packages/db/src/query/builder/functions.ts:307](https://github.com/ ## Returns -[`Aggregate`](../../@tanstack/namespaces/IR/classes/Aggregate.md)\<`number`\> +[`Aggregate`](../@tanstack/namespaces/IR/classes/Aggregate.md)\<`number`\> diff --git a/docs/reference/functions/createCollection.md b/docs/reference/functions/createCollection.md index 5c71455d2..556471744 100644 --- a/docs/reference/functions/createCollection.md +++ b/docs/reference/functions/createCollection.md @@ -31,7 +31,7 @@ The type of the key for the collection #### TUtils -`TUtils` *extends* [`UtilsRecord`](../../type-aliases/UtilsRecord.md) +`TUtils` *extends* [`UtilsRecord`](../type-aliases/UtilsRecord.md) The utilities record type @@ -39,13 +39,13 @@ The utilities record type #### options -`Omit`\<[`CollectionConfig`](../../interfaces/CollectionConfig.md)\<[`InferSchemaOutput`](../../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `T`, `TUtils`\>, `"utils"`\> & `object` & [`NonSingleResult`](../../type-aliases/NonSingleResult.md) +`Omit`\<[`CollectionConfig`](../interfaces/CollectionConfig.md)\<[`InferSchemaOutput`](../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `T`, `TUtils`\>, `"utils"`\> & `object` & [`NonSingleResult`](../type-aliases/NonSingleResult.md) Collection options with optional utilities ### Returns -[`Collection`](../../interfaces/Collection.md)\<[`InferSchemaOutput`](../../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `TUtils`, `T`, [`InferSchemaInput`](../../type-aliases/InferSchemaInput.md)\<`T`\>\> & [`NonSingleResult`](../../type-aliases/NonSingleResult.md) +[`Collection`](../interfaces/Collection.md)\<[`InferSchemaOutput`](../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `TUtils`, `T`, [`InferSchemaInput`](../type-aliases/InferSchemaInput.md)\<`T`\>\> & [`NonSingleResult`](../type-aliases/NonSingleResult.md) A new Collection with utilities exposed both at top level and under .utils @@ -140,7 +140,7 @@ The type of the key for the collection #### TUtils -`TUtils` *extends* [`UtilsRecord`](../../type-aliases/UtilsRecord.md) +`TUtils` *extends* [`UtilsRecord`](../type-aliases/UtilsRecord.md) The utilities record type @@ -148,13 +148,13 @@ The utilities record type #### options -[`CollectionConfig`](../../interfaces/CollectionConfig.md)\<[`InferSchemaOutput`](../../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `T`, `TUtils`\> & `object` & [`NonSingleResult`](../../type-aliases/NonSingleResult.md) +[`CollectionConfig`](../interfaces/CollectionConfig.md)\<[`InferSchemaOutput`](../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `T`, `TUtils`\> & `object` & [`NonSingleResult`](../type-aliases/NonSingleResult.md) Collection options with optional utilities ### Returns -[`Collection`](../../interfaces/Collection.md)\<[`InferSchemaOutput`](../../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `Exclude`\<`TUtils`, `undefined`\>, `T`, [`InferSchemaInput`](../../type-aliases/InferSchemaInput.md)\<`T`\>\> & [`NonSingleResult`](../../type-aliases/NonSingleResult.md) +[`Collection`](../interfaces/Collection.md)\<[`InferSchemaOutput`](../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `Exclude`\<`TUtils`, `undefined`\>, `T`, [`InferSchemaInput`](../type-aliases/InferSchemaInput.md)\<`T`\>\> & [`NonSingleResult`](../type-aliases/NonSingleResult.md) A new Collection with utilities exposed both at top level and under .utils @@ -249,7 +249,7 @@ The type of the key for the collection #### TUtils -`TUtils` *extends* [`UtilsRecord`](../../type-aliases/UtilsRecord.md) +`TUtils` *extends* [`UtilsRecord`](../type-aliases/UtilsRecord.md) The utilities record type @@ -257,13 +257,13 @@ The utilities record type #### options -`Omit`\<[`CollectionConfig`](../../interfaces/CollectionConfig.md)\<[`InferSchemaOutput`](../../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `T`, `TUtils`\>, `"utils"`\> & `object` & [`SingleResult`](../../type-aliases/SingleResult.md) +`Omit`\<[`CollectionConfig`](../interfaces/CollectionConfig.md)\<[`InferSchemaOutput`](../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `T`, `TUtils`\>, `"utils"`\> & `object` & [`SingleResult`](../type-aliases/SingleResult.md) Collection options with optional utilities ### Returns -[`Collection`](../../interfaces/Collection.md)\<[`InferSchemaOutput`](../../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `TUtils`, `T`, [`InferSchemaInput`](../../type-aliases/InferSchemaInput.md)\<`T`\>\> & [`SingleResult`](../../type-aliases/SingleResult.md) +[`Collection`](../interfaces/Collection.md)\<[`InferSchemaOutput`](../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `TUtils`, `T`, [`InferSchemaInput`](../type-aliases/InferSchemaInput.md)\<`T`\>\> & [`SingleResult`](../type-aliases/SingleResult.md) A new Collection with utilities exposed both at top level and under .utils @@ -358,7 +358,7 @@ The type of the key for the collection #### TUtils -`TUtils` *extends* [`UtilsRecord`](../../type-aliases/UtilsRecord.md) +`TUtils` *extends* [`UtilsRecord`](../type-aliases/UtilsRecord.md) The utilities record type @@ -366,13 +366,13 @@ The utilities record type #### options -[`CollectionConfig`](../../interfaces/CollectionConfig.md)\<[`InferSchemaOutput`](../../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `T`, `TUtils`\> & `object` & [`SingleResult`](../../type-aliases/SingleResult.md) +[`CollectionConfig`](../interfaces/CollectionConfig.md)\<[`InferSchemaOutput`](../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `T`, `TUtils`\> & `object` & [`SingleResult`](../type-aliases/SingleResult.md) Collection options with optional utilities ### Returns -[`Collection`](../../interfaces/Collection.md)\<[`InferSchemaOutput`](../../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `TUtils`, `T`, [`InferSchemaInput`](../../type-aliases/InferSchemaInput.md)\<`T`\>\> & [`SingleResult`](../../type-aliases/SingleResult.md) +[`Collection`](../interfaces/Collection.md)\<[`InferSchemaOutput`](../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `TUtils`, `T`, [`InferSchemaInput`](../type-aliases/InferSchemaInput.md)\<`T`\>\> & [`SingleResult`](../type-aliases/SingleResult.md) A new Collection with utilities exposed both at top level and under .utils @@ -467,7 +467,7 @@ The type of the key for the collection #### TUtils -`TUtils` *extends* [`UtilsRecord`](../../type-aliases/UtilsRecord.md) +`TUtils` *extends* [`UtilsRecord`](../type-aliases/UtilsRecord.md) The utilities record type @@ -475,13 +475,13 @@ The utilities record type #### options -`Omit`\<[`CollectionConfig`](../../interfaces/CollectionConfig.md)\<`T`, `TKey`, `never`, `TUtils`\>, `"utils"`\> & `object` & [`NonSingleResult`](../../type-aliases/NonSingleResult.md) +`Omit`\<[`CollectionConfig`](../interfaces/CollectionConfig.md)\<`T`, `TKey`, `never`, `TUtils`\>, `"utils"`\> & `object` & [`NonSingleResult`](../type-aliases/NonSingleResult.md) Collection options with optional utilities ### Returns -[`Collection`](../../interfaces/Collection.md)\<`T`, `TKey`, `TUtils`, `never`, `T`\> & [`NonSingleResult`](../../type-aliases/NonSingleResult.md) +[`Collection`](../interfaces/Collection.md)\<`T`, `TKey`, `TUtils`, `never`, `T`\> & [`NonSingleResult`](../type-aliases/NonSingleResult.md) A new Collection with utilities exposed both at top level and under .utils @@ -576,7 +576,7 @@ The type of the key for the collection #### TUtils -`TUtils` *extends* [`UtilsRecord`](../../type-aliases/UtilsRecord.md) = [`UtilsRecord`](../../type-aliases/UtilsRecord.md) +`TUtils` *extends* [`UtilsRecord`](../type-aliases/UtilsRecord.md) = [`UtilsRecord`](../type-aliases/UtilsRecord.md) The utilities record type @@ -584,13 +584,13 @@ The utilities record type #### options -[`CollectionConfig`](../../interfaces/CollectionConfig.md)\<`T`, `TKey`, `never`, `TUtils`\> & `object` & [`NonSingleResult`](../../type-aliases/NonSingleResult.md) +[`CollectionConfig`](../interfaces/CollectionConfig.md)\<`T`, `TKey`, `never`, `TUtils`\> & `object` & [`NonSingleResult`](../type-aliases/NonSingleResult.md) Collection options with optional utilities ### Returns -[`Collection`](../../interfaces/Collection.md)\<`T`, `TKey`, `TUtils`, `never`, `T`\> & [`NonSingleResult`](../../type-aliases/NonSingleResult.md) +[`Collection`](../interfaces/Collection.md)\<`T`, `TKey`, `TUtils`, `never`, `T`\> & [`NonSingleResult`](../type-aliases/NonSingleResult.md) A new Collection with utilities exposed both at top level and under .utils @@ -685,7 +685,7 @@ The type of the key for the collection #### TUtils -`TUtils` *extends* [`UtilsRecord`](../../type-aliases/UtilsRecord.md) = [`UtilsRecord`](../../type-aliases/UtilsRecord.md) +`TUtils` *extends* [`UtilsRecord`](../type-aliases/UtilsRecord.md) = [`UtilsRecord`](../type-aliases/UtilsRecord.md) The utilities record type @@ -693,13 +693,13 @@ The utilities record type #### options -`Omit`\<[`CollectionConfig`](../../interfaces/CollectionConfig.md)\<`T`, `TKey`, `never`, `TUtils`\>, `"utils"`\> & `object` & [`SingleResult`](../../type-aliases/SingleResult.md) +`Omit`\<[`CollectionConfig`](../interfaces/CollectionConfig.md)\<`T`, `TKey`, `never`, `TUtils`\>, `"utils"`\> & `object` & [`SingleResult`](../type-aliases/SingleResult.md) Collection options with optional utilities ### Returns -[`Collection`](../../interfaces/Collection.md)\<`T`, `TKey`, `TUtils`, `never`, `T`\> & [`SingleResult`](../../type-aliases/SingleResult.md) +[`Collection`](../interfaces/Collection.md)\<`T`, `TKey`, `TUtils`, `never`, `T`\> & [`SingleResult`](../type-aliases/SingleResult.md) A new Collection with utilities exposed both at top level and under .utils @@ -794,7 +794,7 @@ The type of the key for the collection #### TUtils -`TUtils` *extends* [`UtilsRecord`](../../type-aliases/UtilsRecord.md) = [`UtilsRecord`](../../type-aliases/UtilsRecord.md) +`TUtils` *extends* [`UtilsRecord`](../type-aliases/UtilsRecord.md) = [`UtilsRecord`](../type-aliases/UtilsRecord.md) The utilities record type @@ -802,13 +802,13 @@ The utilities record type #### options -[`CollectionConfig`](../../interfaces/CollectionConfig.md)\<`T`, `TKey`, `never`, `TUtils`\> & `object` & [`SingleResult`](../../type-aliases/SingleResult.md) +[`CollectionConfig`](../interfaces/CollectionConfig.md)\<`T`, `TKey`, `never`, `TUtils`\> & `object` & [`SingleResult`](../type-aliases/SingleResult.md) Collection options with optional utilities ### Returns -[`Collection`](../../interfaces/Collection.md)\<`T`, `TKey`, `TUtils`, `never`, `T`\> & [`SingleResult`](../../type-aliases/SingleResult.md) +[`Collection`](../interfaces/Collection.md)\<`T`, `TKey`, `TUtils`, `never`, `T`\> & [`SingleResult`](../type-aliases/SingleResult.md) A new Collection with utilities exposed both at top level and under .utils diff --git a/docs/reference/functions/createLiveQueryCollection.md b/docs/reference/functions/createLiveQueryCollection.md index b35008dc4..55db713f5 100644 --- a/docs/reference/functions/createLiveQueryCollection.md +++ b/docs/reference/functions/createLiveQueryCollection.md @@ -20,7 +20,7 @@ Creates a live query collection directly #### TContext -`TContext` *extends* [`Context`](../../interfaces/Context.md) +`TContext` *extends* [`Context`](../interfaces/Context.md) #### TResult @@ -30,7 +30,7 @@ Creates a live query collection directly #### query -(`q`) => [`QueryBuilder`](../../type-aliases/QueryBuilder.md)\<`TContext`\> +(`q`) => [`QueryBuilder`](../type-aliases/QueryBuilder.md)\<`TContext`\> ### Returns @@ -83,7 +83,7 @@ Creates a live query collection directly #### TContext -`TContext` *extends* [`Context`](../../interfaces/Context.md) +`TContext` *extends* [`Context`](../interfaces/Context.md) #### TResult @@ -91,14 +91,14 @@ Creates a live query collection directly #### TUtils -`TUtils` *extends* [`UtilsRecord`](../../type-aliases/UtilsRecord.md) = \{ +`TUtils` *extends* [`UtilsRecord`](../type-aliases/UtilsRecord.md) = \{ \} ### Parameters #### config -[`LiveQueryCollectionConfig`](../../interfaces/LiveQueryCollectionConfig.md)\<`TContext`, `TResult`\> & `object` +[`LiveQueryCollectionConfig`](../interfaces/LiveQueryCollectionConfig.md)\<`TContext`, `TResult`\> & `object` ### Returns diff --git a/docs/reference/functions/createOptimisticAction.md b/docs/reference/functions/createOptimisticAction.md index bb19c9432..f01ae27db 100644 --- a/docs/reference/functions/createOptimisticAction.md +++ b/docs/reference/functions/createOptimisticAction.md @@ -35,7 +35,7 @@ The type of variables that will be passed to the action function ### options -[`CreateOptimisticActionsOptions`](../../interfaces/CreateOptimisticActionsOptions.md)\<`TVariables`\> +[`CreateOptimisticActionsOptions`](../interfaces/CreateOptimisticActionsOptions.md)\<`TVariables`\> Configuration options for the optimistic action @@ -55,7 +55,7 @@ A function that accepts variables of type TVariables and returns a Transaction ### Returns -[`Transaction`](../../interfaces/Transaction.md) +[`Transaction`](../interfaces/Transaction.md) ## Example diff --git a/docs/reference/functions/createPacedMutations.md b/docs/reference/functions/createPacedMutations.md index 7418b828e..a51bd3a51 100644 --- a/docs/reference/functions/createPacedMutations.md +++ b/docs/reference/functions/createPacedMutations.md @@ -36,7 +36,7 @@ or to handle errors. ### config -[`PacedMutationsConfig`](../../interfaces/PacedMutationsConfig.md)\<`TVariables`, `T`\> +[`PacedMutationsConfig`](../interfaces/PacedMutationsConfig.md)\<`TVariables`, `T`\> Configuration including onMutate, mutationFn and strategy @@ -56,7 +56,7 @@ A function that accepts variables and returns a Transaction ### Returns -[`Transaction`](../../interfaces/Transaction.md)\<`T`\> +[`Transaction`](../interfaces/Transaction.md)\<`T`\> ## Examples diff --git a/docs/reference/functions/createTransaction.md b/docs/reference/functions/createTransaction.md index 5309fffcf..e1207af82 100644 --- a/docs/reference/functions/createTransaction.md +++ b/docs/reference/functions/createTransaction.md @@ -23,13 +23,13 @@ Creates a new transaction for grouping multiple collection operations ### config -[`TransactionConfig`](../../interfaces/TransactionConfig.md)\<`T`\> +[`TransactionConfig`](../interfaces/TransactionConfig.md)\<`T`\> Transaction configuration with mutation function ## Returns -[`Transaction`](../../interfaces/Transaction.md)\<`T`\> +[`Transaction`](../interfaces/Transaction.md)\<`T`\> A new Transaction instance diff --git a/docs/reference/functions/debounceStrategy.md b/docs/reference/functions/debounceStrategy.md index 44e016bee..cb38e9688 100644 --- a/docs/reference/functions/debounceStrategy.md +++ b/docs/reference/functions/debounceStrategy.md @@ -21,13 +21,13 @@ to wait for the user to stop typing before persisting changes. ### options -[`DebounceStrategyOptions`](../../interfaces/DebounceStrategyOptions.md) +[`DebounceStrategyOptions`](../interfaces/DebounceStrategyOptions.md) Configuration for the debounce behavior ## Returns -[`DebounceStrategy`](../../interfaces/DebounceStrategy.md) +[`DebounceStrategy`](../interfaces/DebounceStrategy.md) A debounce strategy instance diff --git a/docs/reference/functions/deepEquals.md b/docs/reference/functions/deepEquals.md new file mode 100644 index 000000000..c95964693 --- /dev/null +++ b/docs/reference/functions/deepEquals.md @@ -0,0 +1,45 @@ +--- +id: deepEquals +title: deepEquals +--- + +# Function: deepEquals() + +```ts +function deepEquals(a, b): boolean; +``` + +Defined in: [packages/db/src/utils.ts:29](https://github.com/TanStack/db/blob/main/packages/db/src/utils.ts#L29) + +Deep equality function that compares two values recursively +Handles primitives, objects, arrays, Date, RegExp, Map, Set, TypedArrays, and Temporal objects + +## Parameters + +### a + +`any` + +First value to compare + +### b + +`any` + +Second value to compare + +## Returns + +`boolean` + +True if the values are deeply equal, false otherwise + +## Example + +```typescript +deepEquals({ a: 1, b: 2 }, { b: 2, a: 1 }) // true (property order doesn't matter) +deepEquals([1, { x: 2 }], [1, { x: 2 }]) // true +deepEquals({ a: 1 }, { a: 2 }) // false +deepEquals(new Date('2023-01-01'), new Date('2023-01-01')) // true +deepEquals(new Map([['a', 1]]), new Map([['a', 1]])) // true +``` diff --git a/docs/reference/functions/eq.md b/docs/reference/functions/eq.md index 0199b5da1..8890c3eac 100644 --- a/docs/reference/functions/eq.md +++ b/docs/reference/functions/eq.md @@ -31,7 +31,7 @@ Defined in: [packages/db/src/query/builder/functions.ts:115](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> ## Call Signature @@ -59,7 +59,7 @@ Defined in: [packages/db/src/query/builder/functions.ts:119](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> ## Call Signature @@ -79,7 +79,7 @@ Defined in: [packages/db/src/query/builder/functions.ts:123](https://github.com/ #### left -[`Aggregate`](../../@tanstack/namespaces/IR/classes/Aggregate.md)\<`T`\> +[`Aggregate`](../@tanstack/namespaces/IR/classes/Aggregate.md)\<`T`\> #### right @@ -87,4 +87,4 @@ Defined in: [packages/db/src/query/builder/functions.ts:123](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> diff --git a/docs/reference/functions/extractFieldPath.md b/docs/reference/functions/extractFieldPath.md index 4e12e218e..1738e66db 100644 --- a/docs/reference/functions/extractFieldPath.md +++ b/docs/reference/functions/extractFieldPath.md @@ -24,7 +24,7 @@ The expression to extract from ## Returns -[`FieldPath`](../../type-aliases/FieldPath.md) \| `null` +[`FieldPath`](../type-aliases/FieldPath.md) \| `null` The field path array, or null diff --git a/docs/reference/functions/extractSimpleComparisons.md b/docs/reference/functions/extractSimpleComparisons.md index 282214367..39c3ff0db 100644 --- a/docs/reference/functions/extractSimpleComparisons.md +++ b/docs/reference/functions/extractSimpleComparisons.md @@ -29,7 +29,7 @@ The WHERE expression to parse ## Returns -[`SimpleComparison`](../../interfaces/SimpleComparison.md)[] +[`SimpleComparison`](../interfaces/SimpleComparison.md)[] Array of simple comparisons diff --git a/docs/reference/functions/getActiveTransaction.md b/docs/reference/functions/getActiveTransaction.md index 31ac09e1c..b1488c8d0 100644 --- a/docs/reference/functions/getActiveTransaction.md +++ b/docs/reference/functions/getActiveTransaction.md @@ -18,7 +18,7 @@ Used internally by collection operations to join existing transactions ## Returns - \| [`Transaction`](../../interfaces/Transaction.md)\<`Record`\<`string`, `unknown`\>\> + \| [`Transaction`](../interfaces/Transaction.md)\<`Record`\<`string`, `unknown`\>\> \| `undefined` The active transaction or undefined if none is active diff --git a/docs/reference/functions/gt.md b/docs/reference/functions/gt.md index 050c7712c..7a6cb1589 100644 --- a/docs/reference/functions/gt.md +++ b/docs/reference/functions/gt.md @@ -31,7 +31,7 @@ Defined in: [packages/db/src/query/builder/functions.ts:128](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> ## Call Signature @@ -59,7 +59,7 @@ Defined in: [packages/db/src/query/builder/functions.ts:132](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> ## Call Signature @@ -79,7 +79,7 @@ Defined in: [packages/db/src/query/builder/functions.ts:136](https://github.com/ #### left -[`Aggregate`](../../@tanstack/namespaces/IR/classes/Aggregate.md)\<`T`\> +[`Aggregate`](../@tanstack/namespaces/IR/classes/Aggregate.md)\<`T`\> #### right @@ -87,4 +87,4 @@ Defined in: [packages/db/src/query/builder/functions.ts:136](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> diff --git a/docs/reference/functions/gte.md b/docs/reference/functions/gte.md index 7a6798a69..6a5f0c6e8 100644 --- a/docs/reference/functions/gte.md +++ b/docs/reference/functions/gte.md @@ -31,7 +31,7 @@ Defined in: [packages/db/src/query/builder/functions.ts:141](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> ## Call Signature @@ -59,7 +59,7 @@ Defined in: [packages/db/src/query/builder/functions.ts:145](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> ## Call Signature @@ -79,7 +79,7 @@ Defined in: [packages/db/src/query/builder/functions.ts:149](https://github.com/ #### left -[`Aggregate`](../../@tanstack/namespaces/IR/classes/Aggregate.md)\<`T`\> +[`Aggregate`](../@tanstack/namespaces/IR/classes/Aggregate.md)\<`T`\> #### right @@ -87,4 +87,4 @@ Defined in: [packages/db/src/query/builder/functions.ts:149](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> diff --git a/docs/reference/functions/ilike.md b/docs/reference/functions/ilike.md index 989b7e9f5..7f422aa0c 100644 --- a/docs/reference/functions/ilike.md +++ b/docs/reference/functions/ilike.md @@ -23,4 +23,4 @@ Defined in: [packages/db/src/query/builder/functions.ts:252](https://github.com/ ## Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> diff --git a/docs/reference/functions/inArray.md b/docs/reference/functions/inArray.md index c48e33a81..5f93c467b 100644 --- a/docs/reference/functions/inArray.md +++ b/docs/reference/functions/inArray.md @@ -23,4 +23,4 @@ Defined in: [packages/db/src/query/builder/functions.ts:237](https://github.com/ ## Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> diff --git a/docs/reference/functions/isLimitSubset.md b/docs/reference/functions/isLimitSubset.md index ac464fcb2..5578b4b24 100644 --- a/docs/reference/functions/isLimitSubset.md +++ b/docs/reference/functions/isLimitSubset.md @@ -9,11 +9,14 @@ title: isLimitSubset function isLimitSubset(subset, superset): boolean; ``` -Defined in: [packages/db/src/query/predicate-utils.ts:768](https://github.com/TanStack/db/blob/main/packages/db/src/query/predicate-utils.ts#L768) +Defined in: [packages/db/src/query/predicate-utils.ts:771](https://github.com/TanStack/db/blob/main/packages/db/src/query/predicate-utils.ts#L771) Check if one limit is a subset of another. Returns true if the subset limit requirements are satisfied by the superset limit. +Note: This function does NOT consider offset. For offset-aware subset checking, +use `isOffsetLimitSubset` instead. + ## Parameters ### subset diff --git a/docs/reference/functions/isNull.md b/docs/reference/functions/isNull.md index 704ae7f33..3b7576a6f 100644 --- a/docs/reference/functions/isNull.md +++ b/docs/reference/functions/isNull.md @@ -19,4 +19,4 @@ Defined in: [packages/db/src/query/builder/functions.ts:233](https://github.com/ ## Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> diff --git a/docs/reference/functions/isOffsetLimitSubset.md b/docs/reference/functions/isOffsetLimitSubset.md new file mode 100644 index 000000000..0844f2a99 --- /dev/null +++ b/docs/reference/functions/isOffsetLimitSubset.md @@ -0,0 +1,63 @@ +--- +id: isOffsetLimitSubset +title: isOffsetLimitSubset +--- + +# Function: isOffsetLimitSubset() + +```ts +function isOffsetLimitSubset(subset, superset): boolean; +``` + +Defined in: [packages/db/src/query/predicate-utils.ts:811](https://github.com/TanStack/db/blob/main/packages/db/src/query/predicate-utils.ts#L811) + +Check if one offset+limit range is a subset of another. +Returns true if the subset range is fully contained within the superset range. + +A query with `{limit: 10, offset: 0}` loads rows [0, 10). +A query with `{limit: 10, offset: 20}` loads rows [20, 30). + +For subset to be satisfied by superset: +- Superset must start at or before subset (superset.offset <= subset.offset) +- Superset must end at or after subset (superset.offset + superset.limit >= subset.offset + subset.limit) + +## Parameters + +### subset + +The offset+limit requirements to check + +#### limit? + +`number` + +#### offset? + +`number` + +### superset + +The offset+limit that might satisfy the requirements + +#### limit? + +`number` + +#### offset? + +`number` + +## Returns + +`boolean` + +true if subset range is fully contained within superset range + +## Example + +```ts +isOffsetLimitSubset({ offset: 0, limit: 5 }, { offset: 0, limit: 10 }) // true +isOffsetLimitSubset({ offset: 5, limit: 5 }, { offset: 0, limit: 10 }) // true (rows 5-9 within 0-9) +isOffsetLimitSubset({ offset: 5, limit: 10 }, { offset: 0, limit: 10 }) // false (rows 5-14 exceed 0-9) +isOffsetLimitSubset({ offset: 20, limit: 10 }, { offset: 0, limit: 10 }) // false (rows 20-29 outside 0-9) +``` diff --git a/docs/reference/functions/isOrderBySubset.md b/docs/reference/functions/isOrderBySubset.md index 0a23a6505..525dbacc9 100644 --- a/docs/reference/functions/isOrderBySubset.md +++ b/docs/reference/functions/isOrderBySubset.md @@ -20,13 +20,13 @@ Returns true if the subset ordering requirements are satisfied by the superset o The ordering requirements to check -[`OrderBy`](../../@tanstack/namespaces/IR/type-aliases/OrderBy.md) | `undefined` +[`OrderBy`](../@tanstack/namespaces/IR/type-aliases/OrderBy.md) | `undefined` ### superset The ordering that might satisfy the requirements -[`OrderBy`](../../@tanstack/namespaces/IR/type-aliases/OrderBy.md) | `undefined` +[`OrderBy`](../@tanstack/namespaces/IR/type-aliases/OrderBy.md) | `undefined` ## Returns diff --git a/docs/reference/functions/isPredicateSubset.md b/docs/reference/functions/isPredicateSubset.md index d898b144d..78d107235 100644 --- a/docs/reference/functions/isPredicateSubset.md +++ b/docs/reference/functions/isPredicateSubset.md @@ -9,22 +9,22 @@ title: isPredicateSubset function isPredicateSubset(subset, superset): boolean; ``` -Defined in: [packages/db/src/query/predicate-utils.ts:801](https://github.com/TanStack/db/blob/main/packages/db/src/query/predicate-utils.ts#L801) +Defined in: [packages/db/src/query/predicate-utils.ts:854](https://github.com/TanStack/db/blob/main/packages/db/src/query/predicate-utils.ts#L854) -Check if one predicate (where + orderBy + limit) is a subset of another. +Check if one predicate (where + orderBy + limit + offset) is a subset of another. Returns true if all aspects of the subset predicate are satisfied by the superset. ## Parameters ### subset -[`LoadSubsetOptions`](../../type-aliases/LoadSubsetOptions.md) +[`LoadSubsetOptions`](../type-aliases/LoadSubsetOptions.md) The predicate requirements to check ### superset -[`LoadSubsetOptions`](../../type-aliases/LoadSubsetOptions.md) +[`LoadSubsetOptions`](../type-aliases/LoadSubsetOptions.md) The predicate that might satisfy the requirements diff --git a/docs/reference/functions/isUndefined.md b/docs/reference/functions/isUndefined.md index 0862c3cc9..8924d9cd1 100644 --- a/docs/reference/functions/isUndefined.md +++ b/docs/reference/functions/isUndefined.md @@ -19,4 +19,4 @@ Defined in: [packages/db/src/query/builder/functions.ts:229](https://github.com/ ## Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> diff --git a/docs/reference/functions/isWhereSubset.md b/docs/reference/functions/isWhereSubset.md index 3c68dc250..4817c778e 100644 --- a/docs/reference/functions/isWhereSubset.md +++ b/docs/reference/functions/isWhereSubset.md @@ -20,13 +20,13 @@ Returns true if the subset predicate is more restrictive than (or equal to) the The potentially more restrictive predicate -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> | `undefined` +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> | `undefined` ### superset The potentially less restrictive predicate -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> | `undefined` +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> | `undefined` ## Returns diff --git a/docs/reference/functions/like.md b/docs/reference/functions/like.md index d94a428d4..fdaa7fc93 100644 --- a/docs/reference/functions/like.md +++ b/docs/reference/functions/like.md @@ -23,4 +23,4 @@ Defined in: [packages/db/src/query/builder/functions.ts:244](https://github.com/ ## Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> diff --git a/docs/reference/functions/liveQueryCollectionOptions.md b/docs/reference/functions/liveQueryCollectionOptions.md index 20b266568..43427f374 100644 --- a/docs/reference/functions/liveQueryCollectionOptions.md +++ b/docs/reference/functions/liveQueryCollectionOptions.md @@ -18,7 +18,7 @@ Creates live query collection options for use with createCollection ### TContext -`TContext` *extends* [`Context`](../../interfaces/Context.md) +`TContext` *extends* [`Context`](../interfaces/Context.md) ### TResult @@ -28,7 +28,7 @@ Creates live query collection options for use with createCollection ### config -[`LiveQueryCollectionConfig`](../../interfaces/LiveQueryCollectionConfig.md)\<`TContext`, `TResult`\> +[`LiveQueryCollectionConfig`](../interfaces/LiveQueryCollectionConfig.md)\<`TContext`, `TResult`\> Configuration options for the live query collection diff --git a/docs/reference/functions/localOnlyCollectionOptions.md b/docs/reference/functions/localOnlyCollectionOptions.md index f473f9599..06ea87aff 100644 --- a/docs/reference/functions/localOnlyCollectionOptions.md +++ b/docs/reference/functions/localOnlyCollectionOptions.md @@ -43,13 +43,13 @@ The type of the key returned by getKey #### config -[`LocalOnlyCollectionConfig`](../../interfaces/LocalOnlyCollectionConfig.md)\<[`InferSchemaOutput`](../../type-aliases/InferSchemaOutput.md)\<`T`\>, `T`, `TKey`\> & `object` +[`LocalOnlyCollectionConfig`](../interfaces/LocalOnlyCollectionConfig.md)\<[`InferSchemaOutput`](../type-aliases/InferSchemaOutput.md)\<`T`\>, `T`, `TKey`\> & `object` Configuration options for the Local-only collection ### Returns -[`CollectionConfig`](../../interfaces/CollectionConfig.md)\<[`InferSchemaOutput`](../../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `T`, [`UtilsRecord`](../../type-aliases/UtilsRecord.md)\> & `object` & `object` +[`CollectionConfig`](../interfaces/CollectionConfig.md)\<[`InferSchemaOutput`](../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `T`, [`UtilsRecord`](../type-aliases/UtilsRecord.md)\> & `object` & `object` Collection options with utilities including acceptMutations @@ -155,13 +155,13 @@ The type of the key returned by getKey #### config -[`LocalOnlyCollectionConfig`](../../interfaces/LocalOnlyCollectionConfig.md)\<`T`, `never`, `TKey`\> & `object` +[`LocalOnlyCollectionConfig`](../interfaces/LocalOnlyCollectionConfig.md)\<`T`, `never`, `TKey`\> & `object` Configuration options for the Local-only collection ### Returns -[`CollectionConfig`](../../interfaces/CollectionConfig.md)\<`T`, `TKey`, `never`, [`UtilsRecord`](../../type-aliases/UtilsRecord.md)\> & `object` & `object` +[`CollectionConfig`](../interfaces/CollectionConfig.md)\<`T`, `TKey`, `never`, [`UtilsRecord`](../type-aliases/UtilsRecord.md)\> & `object` & `object` Collection options with utilities including acceptMutations diff --git a/docs/reference/functions/localStorageCollectionOptions.md b/docs/reference/functions/localStorageCollectionOptions.md index 48e42965d..6ea5ecad0 100644 --- a/docs/reference/functions/localStorageCollectionOptions.md +++ b/docs/reference/functions/localStorageCollectionOptions.md @@ -46,13 +46,13 @@ don't participate in the standard mutation handler flow for manual transactions. #### config -[`LocalStorageCollectionConfig`](../../interfaces/LocalStorageCollectionConfig.md)\<[`InferSchemaOutput`](../../type-aliases/InferSchemaOutput.md)\<`T`\>, `T`, `TKey`\> & `object` +[`LocalStorageCollectionConfig`](../interfaces/LocalStorageCollectionConfig.md)\<[`InferSchemaOutput`](../type-aliases/InferSchemaOutput.md)\<`T`\>, `T`, `TKey`\> & `object` Configuration options for the localStorage collection ### Returns -[`CollectionConfig`](../../interfaces/CollectionConfig.md)\<[`InferSchemaOutput`](../../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `T`, [`LocalStorageCollectionUtils`](../../interfaces/LocalStorageCollectionUtils.md)\> & `object` +[`CollectionConfig`](../interfaces/CollectionConfig.md)\<[`InferSchemaOutput`](../type-aliases/InferSchemaOutput.md)\<`T`\>, `TKey`, `T`, [`LocalStorageCollectionUtils`](../interfaces/LocalStorageCollectionUtils.md)\> & `object` Collection options with utilities including clearStorage, getStorageSize, and acceptMutations @@ -161,13 +161,13 @@ don't participate in the standard mutation handler flow for manual transactions. #### config -[`LocalStorageCollectionConfig`](../../interfaces/LocalStorageCollectionConfig.md)\<`T`, `never`, `TKey`\> & `object` +[`LocalStorageCollectionConfig`](../interfaces/LocalStorageCollectionConfig.md)\<`T`, `never`, `TKey`\> & `object` Configuration options for the localStorage collection ### Returns -[`CollectionConfig`](../../interfaces/CollectionConfig.md)\<`T`, `TKey`, `never`, [`LocalStorageCollectionUtils`](../../interfaces/LocalStorageCollectionUtils.md)\> & `object` +[`CollectionConfig`](../interfaces/CollectionConfig.md)\<`T`, `TKey`, `never`, [`LocalStorageCollectionUtils`](../interfaces/LocalStorageCollectionUtils.md)\> & `object` Collection options with utilities including clearStorage, getStorageSize, and acceptMutations diff --git a/docs/reference/functions/lt.md b/docs/reference/functions/lt.md index b7cbe7e61..b7c95cdf7 100644 --- a/docs/reference/functions/lt.md +++ b/docs/reference/functions/lt.md @@ -31,7 +31,7 @@ Defined in: [packages/db/src/query/builder/functions.ts:154](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> ## Call Signature @@ -59,7 +59,7 @@ Defined in: [packages/db/src/query/builder/functions.ts:158](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> ## Call Signature @@ -79,7 +79,7 @@ Defined in: [packages/db/src/query/builder/functions.ts:162](https://github.com/ #### left -[`Aggregate`](../../@tanstack/namespaces/IR/classes/Aggregate.md)\<`T`\> +[`Aggregate`](../@tanstack/namespaces/IR/classes/Aggregate.md)\<`T`\> #### right @@ -87,4 +87,4 @@ Defined in: [packages/db/src/query/builder/functions.ts:162](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> diff --git a/docs/reference/functions/lte.md b/docs/reference/functions/lte.md index 25db4b12f..d71cacef0 100644 --- a/docs/reference/functions/lte.md +++ b/docs/reference/functions/lte.md @@ -31,7 +31,7 @@ Defined in: [packages/db/src/query/builder/functions.ts:167](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> ## Call Signature @@ -59,7 +59,7 @@ Defined in: [packages/db/src/query/builder/functions.ts:171](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> ## Call Signature @@ -79,7 +79,7 @@ Defined in: [packages/db/src/query/builder/functions.ts:175](https://github.com/ #### left -[`Aggregate`](../../@tanstack/namespaces/IR/classes/Aggregate.md)\<`T`\> +[`Aggregate`](../@tanstack/namespaces/IR/classes/Aggregate.md)\<`T`\> #### right @@ -87,4 +87,4 @@ Defined in: [packages/db/src/query/builder/functions.ts:175](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> diff --git a/docs/reference/functions/minusWherePredicates.md b/docs/reference/functions/minusWherePredicates.md index e5e33e6c7..d86b411df 100644 --- a/docs/reference/functions/minusWherePredicates.md +++ b/docs/reference/functions/minusWherePredicates.md @@ -23,17 +23,17 @@ Returns the simplified predicate, or null if the difference cannot be simplified The predicate to subtract from -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> | `undefined` +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> | `undefined` ### subtractPredicate The predicate to subtract -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> | `undefined` +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> | `undefined` ## Returns - \| [`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> + \| [`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> \| `null` The simplified difference, or null if cannot be simplified diff --git a/docs/reference/functions/not.md b/docs/reference/functions/not.md index d0bab9aff..3a5214236 100644 --- a/docs/reference/functions/not.md +++ b/docs/reference/functions/not.md @@ -19,4 +19,4 @@ Defined in: [packages/db/src/query/builder/functions.ts:224](https://github.com/ ## Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> diff --git a/docs/reference/functions/or.md b/docs/reference/functions/or.md index 11e471f9e..351e72ce8 100644 --- a/docs/reference/functions/or.md +++ b/docs/reference/functions/or.md @@ -25,7 +25,7 @@ Defined in: [packages/db/src/query/builder/functions.ts:203](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> ## Call Signature @@ -54,4 +54,4 @@ Defined in: [packages/db/src/query/builder/functions.ts:207](https://github.com/ ### Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> diff --git a/docs/reference/functions/parseLoadSubsetOptions.md b/docs/reference/functions/parseLoadSubsetOptions.md index 880c34177..40e850e7f 100644 --- a/docs/reference/functions/parseLoadSubsetOptions.md +++ b/docs/reference/functions/parseLoadSubsetOptions.md @@ -22,7 +22,7 @@ The LoadSubsetOptions from ctx.meta \{ `limit?`: `number`; -`orderBy?`: [`OrderBy`](../../@tanstack/namespaces/IR/type-aliases/OrderBy.md); +`orderBy?`: [`OrderBy`](../@tanstack/namespaces/IR/type-aliases/OrderBy.md); `where?`: `BasicExpression`\<`boolean`\>; \} | `null` | `undefined` diff --git a/docs/reference/functions/parseOrderByExpression.md b/docs/reference/functions/parseOrderByExpression.md index 13e2d77f0..2df1508c5 100644 --- a/docs/reference/functions/parseOrderByExpression.md +++ b/docs/reference/functions/parseOrderByExpression.md @@ -19,11 +19,11 @@ Parses an ORDER BY expression into a simple array of sort specifications. The ORDER BY expression array -[`OrderBy`](../../@tanstack/namespaces/IR/type-aliases/OrderBy.md) | `null` | `undefined` +[`OrderBy`](../@tanstack/namespaces/IR/type-aliases/OrderBy.md) | `null` | `undefined` ## Returns -[`ParsedOrderBy`](../../interfaces/ParsedOrderBy.md)[] +[`ParsedOrderBy`](../interfaces/ParsedOrderBy.md)[] Array of parsed order by specifications diff --git a/docs/reference/functions/parseWhereExpression.md b/docs/reference/functions/parseWhereExpression.md index a15a8f7e3..792773811 100644 --- a/docs/reference/functions/parseWhereExpression.md +++ b/docs/reference/functions/parseWhereExpression.md @@ -33,7 +33,7 @@ The WHERE expression to parse ### options -[`ParseWhereOptions`](../../interfaces/ParseWhereOptions.md)\<`T`\> +[`ParseWhereOptions`](../interfaces/ParseWhereOptions.md)\<`T`\> Configuration with handler functions for each operator diff --git a/docs/reference/functions/queueStrategy.md b/docs/reference/functions/queueStrategy.md index 8752c1746..524ca194f 100644 --- a/docs/reference/functions/queueStrategy.md +++ b/docs/reference/functions/queueStrategy.md @@ -22,13 +22,13 @@ every operation must complete in order. ### options? -[`QueueStrategyOptions`](../../interfaces/QueueStrategyOptions.md) +[`QueueStrategyOptions`](../interfaces/QueueStrategyOptions.md) Configuration for queue behavior (FIFO/LIFO, timing, size limits) ## Returns -[`QueueStrategy`](../../interfaces/QueueStrategy.md) +[`QueueStrategy`](../interfaces/QueueStrategy.md) A queue strategy instance diff --git a/docs/reference/functions/throttleStrategy.md b/docs/reference/functions/throttleStrategy.md index b9ac28644..35c7aa07e 100644 --- a/docs/reference/functions/throttleStrategy.md +++ b/docs/reference/functions/throttleStrategy.md @@ -22,13 +22,13 @@ execution timing. ### options -[`ThrottleStrategyOptions`](../../interfaces/ThrottleStrategyOptions.md) +[`ThrottleStrategyOptions`](../interfaces/ThrottleStrategyOptions.md) Configuration for throttle behavior ## Returns -[`ThrottleStrategy`](../../interfaces/ThrottleStrategy.md) +[`ThrottleStrategy`](../interfaces/ThrottleStrategy.md) A throttle strategy instance diff --git a/docs/reference/functions/unionWherePredicates.md b/docs/reference/functions/unionWherePredicates.md index eb34b9775..ffd244a1c 100644 --- a/docs/reference/functions/unionWherePredicates.md +++ b/docs/reference/functions/unionWherePredicates.md @@ -19,13 +19,13 @@ Simplifies when possible (e.g., age > 10 OR age > 20 → age > 10). ### predicates -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\>[] +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\>[] Array of where predicates to union ## Returns -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)\<`boolean`\> Combined predicate representing the union diff --git a/docs/reference/index.md b/docs/reference/index.md index a04fc672b..5f3d224ed 100644 --- a/docs/reference/index.md +++ b/docs/reference/index.md @@ -7,271 +7,278 @@ title: "@tanstack/db" ## Namespaces -- [IR](../@tanstack/namespaces/IR/index.md) +- [IR](@tanstack/namespaces/IR/index.md) ## Classes -- [AggregateFunctionNotInSelectError](../classes/AggregateFunctionNotInSelectError.md) -- [AggregateNotSupportedError](../classes/AggregateNotSupportedError.md) -- [BaseIndex](../classes/BaseIndex.md) -- [BaseQueryBuilder](../classes/BaseQueryBuilder.md) -- [BTreeIndex](../classes/BTreeIndex.md) -- [CannotCombineEmptyExpressionListError](../classes/CannotCombineEmptyExpressionListError.md) -- [CollectionConfigurationError](../classes/CollectionConfigurationError.md) -- [CollectionImpl](../classes/CollectionImpl.md) -- [CollectionInErrorStateError](../classes/CollectionInErrorStateError.md) -- [CollectionInputNotFoundError](../classes/CollectionInputNotFoundError.md) -- [CollectionIsInErrorStateError](../classes/CollectionIsInErrorStateError.md) -- [CollectionOperationError](../classes/CollectionOperationError.md) -- [CollectionRequiresConfigError](../classes/CollectionRequiresConfigError.md) -- [CollectionRequiresSyncConfigError](../classes/CollectionRequiresSyncConfigError.md) -- [CollectionStateError](../classes/CollectionStateError.md) -- [DeduplicatedLoadSubset](../classes/DeduplicatedLoadSubset.md) -- [DeleteKeyNotFoundError](../classes/DeleteKeyNotFoundError.md) -- [DistinctRequiresSelectError](../classes/DistinctRequiresSelectError.md) -- [DuplicateAliasInSubqueryError](../classes/DuplicateAliasInSubqueryError.md) -- [DuplicateDbInstanceError](../classes/DuplicateDbInstanceError.md) -- [DuplicateKeyError](../classes/DuplicateKeyError.md) -- [DuplicateKeySyncError](../classes/DuplicateKeySyncError.md) -- [EmptyReferencePathError](../classes/EmptyReferencePathError.md) -- [GroupByError](../classes/GroupByError.md) -- [HavingRequiresGroupByError](../classes/HavingRequiresGroupByError.md) -- [IndexProxy](../classes/IndexProxy.md) -- [InvalidCollectionStatusTransitionError](../classes/InvalidCollectionStatusTransitionError.md) -- [InvalidJoinCondition](../classes/InvalidJoinCondition.md) -- [InvalidJoinConditionLeftSourceError](../classes/InvalidJoinConditionLeftSourceError.md) -- [InvalidJoinConditionRightSourceError](../classes/InvalidJoinConditionRightSourceError.md) -- [InvalidJoinConditionSameSourceError](../classes/InvalidJoinConditionSameSourceError.md) -- [InvalidJoinConditionSourceMismatchError](../classes/InvalidJoinConditionSourceMismatchError.md) -- [InvalidSchemaError](../classes/InvalidSchemaError.md) -- [InvalidSourceError](../classes/InvalidSourceError.md) -- [InvalidSourceTypeError](../classes/InvalidSourceTypeError.md) -- [InvalidStorageDataFormatError](../classes/InvalidStorageDataFormatError.md) -- [InvalidStorageObjectFormatError](../classes/InvalidStorageObjectFormatError.md) -- [JoinCollectionNotFoundError](../classes/JoinCollectionNotFoundError.md) -- [JoinConditionMustBeEqualityError](../classes/JoinConditionMustBeEqualityError.md) -- [JoinError](../classes/JoinError.md) -- [KeyUpdateNotAllowedError](../classes/KeyUpdateNotAllowedError.md) -- [LazyIndexWrapper](../classes/LazyIndexWrapper.md) -- [LimitOffsetRequireOrderByError](../classes/LimitOffsetRequireOrderByError.md) -- [LocalStorageCollectionError](../classes/LocalStorageCollectionError.md) -- [MissingAliasInputsError](../classes/MissingAliasInputsError.md) -- [MissingDeleteHandlerError](../classes/MissingDeleteHandlerError.md) -- [MissingHandlerError](../classes/MissingHandlerError.md) -- [MissingInsertHandlerError](../classes/MissingInsertHandlerError.md) -- [MissingMutationFunctionError](../classes/MissingMutationFunctionError.md) -- [MissingUpdateArgumentError](../classes/MissingUpdateArgumentError.md) -- [MissingUpdateHandlerError](../classes/MissingUpdateHandlerError.md) -- [NegativeActiveSubscribersError](../classes/NegativeActiveSubscribersError.md) -- [NoKeysPassedToDeleteError](../classes/NoKeysPassedToDeleteError.md) -- [NoKeysPassedToUpdateError](../classes/NoKeysPassedToUpdateError.md) -- [NonAggregateExpressionNotInGroupByError](../classes/NonAggregateExpressionNotInGroupByError.md) -- [NonRetriableError](../classes/NonRetriableError.md) -- [NoPendingSyncTransactionCommitError](../classes/NoPendingSyncTransactionCommitError.md) -- [NoPendingSyncTransactionWriteError](../classes/NoPendingSyncTransactionWriteError.md) -- [OnlyOneSourceAllowedError](../classes/OnlyOneSourceAllowedError.md) -- [OnMutateMustBeSynchronousError](../classes/OnMutateMustBeSynchronousError.md) -- [QueryBuilderError](../classes/QueryBuilderError.md) -- [QueryCompilationError](../classes/QueryCompilationError.md) -- [QueryMustHaveFromClauseError](../classes/QueryMustHaveFromClauseError.md) -- [QueryOptimizerError](../classes/QueryOptimizerError.md) -- [SchemaMustBeSynchronousError](../classes/SchemaMustBeSynchronousError.md) -- [SchemaValidationError](../classes/SchemaValidationError.md) -- [SerializationError](../classes/SerializationError.md) -- [SetWindowRequiresOrderByError](../classes/SetWindowRequiresOrderByError.md) -- [SortedMap](../classes/SortedMap.md) -- [StorageError](../classes/StorageError.md) -- [StorageKeyRequiredError](../classes/StorageKeyRequiredError.md) -- [SubQueryMustHaveFromClauseError](../classes/SubQueryMustHaveFromClauseError.md) -- [SubscriptionNotFoundError](../classes/SubscriptionNotFoundError.md) -- [SyncCleanupError](../classes/SyncCleanupError.md) -- [SyncTransactionAlreadyCommittedError](../classes/SyncTransactionAlreadyCommittedError.md) -- [SyncTransactionAlreadyCommittedWriteError](../classes/SyncTransactionAlreadyCommittedWriteError.md) -- [TanStackDBError](../classes/TanStackDBError.md) -- [TransactionAlreadyCompletedRollbackError](../classes/TransactionAlreadyCompletedRollbackError.md) -- [TransactionError](../classes/TransactionError.md) -- [TransactionNotPendingCommitError](../classes/TransactionNotPendingCommitError.md) -- [TransactionNotPendingMutateError](../classes/TransactionNotPendingMutateError.md) -- [UndefinedKeyError](../classes/UndefinedKeyError.md) -- [UnknownExpressionTypeError](../classes/UnknownExpressionTypeError.md) -- [UnknownFunctionError](../classes/UnknownFunctionError.md) -- [UnknownHavingExpressionTypeError](../classes/UnknownHavingExpressionTypeError.md) -- [UnsupportedAggregateFunctionError](../classes/UnsupportedAggregateFunctionError.md) -- [UnsupportedFromTypeError](../classes/UnsupportedFromTypeError.md) -- [UnsupportedJoinSourceTypeError](../classes/UnsupportedJoinSourceTypeError.md) -- [UnsupportedJoinTypeError](../classes/UnsupportedJoinTypeError.md) -- [UpdateKeyNotFoundError](../classes/UpdateKeyNotFoundError.md) -- [WhereClauseConversionError](../classes/WhereClauseConversionError.md) +- [AggregateFunctionNotInSelectError](classes/AggregateFunctionNotInSelectError.md) +- [AggregateNotSupportedError](classes/AggregateNotSupportedError.md) +- [BaseIndex](classes/BaseIndex.md) +- [BaseQueryBuilder](classes/BaseQueryBuilder.md) +- [BTreeIndex](classes/BTreeIndex.md) +- [CannotCombineEmptyExpressionListError](classes/CannotCombineEmptyExpressionListError.md) +- [CollectionConfigurationError](classes/CollectionConfigurationError.md) +- [CollectionImpl](classes/CollectionImpl.md) +- [CollectionInErrorStateError](classes/CollectionInErrorStateError.md) +- [CollectionInputNotFoundError](classes/CollectionInputNotFoundError.md) +- [CollectionIsInErrorStateError](classes/CollectionIsInErrorStateError.md) +- [CollectionOperationError](classes/CollectionOperationError.md) +- [CollectionRequiresConfigError](classes/CollectionRequiresConfigError.md) +- [CollectionRequiresSyncConfigError](classes/CollectionRequiresSyncConfigError.md) +- [CollectionStateError](classes/CollectionStateError.md) +- [DeduplicatedLoadSubset](classes/DeduplicatedLoadSubset.md) +- [DeleteKeyNotFoundError](classes/DeleteKeyNotFoundError.md) +- [DistinctRequiresSelectError](classes/DistinctRequiresSelectError.md) +- [DuplicateAliasInSubqueryError](classes/DuplicateAliasInSubqueryError.md) +- [DuplicateDbInstanceError](classes/DuplicateDbInstanceError.md) +- [DuplicateKeyError](classes/DuplicateKeyError.md) +- [DuplicateKeySyncError](classes/DuplicateKeySyncError.md) +- [EmptyReferencePathError](classes/EmptyReferencePathError.md) +- [GroupByError](classes/GroupByError.md) +- [HavingRequiresGroupByError](classes/HavingRequiresGroupByError.md) +- [IndexProxy](classes/IndexProxy.md) +- [InvalidCollectionStatusTransitionError](classes/InvalidCollectionStatusTransitionError.md) +- [InvalidJoinCondition](classes/InvalidJoinCondition.md) +- [InvalidJoinConditionLeftSourceError](classes/InvalidJoinConditionLeftSourceError.md) +- [InvalidJoinConditionRightSourceError](classes/InvalidJoinConditionRightSourceError.md) +- [InvalidJoinConditionSameSourceError](classes/InvalidJoinConditionSameSourceError.md) +- [InvalidJoinConditionSourceMismatchError](classes/InvalidJoinConditionSourceMismatchError.md) +- [InvalidKeyError](classes/InvalidKeyError.md) +- [InvalidSchemaError](classes/InvalidSchemaError.md) +- [InvalidSourceError](classes/InvalidSourceError.md) +- [InvalidSourceTypeError](classes/InvalidSourceTypeError.md) +- [InvalidStorageDataFormatError](classes/InvalidStorageDataFormatError.md) +- [InvalidStorageObjectFormatError](classes/InvalidStorageObjectFormatError.md) +- [JoinCollectionNotFoundError](classes/JoinCollectionNotFoundError.md) +- [JoinConditionMustBeEqualityError](classes/JoinConditionMustBeEqualityError.md) +- [JoinError](classes/JoinError.md) +- [KeyUpdateNotAllowedError](classes/KeyUpdateNotAllowedError.md) +- [LazyIndexWrapper](classes/LazyIndexWrapper.md) +- [LimitOffsetRequireOrderByError](classes/LimitOffsetRequireOrderByError.md) +- [LocalStorageCollectionError](classes/LocalStorageCollectionError.md) +- [MissingAliasInputsError](classes/MissingAliasInputsError.md) +- [MissingDeleteHandlerError](classes/MissingDeleteHandlerError.md) +- [MissingHandlerError](classes/MissingHandlerError.md) +- [MissingInsertHandlerError](classes/MissingInsertHandlerError.md) +- [MissingMutationFunctionError](classes/MissingMutationFunctionError.md) +- [MissingUpdateArgumentError](classes/MissingUpdateArgumentError.md) +- [MissingUpdateHandlerError](classes/MissingUpdateHandlerError.md) +- [NegativeActiveSubscribersError](classes/NegativeActiveSubscribersError.md) +- [NoKeysPassedToDeleteError](classes/NoKeysPassedToDeleteError.md) +- [NoKeysPassedToUpdateError](classes/NoKeysPassedToUpdateError.md) +- [NonAggregateExpressionNotInGroupByError](classes/NonAggregateExpressionNotInGroupByError.md) +- [NonRetriableError](classes/NonRetriableError.md) +- [NoPendingSyncTransactionCommitError](classes/NoPendingSyncTransactionCommitError.md) +- [NoPendingSyncTransactionWriteError](classes/NoPendingSyncTransactionWriteError.md) +- [OnlyOneSourceAllowedError](classes/OnlyOneSourceAllowedError.md) +- [OnMutateMustBeSynchronousError](classes/OnMutateMustBeSynchronousError.md) +- [QueryBuilderError](classes/QueryBuilderError.md) +- [QueryCompilationError](classes/QueryCompilationError.md) +- [QueryMustHaveFromClauseError](classes/QueryMustHaveFromClauseError.md) +- [QueryOptimizerError](classes/QueryOptimizerError.md) +- [SchemaMustBeSynchronousError](classes/SchemaMustBeSynchronousError.md) +- [SchemaValidationError](classes/SchemaValidationError.md) +- [SerializationError](classes/SerializationError.md) +- [SetWindowRequiresOrderByError](classes/SetWindowRequiresOrderByError.md) +- [SortedMap](classes/SortedMap.md) +- [StorageError](classes/StorageError.md) +- [StorageKeyRequiredError](classes/StorageKeyRequiredError.md) +- [SubQueryMustHaveFromClauseError](classes/SubQueryMustHaveFromClauseError.md) +- [SubscriptionNotFoundError](classes/SubscriptionNotFoundError.md) +- [SyncCleanupError](classes/SyncCleanupError.md) +- [SyncTransactionAlreadyCommittedError](classes/SyncTransactionAlreadyCommittedError.md) +- [SyncTransactionAlreadyCommittedWriteError](classes/SyncTransactionAlreadyCommittedWriteError.md) +- [TanStackDBError](classes/TanStackDBError.md) +- [TransactionAlreadyCompletedRollbackError](classes/TransactionAlreadyCompletedRollbackError.md) +- [TransactionError](classes/TransactionError.md) +- [TransactionNotPendingCommitError](classes/TransactionNotPendingCommitError.md) +- [TransactionNotPendingMutateError](classes/TransactionNotPendingMutateError.md) +- [UndefinedKeyError](classes/UndefinedKeyError.md) +- [UnknownExpressionTypeError](classes/UnknownExpressionTypeError.md) +- [UnknownFunctionError](classes/UnknownFunctionError.md) +- [UnknownHavingExpressionTypeError](classes/UnknownHavingExpressionTypeError.md) +- [UnsupportedAggregateFunctionError](classes/UnsupportedAggregateFunctionError.md) +- [UnsupportedFromTypeError](classes/UnsupportedFromTypeError.md) +- [UnsupportedJoinSourceTypeError](classes/UnsupportedJoinSourceTypeError.md) +- [UnsupportedJoinTypeError](classes/UnsupportedJoinTypeError.md) +- [UpdateKeyNotFoundError](classes/UpdateKeyNotFoundError.md) +- [WhereClauseConversionError](classes/WhereClauseConversionError.md) ## Interfaces -- [BaseCollectionConfig](../interfaces/BaseCollectionConfig.md) -- [BaseStrategy](../interfaces/BaseStrategy.md) -- [BTreeIndexOptions](../interfaces/BTreeIndexOptions.md) -- [ChangeMessage](../interfaces/ChangeMessage.md) -- [Collection](../interfaces/Collection.md) -- [CollectionConfig](../interfaces/CollectionConfig.md) -- [CollectionLike](../interfaces/CollectionLike.md) -- [Context](../interfaces/Context.md) -- [CreateOptimisticActionsOptions](../interfaces/CreateOptimisticActionsOptions.md) -- [CurrentStateAsChangesOptions](../interfaces/CurrentStateAsChangesOptions.md) -- [DebounceStrategy](../interfaces/DebounceStrategy.md) -- [DebounceStrategyOptions](../interfaces/DebounceStrategyOptions.md) -- [IndexInterface](../interfaces/IndexInterface.md) -- [IndexOptions](../interfaces/IndexOptions.md) -- [IndexStats](../interfaces/IndexStats.md) -- [InsertConfig](../interfaces/InsertConfig.md) -- [LiveQueryCollectionConfig](../interfaces/LiveQueryCollectionConfig.md) -- [LocalOnlyCollectionConfig](../interfaces/LocalOnlyCollectionConfig.md) -- [LocalOnlyCollectionUtils](../interfaces/LocalOnlyCollectionUtils.md) -- [LocalStorageCollectionConfig](../interfaces/LocalStorageCollectionConfig.md) -- [LocalStorageCollectionUtils](../interfaces/LocalStorageCollectionUtils.md) -- [OperationConfig](../interfaces/OperationConfig.md) -- [OptimisticChangeMessage](../interfaces/OptimisticChangeMessage.md) -- [PacedMutationsConfig](../interfaces/PacedMutationsConfig.md) -- [ParsedOrderBy](../interfaces/ParsedOrderBy.md) -- [Parser](../interfaces/Parser.md) -- [ParseWhereOptions](../interfaces/ParseWhereOptions.md) -- [PendingMutation](../interfaces/PendingMutation.md) -- [QueueStrategy](../interfaces/QueueStrategy.md) -- [QueueStrategyOptions](../interfaces/QueueStrategyOptions.md) -- [RangeQueryOptions](../interfaces/RangeQueryOptions.md) -- [SimpleComparison](../interfaces/SimpleComparison.md) -- [SubscribeChangesOptions](../interfaces/SubscribeChangesOptions.md) -- [SubscribeChangesSnapshotOptions](../interfaces/SubscribeChangesSnapshotOptions.md) -- [Subscription](../interfaces/Subscription.md) -- [SubscriptionStatusChangeEvent](../interfaces/SubscriptionStatusChangeEvent.md) -- [SubscriptionStatusEvent](../interfaces/SubscriptionStatusEvent.md) -- [SubscriptionUnsubscribedEvent](../interfaces/SubscriptionUnsubscribedEvent.md) -- [SyncConfig](../interfaces/SyncConfig.md) -- [ThrottleStrategy](../interfaces/ThrottleStrategy.md) -- [ThrottleStrategyOptions](../interfaces/ThrottleStrategyOptions.md) -- [Transaction](../interfaces/Transaction.md) -- [TransactionConfig](../interfaces/TransactionConfig.md) +- [BaseCollectionConfig](interfaces/BaseCollectionConfig.md) +- [BaseStrategy](interfaces/BaseStrategy.md) +- [BTreeIndexOptions](interfaces/BTreeIndexOptions.md) +- [ChangeMessage](interfaces/ChangeMessage.md) +- [Collection](interfaces/Collection.md) +- [CollectionConfig](interfaces/CollectionConfig.md) +- [CollectionLike](interfaces/CollectionLike.md) +- [Context](interfaces/Context.md) +- [CreateOptimisticActionsOptions](interfaces/CreateOptimisticActionsOptions.md) +- [CurrentStateAsChangesOptions](interfaces/CurrentStateAsChangesOptions.md) +- [DebounceStrategy](interfaces/DebounceStrategy.md) +- [DebounceStrategyOptions](interfaces/DebounceStrategyOptions.md) +- [IndexInterface](interfaces/IndexInterface.md) +- [IndexOptions](interfaces/IndexOptions.md) +- [IndexStats](interfaces/IndexStats.md) +- [InsertConfig](interfaces/InsertConfig.md) +- [LiveQueryCollectionConfig](interfaces/LiveQueryCollectionConfig.md) +- [LocalOnlyCollectionConfig](interfaces/LocalOnlyCollectionConfig.md) +- [LocalOnlyCollectionUtils](interfaces/LocalOnlyCollectionUtils.md) +- [LocalStorageCollectionConfig](interfaces/LocalStorageCollectionConfig.md) +- [LocalStorageCollectionUtils](interfaces/LocalStorageCollectionUtils.md) +- [OperationConfig](interfaces/OperationConfig.md) +- [PacedMutationsConfig](interfaces/PacedMutationsConfig.md) +- [ParsedOrderBy](interfaces/ParsedOrderBy.md) +- [Parser](interfaces/Parser.md) +- [ParseWhereOptions](interfaces/ParseWhereOptions.md) +- [PendingMutation](interfaces/PendingMutation.md) +- [QueueStrategy](interfaces/QueueStrategy.md) +- [QueueStrategyOptions](interfaces/QueueStrategyOptions.md) +- [RangeQueryOptions](interfaces/RangeQueryOptions.md) +- [SimpleComparison](interfaces/SimpleComparison.md) +- [SubscribeChangesOptions](interfaces/SubscribeChangesOptions.md) +- [SubscribeChangesSnapshotOptions](interfaces/SubscribeChangesSnapshotOptions.md) +- [Subscription](interfaces/Subscription.md) +- [SubscriptionStatusChangeEvent](interfaces/SubscriptionStatusChangeEvent.md) +- [SubscriptionStatusEvent](interfaces/SubscriptionStatusEvent.md) +- [SubscriptionUnsubscribedEvent](interfaces/SubscriptionUnsubscribedEvent.md) +- [SyncConfig](interfaces/SyncConfig.md) +- [ThrottleStrategy](interfaces/ThrottleStrategy.md) +- [ThrottleStrategyOptions](interfaces/ThrottleStrategyOptions.md) +- [Transaction](interfaces/Transaction.md) +- [TransactionConfig](interfaces/TransactionConfig.md) ## Type Aliases -- [ChangeListener](../type-aliases/ChangeListener.md) -- [ChangesPayload](../type-aliases/ChangesPayload.md) -- [CleanupFn](../type-aliases/CleanupFn.md) -- [ClearStorageFn](../type-aliases/ClearStorageFn.md) -- [CollectionConfigSingleRowOption](../type-aliases/CollectionConfigSingleRowOption.md) -- [CollectionStatus](../type-aliases/CollectionStatus.md) -- [DeleteMutationFn](../type-aliases/DeleteMutationFn.md) -- [DeleteMutationFnParams](../type-aliases/DeleteMutationFnParams.md) -- [FieldPath](../type-aliases/FieldPath.md) -- [Fn](../type-aliases/Fn.md) -- [GetResult](../type-aliases/GetResult.md) -- [GetStorageSizeFn](../type-aliases/GetStorageSizeFn.md) -- [IndexConstructor](../type-aliases/IndexConstructor.md) -- [IndexOperation](../type-aliases/IndexOperation.md) -- [IndexResolver](../type-aliases/IndexResolver.md) -- [InferResultType](../type-aliases/InferResultType.md) -- [InferSchemaInput](../type-aliases/InferSchemaInput.md) -- [InferSchemaOutput](../type-aliases/InferSchemaOutput.md) -- [InitialQueryBuilder](../type-aliases/InitialQueryBuilder.md) -- [InputRow](../type-aliases/InputRow.md) -- [InsertMutationFn](../type-aliases/InsertMutationFn.md) -- [InsertMutationFnParams](../type-aliases/InsertMutationFnParams.md) -- [KeyedNamespacedRow](../type-aliases/KeyedNamespacedRow.md) -- [KeyedStream](../type-aliases/KeyedStream.md) -- [LiveQueryCollectionUtils](../type-aliases/LiveQueryCollectionUtils.md) -- [LoadSubsetFn](../type-aliases/LoadSubsetFn.md) -- [LoadSubsetOptions](../type-aliases/LoadSubsetOptions.md) -- [MaybeSingleResult](../type-aliases/MaybeSingleResult.md) -- [MutationFn](../type-aliases/MutationFn.md) -- [MutationFnParams](../type-aliases/MutationFnParams.md) -- [NamespacedAndKeyedStream](../type-aliases/NamespacedAndKeyedStream.md) -- [NamespacedRow](../type-aliases/NamespacedRow.md) -- [NonEmptyArray](../type-aliases/NonEmptyArray.md) -- [NonSingleResult](../type-aliases/NonSingleResult.md) -- [OperationType](../type-aliases/OperationType.md) -- [OperatorName](../type-aliases/OperatorName.md) -- [QueryBuilder](../type-aliases/QueryBuilder.md) -- [Ref](../type-aliases/Ref.md) -- [ResolveTransactionChanges](../type-aliases/ResolveTransactionChanges.md) -- [ResultStream](../type-aliases/ResultStream.md) -- [Row](../type-aliases/Row.md) -- [SingleResult](../type-aliases/SingleResult.md) -- [Source](../type-aliases/Source.md) -- [StandardSchema](../type-aliases/StandardSchema.md) -- [StandardSchemaAlias](../type-aliases/StandardSchemaAlias.md) -- [StorageApi](../type-aliases/StorageApi.md) -- [StorageEventApi](../type-aliases/StorageEventApi.md) -- [Strategy](../type-aliases/Strategy.md) -- [StrategyOptions](../type-aliases/StrategyOptions.md) -- [StringCollationConfig](../type-aliases/StringCollationConfig.md) -- [SubscriptionEvents](../type-aliases/SubscriptionEvents.md) -- [SubscriptionStatus](../type-aliases/SubscriptionStatus.md) -- [SyncConfigRes](../type-aliases/SyncConfigRes.md) -- [SyncMode](../type-aliases/SyncMode.md) -- [TransactionState](../type-aliases/TransactionState.md) -- [TransactionWithMutations](../type-aliases/TransactionWithMutations.md) -- [UnloadSubsetFn](../type-aliases/UnloadSubsetFn.md) -- [UpdateMutationFn](../type-aliases/UpdateMutationFn.md) -- [UpdateMutationFnParams](../type-aliases/UpdateMutationFnParams.md) -- [UtilsRecord](../type-aliases/UtilsRecord.md) -- [WritableDeep](../type-aliases/WritableDeep.md) +- [ChangeListener](type-aliases/ChangeListener.md) +- [ChangeMessageOrDeleteKeyMessage](type-aliases/ChangeMessageOrDeleteKeyMessage.md) +- [ChangesPayload](type-aliases/ChangesPayload.md) +- [CleanupFn](type-aliases/CleanupFn.md) +- [ClearStorageFn](type-aliases/ClearStorageFn.md) +- [CollectionConfigSingleRowOption](type-aliases/CollectionConfigSingleRowOption.md) +- [CollectionStatus](type-aliases/CollectionStatus.md) +- [CursorExpressions](type-aliases/CursorExpressions.md) +- [DeleteKeyMessage](type-aliases/DeleteKeyMessage.md) +- [DeleteMutationFn](type-aliases/DeleteMutationFn.md) +- [DeleteMutationFnParams](type-aliases/DeleteMutationFnParams.md) +- [FieldPath](type-aliases/FieldPath.md) +- [Fn](type-aliases/Fn.md) +- [GetResult](type-aliases/GetResult.md) +- [GetStorageSizeFn](type-aliases/GetStorageSizeFn.md) +- [IndexConstructor](type-aliases/IndexConstructor.md) +- [IndexOperation](type-aliases/IndexOperation.md) +- [IndexResolver](type-aliases/IndexResolver.md) +- [InferResultType](type-aliases/InferResultType.md) +- [InferSchemaInput](type-aliases/InferSchemaInput.md) +- [InferSchemaOutput](type-aliases/InferSchemaOutput.md) +- [InitialQueryBuilder](type-aliases/InitialQueryBuilder.md) +- [InputRow](type-aliases/InputRow.md) +- [InsertMutationFn](type-aliases/InsertMutationFn.md) +- [InsertMutationFnParams](type-aliases/InsertMutationFnParams.md) +- [KeyedNamespacedRow](type-aliases/KeyedNamespacedRow.md) +- [KeyedStream](type-aliases/KeyedStream.md) +- [LiveQueryCollectionUtils](type-aliases/LiveQueryCollectionUtils.md) +- [LoadSubsetFn](type-aliases/LoadSubsetFn.md) +- [LoadSubsetOptions](type-aliases/LoadSubsetOptions.md) +- [MakeOptional](type-aliases/MakeOptional.md) +- [MaybeSingleResult](type-aliases/MaybeSingleResult.md) +- [MutationFn](type-aliases/MutationFn.md) +- [MutationFnParams](type-aliases/MutationFnParams.md) +- [NamespacedAndKeyedStream](type-aliases/NamespacedAndKeyedStream.md) +- [NamespacedRow](type-aliases/NamespacedRow.md) +- [NonEmptyArray](type-aliases/NonEmptyArray.md) +- [NonSingleResult](type-aliases/NonSingleResult.md) +- [OperationType](type-aliases/OperationType.md) +- [OperatorName](type-aliases/OperatorName.md) +- [OptimisticChangeMessage](type-aliases/OptimisticChangeMessage.md) +- [QueryBuilder](type-aliases/QueryBuilder.md) +- [Ref](type-aliases/Ref.md) +- [ResolveTransactionChanges](type-aliases/ResolveTransactionChanges.md) +- [ResultStream](type-aliases/ResultStream.md) +- [Row](type-aliases/Row.md) +- [SingleResult](type-aliases/SingleResult.md) +- [Source](type-aliases/Source.md) +- [StandardSchema](type-aliases/StandardSchema.md) +- [StandardSchemaAlias](type-aliases/StandardSchemaAlias.md) +- [StorageApi](type-aliases/StorageApi.md) +- [StorageEventApi](type-aliases/StorageEventApi.md) +- [Strategy](type-aliases/Strategy.md) +- [StrategyOptions](type-aliases/StrategyOptions.md) +- [StringCollationConfig](type-aliases/StringCollationConfig.md) +- [SubscriptionEvents](type-aliases/SubscriptionEvents.md) +- [SubscriptionStatus](type-aliases/SubscriptionStatus.md) +- [SyncConfigRes](type-aliases/SyncConfigRes.md) +- [SyncMode](type-aliases/SyncMode.md) +- [TransactionState](type-aliases/TransactionState.md) +- [TransactionWithMutations](type-aliases/TransactionWithMutations.md) +- [UnloadSubsetFn](type-aliases/UnloadSubsetFn.md) +- [UpdateMutationFn](type-aliases/UpdateMutationFn.md) +- [UpdateMutationFnParams](type-aliases/UpdateMutationFnParams.md) +- [UtilsRecord](type-aliases/UtilsRecord.md) +- [WritableDeep](type-aliases/WritableDeep.md) ## Variables -- [IndexOperation](../variables/IndexOperation.md) -- [operators](../variables/operators.md) -- [Query](../variables/Query.md) +- [IndexOperation](variables/IndexOperation.md) +- [operators](variables/operators.md) +- [Query](variables/Query.md) ## Functions -- [add](../functions/add.md) -- [and](../functions/and.md) -- [avg](../functions/avg.md) -- [coalesce](../functions/coalesce.md) -- [compileQuery](../functions/compileQuery.md) -- [concat](../functions/concat.md) -- [count](../functions/count.md) -- [createArrayChangeProxy](../functions/createArrayChangeProxy.md) -- [createChangeProxy](../functions/createChangeProxy.md) -- [createCollection](../functions/createCollection.md) -- [createLiveQueryCollection](../functions/createLiveQueryCollection.md) -- [createOptimisticAction](../functions/createOptimisticAction.md) -- [createPacedMutations](../functions/createPacedMutations.md) -- [createTransaction](../functions/createTransaction.md) -- [debounceStrategy](../functions/debounceStrategy.md) -- [eq](../functions/eq.md) -- [extractFieldPath](../functions/extractFieldPath.md) -- [extractSimpleComparisons](../functions/extractSimpleComparisons.md) -- [extractValue](../functions/extractValue.md) -- [getActiveTransaction](../functions/getActiveTransaction.md) -- [gt](../functions/gt.md) -- [gte](../functions/gte.md) -- [ilike](../functions/ilike.md) -- [inArray](../functions/inArray.md) -- [isLimitSubset](../functions/isLimitSubset.md) -- [isNull](../functions/isNull.md) -- [isOrderBySubset](../functions/isOrderBySubset.md) -- [isPredicateSubset](../functions/isPredicateSubset.md) -- [isUndefined](../functions/isUndefined.md) -- [isWhereSubset](../functions/isWhereSubset.md) -- [length](../functions/length.md) -- [like](../functions/like.md) -- [liveQueryCollectionOptions](../functions/liveQueryCollectionOptions.md) -- [localOnlyCollectionOptions](../functions/localOnlyCollectionOptions.md) -- [localStorageCollectionOptions](../functions/localStorageCollectionOptions.md) -- [lower](../functions/lower.md) -- [lt](../functions/lt.md) -- [lte](../functions/lte.md) -- [max](../functions/max.md) -- [min](../functions/min.md) -- [minusWherePredicates](../functions/minusWherePredicates.md) -- [not](../functions/not.md) -- [or](../functions/or.md) -- [parseLoadSubsetOptions](../functions/parseLoadSubsetOptions.md) -- [parseOrderByExpression](../functions/parseOrderByExpression.md) -- [parseWhereExpression](../functions/parseWhereExpression.md) -- [queueStrategy](../functions/queueStrategy.md) -- [sum](../functions/sum.md) -- [throttleStrategy](../functions/throttleStrategy.md) -- [unionWherePredicates](../functions/unionWherePredicates.md) -- [upper](../functions/upper.md) -- [walkExpression](../functions/walkExpression.md) -- [withArrayChangeTracking](../functions/withArrayChangeTracking.md) -- [withChangeTracking](../functions/withChangeTracking.md) +- [add](functions/add.md) +- [and](functions/and.md) +- [avg](functions/avg.md) +- [coalesce](functions/coalesce.md) +- [compileQuery](functions/compileQuery.md) +- [concat](functions/concat.md) +- [count](functions/count.md) +- [createArrayChangeProxy](functions/createArrayChangeProxy.md) +- [createChangeProxy](functions/createChangeProxy.md) +- [createCollection](functions/createCollection.md) +- [createLiveQueryCollection](functions/createLiveQueryCollection.md) +- [createOptimisticAction](functions/createOptimisticAction.md) +- [createPacedMutations](functions/createPacedMutations.md) +- [createTransaction](functions/createTransaction.md) +- [debounceStrategy](functions/debounceStrategy.md) +- [deepEquals](functions/deepEquals.md) +- [eq](functions/eq.md) +- [extractFieldPath](functions/extractFieldPath.md) +- [extractSimpleComparisons](functions/extractSimpleComparisons.md) +- [extractValue](functions/extractValue.md) +- [getActiveTransaction](functions/getActiveTransaction.md) +- [gt](functions/gt.md) +- [gte](functions/gte.md) +- [ilike](functions/ilike.md) +- [inArray](functions/inArray.md) +- [isLimitSubset](functions/isLimitSubset.md) +- [isNull](functions/isNull.md) +- [isOffsetLimitSubset](functions/isOffsetLimitSubset.md) +- [isOrderBySubset](functions/isOrderBySubset.md) +- [isPredicateSubset](functions/isPredicateSubset.md) +- [isUndefined](functions/isUndefined.md) +- [isWhereSubset](functions/isWhereSubset.md) +- [length](functions/length.md) +- [like](functions/like.md) +- [liveQueryCollectionOptions](functions/liveQueryCollectionOptions.md) +- [localOnlyCollectionOptions](functions/localOnlyCollectionOptions.md) +- [localStorageCollectionOptions](functions/localStorageCollectionOptions.md) +- [lower](functions/lower.md) +- [lt](functions/lt.md) +- [lte](functions/lte.md) +- [max](functions/max.md) +- [min](functions/min.md) +- [minusWherePredicates](functions/minusWherePredicates.md) +- [not](functions/not.md) +- [or](functions/or.md) +- [parseLoadSubsetOptions](functions/parseLoadSubsetOptions.md) +- [parseOrderByExpression](functions/parseOrderByExpression.md) +- [parseWhereExpression](functions/parseWhereExpression.md) +- [queueStrategy](functions/queueStrategy.md) +- [sum](functions/sum.md) +- [throttleStrategy](functions/throttleStrategy.md) +- [unionWherePredicates](functions/unionWherePredicates.md) +- [upper](functions/upper.md) +- [walkExpression](functions/walkExpression.md) +- [withArrayChangeTracking](functions/withArrayChangeTracking.md) +- [withChangeTracking](functions/withChangeTracking.md) diff --git a/docs/reference/interfaces/BTreeIndexOptions.md b/docs/reference/interfaces/BTreeIndexOptions.md index 6e6b27aa2..95e568924 100644 --- a/docs/reference/interfaces/BTreeIndexOptions.md +++ b/docs/reference/interfaces/BTreeIndexOptions.md @@ -5,7 +5,7 @@ title: BTreeIndexOptions # Interface: BTreeIndexOptions -Defined in: [packages/db/src/indexes/btree-index.ts:11](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L11) +Defined in: [packages/db/src/indexes/btree-index.ts:12](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L12) Options for Ordered index @@ -17,7 +17,7 @@ Options for Ordered index optional compareFn: (a, b) => number; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:12](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L12) +Defined in: [packages/db/src/indexes/btree-index.ts:13](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L13) #### Parameters @@ -41,4 +41,4 @@ Defined in: [packages/db/src/indexes/btree-index.ts:12](https://github.com/TanSt optional compareOptions: CompareOptions; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:13](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L13) +Defined in: [packages/db/src/indexes/btree-index.ts:14](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L14) diff --git a/docs/reference/interfaces/BaseCollectionConfig.md b/docs/reference/interfaces/BaseCollectionConfig.md index df59ed52a..0ada11698 100644 --- a/docs/reference/interfaces/BaseCollectionConfig.md +++ b/docs/reference/interfaces/BaseCollectionConfig.md @@ -5,12 +5,12 @@ title: BaseCollectionConfig # Interface: BaseCollectionConfig\ -Defined in: [packages/db/src/types.ts:438](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L438) +Defined in: [packages/db/src/types.ts:493](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L493) ## Extended by -- [`CollectionConfig`](../CollectionConfig.md) -- [`LocalStorageCollectionConfig`](../LocalStorageCollectionConfig.md) +- [`CollectionConfig`](CollectionConfig.md) +- [`LocalStorageCollectionConfig`](LocalStorageCollectionConfig.md) ## Type Parameters @@ -28,7 +28,7 @@ Defined in: [packages/db/src/types.ts:438](https://github.com/TanStack/db/blob/m ### TUtils -`TUtils` *extends* [`UtilsRecord`](../../type-aliases/UtilsRecord.md) = [`UtilsRecord`](../../type-aliases/UtilsRecord.md) +`TUtils` *extends* [`UtilsRecord`](../type-aliases/UtilsRecord.md) = [`UtilsRecord`](../type-aliases/UtilsRecord.md) ### TReturn @@ -42,7 +42,7 @@ Defined in: [packages/db/src/types.ts:438](https://github.com/TanStack/db/blob/m optional autoIndex: "eager" | "off"; ``` -Defined in: [packages/db/src/types.ts:487](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L487) +Defined in: [packages/db/src/types.ts:542](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L542) Auto-indexing mode for the collection. When enabled, indexes will be automatically created for simple where expressions. @@ -66,7 +66,7 @@ When enabled, indexes will be automatically created for simple where expressions optional compare: (x, y) => number; ``` -Defined in: [packages/db/src/types.ts:498](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L498) +Defined in: [packages/db/src/types.ts:553](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L553) Optional function to compare two items. This is used to order the items in the collection. @@ -106,7 +106,7 @@ compare: (x, y) => x.createdAt.getTime() - y.createdAt.getTime() optional defaultStringCollation: StringCollationConfig; ``` -Defined in: [packages/db/src/types.ts:644](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L644) +Defined in: [packages/db/src/types.ts:699](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L699) Specifies how to compare data in the collection. This should be configured to match data ordering on the backend. @@ -121,7 +121,7 @@ E.g., when using the Electric DB collection these options optional gcTime: number; ``` -Defined in: [packages/db/src/types.ts:467](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L467) +Defined in: [packages/db/src/types.ts:522](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L522) Time in milliseconds after which the collection will be garbage collected when it has no active subscribers. Defaults to 5 minutes (300000ms). @@ -134,7 +134,7 @@ when it has no active subscribers. Defaults to 5 minutes (300000ms). getKey: (item) => TKey; ``` -Defined in: [packages/db/src/types.ts:462](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L462) +Defined in: [packages/db/src/types.ts:517](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L517) Function to extract the ID from an object This is required for update/delete operations which now only accept IDs @@ -168,7 +168,7 @@ getKey: (item) => item.uuid optional id: string; ``` -Defined in: [packages/db/src/types.ts:451](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L451) +Defined in: [packages/db/src/types.ts:506](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L506) *** @@ -178,7 +178,7 @@ Defined in: [packages/db/src/types.ts:451](https://github.com/TanStack/db/blob/m optional onDelete: DeleteMutationFn; ``` -Defined in: [packages/db/src/types.ts:636](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L636) +Defined in: [packages/db/src/types.ts:691](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L691) Optional asynchronous handler function called before a delete operation @@ -242,7 +242,7 @@ onDelete: async ({ transaction, collection }) => { optional onInsert: InsertMutationFn; ``` -Defined in: [packages/db/src/types.ts:549](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L549) +Defined in: [packages/db/src/types.ts:604](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L604) Optional asynchronous handler function called before an insert operation @@ -305,7 +305,7 @@ onInsert: async ({ transaction, collection }) => { optional onUpdate: UpdateMutationFn; ``` -Defined in: [packages/db/src/types.ts:593](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L593) +Defined in: [packages/db/src/types.ts:648](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L648) Optional asynchronous handler function called before an update operation @@ -369,7 +369,7 @@ onUpdate: async ({ transaction, collection }) => { optional schema: TSchema; ``` -Defined in: [packages/db/src/types.ts:452](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L452) +Defined in: [packages/db/src/types.ts:507](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L507) *** @@ -379,7 +379,7 @@ Defined in: [packages/db/src/types.ts:452](https://github.com/TanStack/db/blob/m optional startSync: boolean; ``` -Defined in: [packages/db/src/types.ts:478](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L478) +Defined in: [packages/db/src/types.ts:533](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L533) Whether to eagerly start syncing on collection creation. When true, syncing begins immediately. When false, syncing starts when the first subscriber attaches. @@ -402,7 +402,7 @@ false optional syncMode: SyncMode; ``` -Defined in: [packages/db/src/types.ts:507](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L507) +Defined in: [packages/db/src/types.ts:562](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L562) The mode of sync to use for the collection. @@ -424,4 +424,4 @@ The exact implementation of the sync mode is up to the sync implementation. optional utils: TUtils; ``` -Defined in: [packages/db/src/types.ts:646](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L646) +Defined in: [packages/db/src/types.ts:701](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L701) diff --git a/docs/reference/interfaces/BaseStrategy.md b/docs/reference/interfaces/BaseStrategy.md index fdfb8354c..af8c9a5aa 100644 --- a/docs/reference/interfaces/BaseStrategy.md +++ b/docs/reference/interfaces/BaseStrategy.md @@ -11,9 +11,9 @@ Base strategy interface that all strategy implementations must conform to ## Extended by -- [`DebounceStrategy`](../DebounceStrategy.md) -- [`QueueStrategy`](../QueueStrategy.md) -- [`ThrottleStrategy`](../ThrottleStrategy.md) +- [`DebounceStrategy`](DebounceStrategy.md) +- [`QueueStrategy`](QueueStrategy.md) +- [`ThrottleStrategy`](ThrottleStrategy.md) ## Type Parameters @@ -72,7 +72,7 @@ Execute a function according to the strategy's timing rules ##### fn -() => [`Transaction`](../Transaction.md)\<`T`\> +() => [`Transaction`](Transaction.md)\<`T`\> The function to execute diff --git a/docs/reference/interfaces/ChangeMessage.md b/docs/reference/interfaces/ChangeMessage.md index d8b61bf5c..023798310 100644 --- a/docs/reference/interfaces/ChangeMessage.md +++ b/docs/reference/interfaces/ChangeMessage.md @@ -5,11 +5,7 @@ title: ChangeMessage # Interface: ChangeMessage\ -Defined in: [packages/db/src/types.ts:314](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L314) - -## Extended by - -- [`OptimisticChangeMessage`](../OptimisticChangeMessage.md) +Defined in: [packages/db/src/types.ts:353](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L353) ## Type Parameters @@ -29,7 +25,7 @@ Defined in: [packages/db/src/types.ts:314](https://github.com/TanStack/db/blob/m key: TKey; ``` -Defined in: [packages/db/src/types.ts:318](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L318) +Defined in: [packages/db/src/types.ts:357](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L357) *** @@ -39,7 +35,7 @@ Defined in: [packages/db/src/types.ts:318](https://github.com/TanStack/db/blob/m optional metadata: Record; ``` -Defined in: [packages/db/src/types.ts:322](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L322) +Defined in: [packages/db/src/types.ts:361](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L361) *** @@ -49,7 +45,7 @@ Defined in: [packages/db/src/types.ts:322](https://github.com/TanStack/db/blob/m optional previousValue: T; ``` -Defined in: [packages/db/src/types.ts:320](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L320) +Defined in: [packages/db/src/types.ts:359](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L359) *** @@ -59,7 +55,7 @@ Defined in: [packages/db/src/types.ts:320](https://github.com/TanStack/db/blob/m type: OperationType; ``` -Defined in: [packages/db/src/types.ts:321](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L321) +Defined in: [packages/db/src/types.ts:360](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L360) *** @@ -69,4 +65,4 @@ Defined in: [packages/db/src/types.ts:321](https://github.com/TanStack/db/blob/m value: T; ``` -Defined in: [packages/db/src/types.ts:319](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L319) +Defined in: [packages/db/src/types.ts:358](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L358) diff --git a/docs/reference/interfaces/Collection.md b/docs/reference/interfaces/Collection.md index 9b57df6ba..b80735f69 100644 --- a/docs/reference/interfaces/Collection.md +++ b/docs/reference/interfaces/Collection.md @@ -11,7 +11,7 @@ Enhanced Collection interface that includes both data type T and utilities TUtil ## Extends -- [`CollectionImpl`](../../classes/CollectionImpl.md)\<`T`, `TKey`, `TUtils`, `TSchema`, `TInsertInput`\> +- [`CollectionImpl`](../classes/CollectionImpl.md)\<`T`, `TKey`, `TUtils`, `TSchema`, `TInsertInput`\> ## Type Parameters @@ -29,7 +29,7 @@ The type of the key for the collection ### TUtils -`TUtils` *extends* [`UtilsRecord`](../../type-aliases/UtilsRecord.md) = [`UtilsRecord`](../../type-aliases/UtilsRecord.md) +`TUtils` *extends* [`UtilsRecord`](../type-aliases/UtilsRecord.md) = [`UtilsRecord`](../type-aliases/UtilsRecord.md) The utilities record type @@ -55,7 +55,7 @@ Defined in: [packages/db/src/collection/index.ts:283](https://github.com/TanStac #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`_lifecycle`](../../classes/CollectionImpl.md#_lifecycle) +[`CollectionImpl`](../classes/CollectionImpl.md).[`_lifecycle`](../classes/CollectionImpl.md#_lifecycle) *** @@ -69,7 +69,7 @@ Defined in: [packages/db/src/collection/index.ts:295](https://github.com/TanStac #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`_state`](../../classes/CollectionImpl.md#_state) +[`CollectionImpl`](../classes/CollectionImpl.md).[`_state`](../classes/CollectionImpl.md#_state) *** @@ -83,7 +83,7 @@ Defined in: [packages/db/src/collection/index.ts:284](https://github.com/TanStac #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`_sync`](../../classes/CollectionImpl.md#_sync) +[`CollectionImpl`](../classes/CollectionImpl.md).[`_sync`](../classes/CollectionImpl.md#_sync) *** @@ -97,7 +97,7 @@ Defined in: [packages/db/src/collection/index.ts:274](https://github.com/TanStac #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`config`](../../classes/CollectionImpl.md#config) +[`CollectionImpl`](../classes/CollectionImpl.md).[`config`](../classes/CollectionImpl.md#config) *** @@ -111,7 +111,7 @@ Defined in: [packages/db/src/collection/index.ts:273](https://github.com/TanStac #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`id`](../../classes/CollectionImpl.md#id) +[`CollectionImpl`](../classes/CollectionImpl.md).[`id`](../classes/CollectionImpl.md#id) *** @@ -135,7 +135,7 @@ Defined in: [packages/db/src/collection/index.ts:55](https://github.com/TanStack #### Overrides -[`CollectionImpl`](../../classes/CollectionImpl.md).[`utils`](../../classes/CollectionImpl.md#utils) +[`CollectionImpl`](../classes/CollectionImpl.md).[`utils`](../classes/CollectionImpl.md#utils) ## Accessors @@ -147,15 +147,15 @@ Defined in: [packages/db/src/collection/index.ts:55](https://github.com/TanStack get compareOptions(): StringCollationConfig; ``` -Defined in: [packages/db/src/collection/index.ts:579](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L579) +Defined in: [packages/db/src/collection/index.ts:580](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L580) ##### Returns -[`StringCollationConfig`](../../type-aliases/StringCollationConfig.md) +[`StringCollationConfig`](../type-aliases/StringCollationConfig.md) #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`compareOptions`](../../classes/CollectionImpl.md#compareoptions) +[`CollectionImpl`](../classes/CollectionImpl.md).[`compareOptions`](../classes/CollectionImpl.md#compareoptions) *** @@ -167,17 +167,17 @@ Defined in: [packages/db/src/collection/index.ts:579](https://github.com/TanStac get indexes(): Map>; ``` -Defined in: [packages/db/src/collection/index.ts:564](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L564) +Defined in: [packages/db/src/collection/index.ts:565](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L565) Get resolved indexes for query optimization ##### Returns -`Map`\<`number`, [`BaseIndex`](../../classes/BaseIndex.md)\<`TKey`\>\> +`Map`\<`number`, [`BaseIndex`](../classes/BaseIndex.md)\<`TKey`\>\> #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`indexes`](../../classes/CollectionImpl.md#indexes) +[`CollectionImpl`](../classes/CollectionImpl.md).[`indexes`](../classes/CollectionImpl.md#indexes) *** @@ -189,7 +189,7 @@ Get resolved indexes for query optimization get isLoadingSubset(): boolean; ``` -Defined in: [packages/db/src/collection/index.ts:430](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L430) +Defined in: [packages/db/src/collection/index.ts:431](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L431) Check if the collection is currently loading more data @@ -201,7 +201,7 @@ true if the collection has pending load more operations, false otherwise #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`isLoadingSubset`](../../classes/CollectionImpl.md#isloadingsubset) +[`CollectionImpl`](../classes/CollectionImpl.md).[`isLoadingSubset`](../classes/CollectionImpl.md#isloadingsubset) *** @@ -213,7 +213,7 @@ true if the collection has pending load more operations, false otherwise get size(): number; ``` -Defined in: [packages/db/src/collection/index.ts:467](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L467) +Defined in: [packages/db/src/collection/index.ts:468](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L468) Get the current size of the collection (cached) @@ -223,7 +223,7 @@ Get the current size of the collection (cached) #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`size`](../../classes/CollectionImpl.md#size) +[`CollectionImpl`](../classes/CollectionImpl.md).[`size`](../classes/CollectionImpl.md#size) *** @@ -235,7 +235,7 @@ Get the current size of the collection (cached) get state(): Map; ``` -Defined in: [packages/db/src/collection/index.ts:756](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L756) +Defined in: [packages/db/src/collection/index.ts:757](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L757) Gets the current state of the collection as a Map @@ -263,7 +263,7 @@ Map containing all items in the collection, with keys as identifiers #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`state`](../../classes/CollectionImpl.md#state) +[`CollectionImpl`](../classes/CollectionImpl.md).[`state`](../classes/CollectionImpl.md#state) *** @@ -275,17 +275,17 @@ Map containing all items in the collection, with keys as identifiers get status(): CollectionStatus; ``` -Defined in: [packages/db/src/collection/index.ts:385](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L385) +Defined in: [packages/db/src/collection/index.ts:386](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L386) Gets the current status of the collection ##### Returns -[`CollectionStatus`](../../type-aliases/CollectionStatus.md) +[`CollectionStatus`](../type-aliases/CollectionStatus.md) #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`status`](../../classes/CollectionImpl.md#status) +[`CollectionImpl`](../classes/CollectionImpl.md).[`status`](../classes/CollectionImpl.md#status) *** @@ -297,7 +297,7 @@ Gets the current status of the collection get subscriberCount(): number; ``` -Defined in: [packages/db/src/collection/index.ts:392](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L392) +Defined in: [packages/db/src/collection/index.ts:393](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L393) Get the number of subscribers to the collection @@ -307,7 +307,7 @@ Get the number of subscribers to the collection #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`subscriberCount`](../../classes/CollectionImpl.md#subscribercount) +[`CollectionImpl`](../classes/CollectionImpl.md).[`subscriberCount`](../classes/CollectionImpl.md#subscribercount) *** @@ -319,7 +319,7 @@ Get the number of subscribers to the collection get toArray(): TOutput[]; ``` -Defined in: [packages/db/src/collection/index.ts:785](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L785) +Defined in: [packages/db/src/collection/index.ts:786](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L786) Gets the current state of the collection as an Array @@ -331,7 +331,7 @@ An Array containing all items in the collection #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`toArray`](../../classes/CollectionImpl.md#toarray) +[`CollectionImpl`](../classes/CollectionImpl.md).[`toArray`](../classes/CollectionImpl.md#toarray) ## Methods @@ -341,7 +341,7 @@ An Array containing all items in the collection iterator: IterableIterator<[TKey, T]>; ``` -Defined in: [packages/db/src/collection/index.ts:495](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L495) +Defined in: [packages/db/src/collection/index.ts:496](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L496) Get all entries (virtual derived state) @@ -351,7 +351,7 @@ Get all entries (virtual derived state) #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`[iterator]`](../../classes/CollectionImpl.md#iterator) +[`CollectionImpl`](../classes/CollectionImpl.md).[`[iterator]`](../classes/CollectionImpl.md#iterator) *** @@ -361,7 +361,7 @@ Get all entries (virtual derived state) cleanup(): Promise; ``` -Defined in: [packages/db/src/collection/index.ts:919](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L919) +Defined in: [packages/db/src/collection/index.ts:920](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L920) Clean up the collection by stopping sync and clearing data This can be called manually or automatically by garbage collection @@ -372,7 +372,7 @@ This can be called manually or automatically by garbage collection #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`cleanup`](../../classes/CollectionImpl.md#cleanup) +[`CollectionImpl`](../classes/CollectionImpl.md).[`cleanup`](../classes/CollectionImpl.md#cleanup) *** @@ -382,7 +382,7 @@ This can be called manually or automatically by garbage collection createIndex(indexCallback, config): IndexProxy; ``` -Defined in: [packages/db/src/collection/index.ts:554](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L554) +Defined in: [packages/db/src/collection/index.ts:555](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L555) Creates an index on a collection for faster queries. Indexes significantly improve query performance by allowing constant time lookups @@ -392,7 +392,7 @@ and logarithmic time range queries instead of full scans. ##### TResolver -`TResolver` *extends* [`IndexResolver`](../../type-aliases/IndexResolver.md)\<`TKey`\> = *typeof* [`BTreeIndex`](../../classes/BTreeIndex.md) +`TResolver` *extends* [`IndexResolver`](../type-aliases/IndexResolver.md)\<`TKey`\> = *typeof* [`BTreeIndex`](../classes/BTreeIndex.md) The type of the index resolver (constructor or async loader) @@ -406,13 +406,13 @@ Function that extracts the indexed value from each item ##### config -[`IndexOptions`](../IndexOptions.md)\<`TResolver`\> = `{}` +[`IndexOptions`](IndexOptions.md)\<`TResolver`\> = `{}` Configuration including index type and type-specific options #### Returns -[`IndexProxy`](../../classes/IndexProxy.md)\<`TKey`\> +[`IndexProxy`](../classes/IndexProxy.md)\<`TKey`\> An index proxy that provides access to the index when ready @@ -444,7 +444,7 @@ const textIndex = collection.createIndex((row) => row.content, { #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`createIndex`](../../classes/CollectionImpl.md#createindex) +[`CollectionImpl`](../classes/CollectionImpl.md).[`createIndex`](../classes/CollectionImpl.md#createindex) *** @@ -456,7 +456,7 @@ currentStateAsChanges(options): | ChangeMessage[]; ``` -Defined in: [packages/db/src/collection/index.ts:823](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L823) +Defined in: [packages/db/src/collection/index.ts:824](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L824) Returns the current state of the collection as an array of changes @@ -464,14 +464,14 @@ Returns the current state of the collection as an array of changes ##### options -[`CurrentStateAsChangesOptions`](../CurrentStateAsChangesOptions.md) = `{}` +[`CurrentStateAsChangesOptions`](CurrentStateAsChangesOptions.md) = `{}` Options including optional where filter #### Returns \| `void` - \| [`ChangeMessage`](../ChangeMessage.md)\<`T`, `string` \| `number`\>[] + \| [`ChangeMessage`](ChangeMessage.md)\<`T`, `string` \| `number`\>[] An array of changes @@ -494,7 +494,7 @@ const activeChanges = collection.currentStateAsChanges({ #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`currentStateAsChanges`](../../classes/CollectionImpl.md#currentstateaschanges) +[`CollectionImpl`](../classes/CollectionImpl.md).[`currentStateAsChanges`](../classes/CollectionImpl.md#currentstateaschanges) *** @@ -504,7 +504,7 @@ const activeChanges = collection.currentStateAsChanges({ delete(keys, config?): Transaction; ``` -Defined in: [packages/db/src/collection/index.ts:733](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L733) +Defined in: [packages/db/src/collection/index.ts:734](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L734) Deletes one or more items from the collection @@ -518,13 +518,13 @@ Single key or array of keys to delete ##### config? -[`OperationConfig`](../OperationConfig.md) +[`OperationConfig`](OperationConfig.md) Optional configuration including metadata #### Returns -[`Transaction`](../Transaction.md)\<`any`\> +[`Transaction`](Transaction.md)\<`any`\> A Transaction object representing the delete operation(s) @@ -561,7 +561,7 @@ try { #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`delete`](../../classes/CollectionImpl.md#delete) +[`CollectionImpl`](../classes/CollectionImpl.md).[`delete`](../classes/CollectionImpl.md#delete) *** @@ -571,7 +571,7 @@ try { entries(): IterableIterator<[TKey, T]>; ``` -Defined in: [packages/db/src/collection/index.ts:488](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L488) +Defined in: [packages/db/src/collection/index.ts:489](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L489) Get all entries (virtual derived state) @@ -581,7 +581,7 @@ Get all entries (virtual derived state) #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`entries`](../../classes/CollectionImpl.md#entries) +[`CollectionImpl`](../classes/CollectionImpl.md).[`entries`](../classes/CollectionImpl.md#entries) *** @@ -591,7 +591,7 @@ Get all entries (virtual derived state) forEach(callbackfn): void; ``` -Defined in: [packages/db/src/collection/index.ts:502](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L502) +Defined in: [packages/db/src/collection/index.ts:503](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L503) Execute a callback for each entry in the collection @@ -607,7 +607,7 @@ Execute a callback for each entry in the collection #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`forEach`](../../classes/CollectionImpl.md#foreach) +[`CollectionImpl`](../classes/CollectionImpl.md).[`forEach`](../classes/CollectionImpl.md#foreach) *** @@ -617,7 +617,7 @@ Execute a callback for each entry in the collection get(key): T | undefined; ``` -Defined in: [packages/db/src/collection/index.ts:453](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L453) +Defined in: [packages/db/src/collection/index.ts:454](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L454) Get the current value for a key (virtual derived state) @@ -633,7 +633,7 @@ Get the current value for a key (virtual derived state) #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`get`](../../classes/CollectionImpl.md#get) +[`CollectionImpl`](../classes/CollectionImpl.md).[`get`](../classes/CollectionImpl.md#get) *** @@ -643,7 +643,7 @@ Get the current value for a key (virtual derived state) getKeyFromItem(item): TKey; ``` -Defined in: [packages/db/src/collection/index.ts:517](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L517) +Defined in: [packages/db/src/collection/index.ts:518](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L518) #### Parameters @@ -657,7 +657,7 @@ Defined in: [packages/db/src/collection/index.ts:517](https://github.com/TanStac #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`getKeyFromItem`](../../classes/CollectionImpl.md#getkeyfromitem) +[`CollectionImpl`](../classes/CollectionImpl.md).[`getKeyFromItem`](../classes/CollectionImpl.md#getkeyfromitem) *** @@ -667,7 +667,7 @@ Defined in: [packages/db/src/collection/index.ts:517](https://github.com/TanStac has(key): boolean; ``` -Defined in: [packages/db/src/collection/index.ts:460](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L460) +Defined in: [packages/db/src/collection/index.ts:461](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L461) Check if a key exists in the collection (virtual derived state) @@ -683,7 +683,7 @@ Check if a key exists in the collection (virtual derived state) #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`has`](../../classes/CollectionImpl.md#has) +[`CollectionImpl`](../classes/CollectionImpl.md).[`has`](../classes/CollectionImpl.md#has) *** @@ -695,7 +695,7 @@ insert(data, config?): | Transaction; ``` -Defined in: [packages/db/src/collection/index.ts:620](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L620) +Defined in: [packages/db/src/collection/index.ts:621](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L621) Inserts one or more items into the collection @@ -707,14 +707,14 @@ Inserts one or more items into the collection ##### config? -[`InsertConfig`](../InsertConfig.md) +[`InsertConfig`](InsertConfig.md) Optional configuration including metadata #### Returns - \| [`Transaction`](../Transaction.md)\<`Record`\<`string`, `unknown`\>\> - \| [`Transaction`](../Transaction.md)\<`T`\> + \| [`Transaction`](Transaction.md)\<`Record`\<`string`, `unknown`\>\> + \| [`Transaction`](Transaction.md)\<`T`\> A Transaction object representing the insert operation(s) @@ -760,7 +760,7 @@ try { #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`insert`](../../classes/CollectionImpl.md#insert) +[`CollectionImpl`](../classes/CollectionImpl.md).[`insert`](../classes/CollectionImpl.md#insert) *** @@ -770,7 +770,7 @@ try { isReady(): boolean; ``` -Defined in: [packages/db/src/collection/index.ts:422](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L422) +Defined in: [packages/db/src/collection/index.ts:423](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L423) Check if the collection is ready for use Returns true if the collection has been marked as ready by its sync implementation @@ -794,7 +794,7 @@ if (collection.isReady()) { #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`isReady`](../../classes/CollectionImpl.md#isready) +[`CollectionImpl`](../classes/CollectionImpl.md).[`isReady`](../classes/CollectionImpl.md#isready) *** @@ -804,7 +804,7 @@ if (collection.isReady()) { keys(): IterableIterator; ``` -Defined in: [packages/db/src/collection/index.ts:474](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L474) +Defined in: [packages/db/src/collection/index.ts:475](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L475) Get all keys (virtual derived state) @@ -814,7 +814,7 @@ Get all keys (virtual derived state) #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`keys`](../../classes/CollectionImpl.md#keys) +[`CollectionImpl`](../classes/CollectionImpl.md).[`keys`](../classes/CollectionImpl.md#keys) *** @@ -824,7 +824,7 @@ Get all keys (virtual derived state) map(callbackfn): U[]; ``` -Defined in: [packages/db/src/collection/index.ts:511](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L511) +Defined in: [packages/db/src/collection/index.ts:512](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L512) Create a new array with the results of calling a function for each entry in the collection @@ -846,7 +846,7 @@ Create a new array with the results of calling a function for each entry in the #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`map`](../../classes/CollectionImpl.md#map) +[`CollectionImpl`](../classes/CollectionImpl.md).[`map`](../classes/CollectionImpl.md#map) *** @@ -856,7 +856,7 @@ Create a new array with the results of calling a function for each entry in the off(event, callback): void; ``` -Defined in: [packages/db/src/collection/index.ts:898](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L898) +Defined in: [packages/db/src/collection/index.ts:899](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L899) Unsubscribe from a collection event @@ -873,6 +873,7 @@ Unsubscribe from a collection event \| `"status:change"` \| `"subscribers:change"` \| `"loadingSubset:change"` + \| `"truncate"` #### Parameters @@ -890,7 +891,7 @@ Unsubscribe from a collection event #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`off`](../../classes/CollectionImpl.md#off) +[`CollectionImpl`](../classes/CollectionImpl.md).[`off`](../classes/CollectionImpl.md#off) *** @@ -900,7 +901,7 @@ Unsubscribe from a collection event on(event, callback): () => void; ``` -Defined in: [packages/db/src/collection/index.ts:878](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L878) +Defined in: [packages/db/src/collection/index.ts:879](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L879) Subscribe to a collection event @@ -917,6 +918,7 @@ Subscribe to a collection event \| `"status:change"` \| `"subscribers:change"` \| `"loadingSubset:change"` + \| `"truncate"` #### Parameters @@ -940,7 +942,7 @@ Subscribe to a collection event #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`on`](../../classes/CollectionImpl.md#on) +[`CollectionImpl`](../classes/CollectionImpl.md).[`on`](../classes/CollectionImpl.md#on) *** @@ -950,7 +952,7 @@ Subscribe to a collection event once(event, callback): () => void; ``` -Defined in: [packages/db/src/collection/index.ts:888](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L888) +Defined in: [packages/db/src/collection/index.ts:889](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L889) Subscribe to a collection event once @@ -967,6 +969,7 @@ Subscribe to a collection event once \| `"status:change"` \| `"subscribers:change"` \| `"loadingSubset:change"` + \| `"truncate"` #### Parameters @@ -990,7 +993,7 @@ Subscribe to a collection event once #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`once`](../../classes/CollectionImpl.md#once) +[`CollectionImpl`](../classes/CollectionImpl.md).[`once`](../classes/CollectionImpl.md#once) *** @@ -1000,7 +1003,7 @@ Subscribe to a collection event once onFirstReady(callback): void; ``` -Defined in: [packages/db/src/collection/index.ts:406](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L406) +Defined in: [packages/db/src/collection/index.ts:407](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L407) Register a callback to be executed when the collection first becomes ready Useful for preloading collections @@ -1028,7 +1031,7 @@ collection.onFirstReady(() => { #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`onFirstReady`](../../classes/CollectionImpl.md#onfirstready) +[`CollectionImpl`](../classes/CollectionImpl.md).[`onFirstReady`](../classes/CollectionImpl.md#onfirstready) *** @@ -1038,7 +1041,7 @@ collection.onFirstReady(() => { preload(): Promise; ``` -Defined in: [packages/db/src/collection/index.ts:446](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L446) +Defined in: [packages/db/src/collection/index.ts:447](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L447) Preload the collection data by starting sync if not already started Multiple concurrent calls will share the same promise @@ -1049,7 +1052,7 @@ Multiple concurrent calls will share the same promise #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`preload`](../../classes/CollectionImpl.md#preload) +[`CollectionImpl`](../classes/CollectionImpl.md).[`preload`](../classes/CollectionImpl.md#preload) *** @@ -1059,7 +1062,7 @@ Multiple concurrent calls will share the same promise startSyncImmediate(): void; ``` -Defined in: [packages/db/src/collection/index.ts:438](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L438) +Defined in: [packages/db/src/collection/index.ts:439](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L439) Start sync immediately - internal method for compiled queries This bypasses lazy loading for special cases like live query results @@ -1070,7 +1073,7 @@ This bypasses lazy loading for special cases like live query results #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`startSyncImmediate`](../../classes/CollectionImpl.md#startsyncimmediate) +[`CollectionImpl`](../classes/CollectionImpl.md).[`startSyncImmediate`](../classes/CollectionImpl.md#startsyncimmediate) *** @@ -1080,7 +1083,7 @@ This bypasses lazy loading for special cases like live query results stateWhenReady(): Promise>; ``` -Defined in: [packages/db/src/collection/index.ts:770](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L770) +Defined in: [packages/db/src/collection/index.ts:771](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L771) Gets the current state of the collection as a Map, but only resolves when data is available Waits for the first sync commit to complete before resolving @@ -1093,7 +1096,7 @@ Promise that resolves to a Map containing all items in the collection #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`stateWhenReady`](../../classes/CollectionImpl.md#statewhenready) +[`CollectionImpl`](../classes/CollectionImpl.md).[`stateWhenReady`](../classes/CollectionImpl.md#statewhenready) *** @@ -1103,7 +1106,7 @@ Promise that resolves to a Map containing all items in the collection subscribeChanges(callback, options): CollectionSubscription; ``` -Defined in: [packages/db/src/collection/index.ts:868](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L868) +Defined in: [packages/db/src/collection/index.ts:869](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L869) Subscribe to changes in the collection @@ -1117,7 +1120,7 @@ Function called when items change ##### options -[`SubscribeChangesOptions`](../SubscribeChangesOptions.md) = `{}` +[`SubscribeChangesOptions`](SubscribeChangesOptions.md) = `{}` Subscription options including includeInitialState and where filter @@ -1169,7 +1172,7 @@ const subscription = collection.subscribeChanges((changes) => { #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`subscribeChanges`](../../classes/CollectionImpl.md#subscribechanges) +[`CollectionImpl`](../classes/CollectionImpl.md).[`subscribeChanges`](../classes/CollectionImpl.md#subscribechanges) *** @@ -1179,7 +1182,7 @@ const subscription = collection.subscribeChanges((changes) => { toArrayWhenReady(): Promise; ``` -Defined in: [packages/db/src/collection/index.ts:795](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L795) +Defined in: [packages/db/src/collection/index.ts:796](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L796) Gets the current state of the collection as an Array, but only resolves when data is available Waits for the first sync commit to complete before resolving @@ -1192,7 +1195,7 @@ Promise that resolves to an Array containing all items in the collection #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`toArrayWhenReady`](../../classes/CollectionImpl.md#toarraywhenready) +[`CollectionImpl`](../classes/CollectionImpl.md).[`toArrayWhenReady`](../classes/CollectionImpl.md#toarraywhenready) *** @@ -1204,7 +1207,7 @@ Promise that resolves to an Array containing all items in the collection update(key, callback): Transaction; ``` -Defined in: [packages/db/src/collection/index.ts:665](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L665) +Defined in: [packages/db/src/collection/index.ts:666](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L666) Updates one or more items in the collection using a callback function @@ -1220,7 +1223,7 @@ Updates one or more items in the collection using a callback function ##### Returns -[`Transaction`](../Transaction.md) +[`Transaction`](Transaction.md) A Transaction object representing the update operation(s) @@ -1268,7 +1271,7 @@ try { ##### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`update`](../../classes/CollectionImpl.md#update) +[`CollectionImpl`](../classes/CollectionImpl.md).[`update`](../classes/CollectionImpl.md#update) #### Call Signature @@ -1279,7 +1282,7 @@ update( callback): Transaction; ``` -Defined in: [packages/db/src/collection/index.ts:671](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L671) +Defined in: [packages/db/src/collection/index.ts:672](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L672) Updates one or more items in the collection using a callback function @@ -1293,7 +1296,7 @@ Single key or array of keys to update ###### config -[`OperationConfig`](../OperationConfig.md) +[`OperationConfig`](OperationConfig.md) ###### callback @@ -1301,7 +1304,7 @@ Single key or array of keys to update ##### Returns -[`Transaction`](../Transaction.md) +[`Transaction`](Transaction.md) A Transaction object representing the update operation(s) @@ -1349,7 +1352,7 @@ try { ##### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`update`](../../classes/CollectionImpl.md#update) +[`CollectionImpl`](../classes/CollectionImpl.md).[`update`](../classes/CollectionImpl.md#update) #### Call Signature @@ -1357,7 +1360,7 @@ try { update(id, callback): Transaction; ``` -Defined in: [packages/db/src/collection/index.ts:678](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L678) +Defined in: [packages/db/src/collection/index.ts:679](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L679) Updates one or more items in the collection using a callback function @@ -1373,7 +1376,7 @@ Updates one or more items in the collection using a callback function ##### Returns -[`Transaction`](../Transaction.md) +[`Transaction`](Transaction.md) A Transaction object representing the update operation(s) @@ -1421,7 +1424,7 @@ try { ##### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`update`](../../classes/CollectionImpl.md#update) +[`CollectionImpl`](../classes/CollectionImpl.md).[`update`](../classes/CollectionImpl.md#update) #### Call Signature @@ -1432,7 +1435,7 @@ update( callback): Transaction; ``` -Defined in: [packages/db/src/collection/index.ts:684](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L684) +Defined in: [packages/db/src/collection/index.ts:685](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L685) Updates one or more items in the collection using a callback function @@ -1444,7 +1447,7 @@ Updates one or more items in the collection using a callback function ###### config -[`OperationConfig`](../OperationConfig.md) +[`OperationConfig`](OperationConfig.md) ###### callback @@ -1452,7 +1455,7 @@ Updates one or more items in the collection using a callback function ##### Returns -[`Transaction`](../Transaction.md) +[`Transaction`](Transaction.md) A Transaction object representing the update operation(s) @@ -1500,7 +1503,7 @@ try { ##### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`update`](../../classes/CollectionImpl.md#update) +[`CollectionImpl`](../classes/CollectionImpl.md).[`update`](../classes/CollectionImpl.md#update) *** @@ -1513,7 +1516,7 @@ validateData( key?): T; ``` -Defined in: [packages/db/src/collection/index.ts:571](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L571) +Defined in: [packages/db/src/collection/index.ts:572](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L572) Validates the data against the schema @@ -1537,7 +1540,7 @@ Validates the data against the schema #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`validateData`](../../classes/CollectionImpl.md#validatedata) +[`CollectionImpl`](../classes/CollectionImpl.md).[`validateData`](../classes/CollectionImpl.md#validatedata) *** @@ -1547,7 +1550,7 @@ Validates the data against the schema values(): IterableIterator; ``` -Defined in: [packages/db/src/collection/index.ts:481](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L481) +Defined in: [packages/db/src/collection/index.ts:482](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L482) Get all values (virtual derived state) @@ -1557,7 +1560,7 @@ Get all values (virtual derived state) #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`values`](../../classes/CollectionImpl.md#values) +[`CollectionImpl`](../classes/CollectionImpl.md).[`values`](../classes/CollectionImpl.md#values) *** @@ -1567,7 +1570,7 @@ Get all values (virtual derived state) waitFor(event, timeout?): Promise; ``` -Defined in: [packages/db/src/collection/index.ts:908](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L908) +Defined in: [packages/db/src/collection/index.ts:909](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L909) Wait for a collection event @@ -1584,6 +1587,7 @@ Wait for a collection event \| `"status:change"` \| `"subscribers:change"` \| `"loadingSubset:change"` + \| `"truncate"` #### Parameters @@ -1601,4 +1605,4 @@ Wait for a collection event #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`waitFor`](../../classes/CollectionImpl.md#waitfor) +[`CollectionImpl`](../classes/CollectionImpl.md).[`waitFor`](../classes/CollectionImpl.md#waitfor) diff --git a/docs/reference/interfaces/CollectionConfig.md b/docs/reference/interfaces/CollectionConfig.md index e3ce87cd6..1598d8221 100644 --- a/docs/reference/interfaces/CollectionConfig.md +++ b/docs/reference/interfaces/CollectionConfig.md @@ -5,11 +5,11 @@ title: CollectionConfig # Interface: CollectionConfig\ -Defined in: [packages/db/src/types.ts:649](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L649) +Defined in: [packages/db/src/types.ts:704](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L704) ## Extends -- [`BaseCollectionConfig`](../BaseCollectionConfig.md)\<`T`, `TKey`, `TSchema`, `TUtils`\> +- [`BaseCollectionConfig`](BaseCollectionConfig.md)\<`T`, `TKey`, `TSchema`, `TUtils`\> ## Type Parameters @@ -27,7 +27,7 @@ Defined in: [packages/db/src/types.ts:649](https://github.com/TanStack/db/blob/m ### TUtils -`TUtils` *extends* [`UtilsRecord`](../../type-aliases/UtilsRecord.md) = [`UtilsRecord`](../../type-aliases/UtilsRecord.md) +`TUtils` *extends* [`UtilsRecord`](../type-aliases/UtilsRecord.md) = [`UtilsRecord`](../type-aliases/UtilsRecord.md) ## Properties @@ -37,7 +37,7 @@ Defined in: [packages/db/src/types.ts:649](https://github.com/TanStack/db/blob/m optional autoIndex: "eager" | "off"; ``` -Defined in: [packages/db/src/types.ts:487](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L487) +Defined in: [packages/db/src/types.ts:542](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L542) Auto-indexing mode for the collection. When enabled, indexes will be automatically created for simple where expressions. @@ -55,7 +55,7 @@ When enabled, indexes will be automatically created for simple where expressions #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`autoIndex`](../BaseCollectionConfig.md#autoindex) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`autoIndex`](BaseCollectionConfig.md#autoindex) *** @@ -65,7 +65,7 @@ When enabled, indexes will be automatically created for simple where expressions optional compare: (x, y) => number; ``` -Defined in: [packages/db/src/types.ts:498](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L498) +Defined in: [packages/db/src/types.ts:553](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L553) Optional function to compare two items. This is used to order the items in the collection. @@ -99,7 +99,7 @@ compare: (x, y) => x.createdAt.getTime() - y.createdAt.getTime() #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`compare`](../BaseCollectionConfig.md#compare) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`compare`](BaseCollectionConfig.md#compare) *** @@ -109,7 +109,7 @@ compare: (x, y) => x.createdAt.getTime() - y.createdAt.getTime() optional defaultStringCollation: StringCollationConfig; ``` -Defined in: [packages/db/src/types.ts:644](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L644) +Defined in: [packages/db/src/types.ts:699](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L699) Specifies how to compare data in the collection. This should be configured to match data ordering on the backend. @@ -118,7 +118,7 @@ E.g., when using the Electric DB collection these options #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`defaultStringCollation`](../BaseCollectionConfig.md#defaultstringcollation) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`defaultStringCollation`](BaseCollectionConfig.md#defaultstringcollation) *** @@ -128,14 +128,14 @@ E.g., when using the Electric DB collection these options optional gcTime: number; ``` -Defined in: [packages/db/src/types.ts:467](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L467) +Defined in: [packages/db/src/types.ts:522](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L522) Time in milliseconds after which the collection will be garbage collected when it has no active subscribers. Defaults to 5 minutes (300000ms). #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`gcTime`](../BaseCollectionConfig.md#gctime) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`gcTime`](BaseCollectionConfig.md#gctime) *** @@ -145,7 +145,7 @@ when it has no active subscribers. Defaults to 5 minutes (300000ms). getKey: (item) => TKey; ``` -Defined in: [packages/db/src/types.ts:462](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L462) +Defined in: [packages/db/src/types.ts:517](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L517) Function to extract the ID from an object This is required for update/delete operations which now only accept IDs @@ -173,7 +173,7 @@ getKey: (item) => item.uuid #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`getKey`](../BaseCollectionConfig.md#getkey) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`getKey`](BaseCollectionConfig.md#getkey) *** @@ -183,11 +183,11 @@ getKey: (item) => item.uuid optional id: string; ``` -Defined in: [packages/db/src/types.ts:451](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L451) +Defined in: [packages/db/src/types.ts:506](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L506) #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`id`](../BaseCollectionConfig.md#id) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`id`](BaseCollectionConfig.md#id) *** @@ -197,7 +197,7 @@ Defined in: [packages/db/src/types.ts:451](https://github.com/TanStack/db/blob/m optional onDelete: DeleteMutationFn; ``` -Defined in: [packages/db/src/types.ts:636](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L636) +Defined in: [packages/db/src/types.ts:691](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L691) Optional asynchronous handler function called before a delete operation @@ -255,7 +255,7 @@ onDelete: async ({ transaction, collection }) => { #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`onDelete`](../BaseCollectionConfig.md#ondelete) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`onDelete`](BaseCollectionConfig.md#ondelete) *** @@ -265,7 +265,7 @@ onDelete: async ({ transaction, collection }) => { optional onInsert: InsertMutationFn; ``` -Defined in: [packages/db/src/types.ts:549](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L549) +Defined in: [packages/db/src/types.ts:604](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L604) Optional asynchronous handler function called before an insert operation @@ -322,7 +322,7 @@ onInsert: async ({ transaction, collection }) => { #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`onInsert`](../BaseCollectionConfig.md#oninsert) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`onInsert`](BaseCollectionConfig.md#oninsert) *** @@ -332,7 +332,7 @@ onInsert: async ({ transaction, collection }) => { optional onUpdate: UpdateMutationFn; ``` -Defined in: [packages/db/src/types.ts:593](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L593) +Defined in: [packages/db/src/types.ts:648](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L648) Optional asynchronous handler function called before an update operation @@ -390,7 +390,7 @@ onUpdate: async ({ transaction, collection }) => { #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`onUpdate`](../BaseCollectionConfig.md#onupdate) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`onUpdate`](BaseCollectionConfig.md#onupdate) *** @@ -400,11 +400,11 @@ onUpdate: async ({ transaction, collection }) => { optional schema: TSchema; ``` -Defined in: [packages/db/src/types.ts:452](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L452) +Defined in: [packages/db/src/types.ts:507](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L507) #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`schema`](../BaseCollectionConfig.md#schema) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`schema`](BaseCollectionConfig.md#schema) *** @@ -414,7 +414,7 @@ Defined in: [packages/db/src/types.ts:452](https://github.com/TanStack/db/blob/m optional startSync: boolean; ``` -Defined in: [packages/db/src/types.ts:478](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L478) +Defined in: [packages/db/src/types.ts:533](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L533) Whether to eagerly start syncing on collection creation. When true, syncing begins immediately. When false, syncing starts when the first subscriber attaches. @@ -431,7 +431,7 @@ false #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`startSync`](../BaseCollectionConfig.md#startsync) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`startSync`](BaseCollectionConfig.md#startsync) *** @@ -441,7 +441,7 @@ false sync: SyncConfig; ``` -Defined in: [packages/db/src/types.ts:655](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L655) +Defined in: [packages/db/src/types.ts:710](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L710) *** @@ -451,7 +451,7 @@ Defined in: [packages/db/src/types.ts:655](https://github.com/TanStack/db/blob/m optional syncMode: SyncMode; ``` -Defined in: [packages/db/src/types.ts:507](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L507) +Defined in: [packages/db/src/types.ts:562](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L562) The mode of sync to use for the collection. @@ -467,7 +467,7 @@ The exact implementation of the sync mode is up to the sync implementation. #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`syncMode`](../BaseCollectionConfig.md#syncmode) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`syncMode`](BaseCollectionConfig.md#syncmode) *** @@ -477,8 +477,8 @@ The exact implementation of the sync mode is up to the sync implementation. optional utils: TUtils; ``` -Defined in: [packages/db/src/types.ts:646](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L646) +Defined in: [packages/db/src/types.ts:701](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L701) #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`utils`](../BaseCollectionConfig.md#utils) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`utils`](BaseCollectionConfig.md#utils) diff --git a/docs/reference/interfaces/CollectionLike.md b/docs/reference/interfaces/CollectionLike.md index 05679c1ad..cc1f3b446 100644 --- a/docs/reference/interfaces/CollectionLike.md +++ b/docs/reference/interfaces/CollectionLike.md @@ -12,7 +12,7 @@ for the change events system to work ## Extends -- `Pick`\<[`Collection`](../Collection.md)\<`T`, `TKey`\>, `"get"` \| `"has"` \| `"entries"` \| `"indexes"` \| `"id"` \| `"compareOptions"`\> +- `Pick`\<[`Collection`](Collection.md)\<`T`, `TKey`\>, `"get"` \| `"has"` \| `"entries"` \| `"indexes"` \| `"id"` \| `"compareOptions"`\> ## Type Parameters @@ -32,11 +32,11 @@ for the change events system to work compareOptions: StringCollationConfig; ``` -Defined in: [packages/db/src/collection/index.ts:579](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L579) +Defined in: [packages/db/src/collection/index.ts:580](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L580) #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`compareOptions`](../../classes/CollectionImpl.md#compareoptions) +[`CollectionImpl`](../classes/CollectionImpl.md).[`compareOptions`](../classes/CollectionImpl.md#compareoptions) *** @@ -50,7 +50,7 @@ Defined in: [packages/db/src/collection/index.ts:273](https://github.com/TanStac #### Inherited from -[`CollectionImpl`](../../classes/CollectionImpl.md).[`id`](../../classes/CollectionImpl.md#id) +[`CollectionImpl`](../classes/CollectionImpl.md).[`id`](../classes/CollectionImpl.md#id) *** @@ -60,7 +60,7 @@ Defined in: [packages/db/src/collection/index.ts:273](https://github.com/TanStac indexes: Map>; ``` -Defined in: [packages/db/src/collection/index.ts:564](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L564) +Defined in: [packages/db/src/collection/index.ts:565](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L565) #### Inherited from @@ -76,7 +76,7 @@ Pick.indexes entries(): IterableIterator<[TKey, T]>; ``` -Defined in: [packages/db/src/collection/index.ts:488](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L488) +Defined in: [packages/db/src/collection/index.ts:489](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L489) Get all entries (virtual derived state) @@ -98,7 +98,7 @@ Pick.entries get(key): T | undefined; ``` -Defined in: [packages/db/src/collection/index.ts:453](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L453) +Defined in: [packages/db/src/collection/index.ts:454](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L454) Get the current value for a key (virtual derived state) @@ -126,7 +126,7 @@ Pick.get has(key): boolean; ``` -Defined in: [packages/db/src/collection/index.ts:460](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L460) +Defined in: [packages/db/src/collection/index.ts:461](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L461) Check if a key exists in the collection (virtual derived state) diff --git a/docs/reference/interfaces/CreateOptimisticActionsOptions.md b/docs/reference/interfaces/CreateOptimisticActionsOptions.md index 166e135dc..3e20fe56d 100644 --- a/docs/reference/interfaces/CreateOptimisticActionsOptions.md +++ b/docs/reference/interfaces/CreateOptimisticActionsOptions.md @@ -11,7 +11,7 @@ Options for the createOptimisticAction helper ## Extends -- `Omit`\<[`TransactionConfig`](../TransactionConfig.md)\<`T`\>, `"mutationFn"`\> +- `Omit`\<[`TransactionConfig`](TransactionConfig.md)\<`T`\>, `"mutationFn"`\> ## Type Parameters @@ -35,7 +35,7 @@ Defined in: [packages/db/src/types.ts:169](https://github.com/TanStack/db/blob/m #### Inherited from -[`TransactionConfig`](../TransactionConfig.md).[`autoCommit`](../TransactionConfig.md#autocommit) +[`TransactionConfig`](TransactionConfig.md).[`autoCommit`](TransactionConfig.md#autocommit) *** @@ -93,7 +93,7 @@ Function to execute the mutation on the server ##### params -[`MutationFnParams`](../../type-aliases/MutationFnParams.md)\<`T`\> +[`MutationFnParams`](../type-aliases/MutationFnParams.md)\<`T`\> #### Returns diff --git a/docs/reference/interfaces/CurrentStateAsChangesOptions.md b/docs/reference/interfaces/CurrentStateAsChangesOptions.md index 0774a7c7b..58063467c 100644 --- a/docs/reference/interfaces/CurrentStateAsChangesOptions.md +++ b/docs/reference/interfaces/CurrentStateAsChangesOptions.md @@ -5,7 +5,7 @@ title: CurrentStateAsChangesOptions # Interface: CurrentStateAsChangesOptions -Defined in: [packages/db/src/types.ts:741](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L741) +Defined in: [packages/db/src/types.ts:796](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L796) Options for getting current state as changes @@ -17,7 +17,7 @@ Options for getting current state as changes optional limit: number; ``` -Defined in: [packages/db/src/types.ts:745](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L745) +Defined in: [packages/db/src/types.ts:800](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L800) *** @@ -27,7 +27,7 @@ Defined in: [packages/db/src/types.ts:745](https://github.com/TanStack/db/blob/m optional optimizedOnly: boolean; ``` -Defined in: [packages/db/src/types.ts:746](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L746) +Defined in: [packages/db/src/types.ts:801](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L801) *** @@ -37,7 +37,7 @@ Defined in: [packages/db/src/types.ts:746](https://github.com/TanStack/db/blob/m optional orderBy: OrderBy; ``` -Defined in: [packages/db/src/types.ts:744](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L744) +Defined in: [packages/db/src/types.ts:799](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L799) *** @@ -47,6 +47,6 @@ Defined in: [packages/db/src/types.ts:744](https://github.com/TanStack/db/blob/m optional where: BasicExpression; ``` -Defined in: [packages/db/src/types.ts:743](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L743) +Defined in: [packages/db/src/types.ts:798](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L798) Pre-compiled expression for filtering the current state diff --git a/docs/reference/interfaces/DebounceStrategy.md b/docs/reference/interfaces/DebounceStrategy.md index f0418edc7..9ca361705 100644 --- a/docs/reference/interfaces/DebounceStrategy.md +++ b/docs/reference/interfaces/DebounceStrategy.md @@ -11,7 +11,7 @@ Debounce strategy that delays execution until activity stops ## Extends -- [`BaseStrategy`](../BaseStrategy.md)\<`"debounce"`\> +- [`BaseStrategy`](BaseStrategy.md)\<`"debounce"`\> ## Properties @@ -27,7 +27,7 @@ Type discriminator for strategy identification #### Inherited from -[`BaseStrategy`](../BaseStrategy.md).[`_type`](../BaseStrategy.md#_type) +[`BaseStrategy`](BaseStrategy.md).[`_type`](BaseStrategy.md#_type) *** @@ -48,7 +48,7 @@ Should be called when the strategy is no longer needed #### Inherited from -[`BaseStrategy`](../BaseStrategy.md).[`cleanup`](../BaseStrategy.md#cleanup) +[`BaseStrategy`](BaseStrategy.md).[`cleanup`](BaseStrategy.md#cleanup) *** @@ -72,7 +72,7 @@ Execute a function according to the strategy's timing rules ##### fn -() => [`Transaction`](../Transaction.md)\<`T`\> +() => [`Transaction`](Transaction.md)\<`T`\> The function to execute @@ -84,7 +84,7 @@ The result of the function execution (if applicable) #### Inherited from -[`BaseStrategy`](../BaseStrategy.md).[`execute`](../BaseStrategy.md#execute) +[`BaseStrategy`](BaseStrategy.md).[`execute`](BaseStrategy.md#execute) *** diff --git a/docs/reference/interfaces/IndexInterface.md b/docs/reference/interfaces/IndexInterface.md index ebb33b416..5a649aa31 100644 --- a/docs/reference/interfaces/IndexInterface.md +++ b/docs/reference/interfaces/IndexInterface.md @@ -103,7 +103,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:70](https://github.com/TanSta #### Returns -[`IndexStats`](../IndexStats.md) +[`IndexStats`](IndexStats.md) *** @@ -183,7 +183,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:68](https://github.com/TanSta ##### direction -[`OrderByDirection`](../../@tanstack/namespaces/IR/type-aliases/OrderByDirection.md) +[`OrderByDirection`](../@tanstack/namespaces/IR/type-aliases/OrderByDirection.md) #### Returns @@ -223,7 +223,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:43](https://github.com/TanSta ##### options -[`RangeQueryOptions`](../RangeQueryOptions.md) +[`RangeQueryOptions`](RangeQueryOptions.md) #### Returns @@ -243,7 +243,7 @@ Defined in: [packages/db/src/indexes/base-index.ts:44](https://github.com/TanSta ##### options -[`RangeQueryOptions`](../RangeQueryOptions.md) +[`RangeQueryOptions`](RangeQueryOptions.md) #### Returns diff --git a/docs/reference/interfaces/IndexOptions.md b/docs/reference/interfaces/IndexOptions.md index 8a99a578a..3ca169871 100644 --- a/docs/reference/interfaces/IndexOptions.md +++ b/docs/reference/interfaces/IndexOptions.md @@ -13,7 +13,7 @@ Enhanced index options that support both sync and async resolvers ### TResolver -`TResolver` *extends* [`IndexResolver`](../../type-aliases/IndexResolver.md) = [`IndexResolver`](../../type-aliases/IndexResolver.md) +`TResolver` *extends* [`IndexResolver`](../type-aliases/IndexResolver.md) = [`IndexResolver`](../type-aliases/IndexResolver.md) ## Properties diff --git a/docs/reference/interfaces/InsertConfig.md b/docs/reference/interfaces/InsertConfig.md index 47410c1e4..5ea89658c 100644 --- a/docs/reference/interfaces/InsertConfig.md +++ b/docs/reference/interfaces/InsertConfig.md @@ -5,7 +5,7 @@ title: InsertConfig # Interface: InsertConfig -Defined in: [packages/db/src/types.ts:356](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L356) +Defined in: [packages/db/src/types.ts:411](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L411) ## Properties @@ -15,7 +15,7 @@ Defined in: [packages/db/src/types.ts:356](https://github.com/TanStack/db/blob/m optional metadata: Record; ``` -Defined in: [packages/db/src/types.ts:357](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L357) +Defined in: [packages/db/src/types.ts:412](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L412) *** @@ -25,6 +25,6 @@ Defined in: [packages/db/src/types.ts:357](https://github.com/TanStack/db/blob/m optional optimistic: boolean; ``` -Defined in: [packages/db/src/types.ts:359](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L359) +Defined in: [packages/db/src/types.ts:414](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L414) Whether to apply optimistic updates immediately. Defaults to true. diff --git a/docs/reference/interfaces/LiveQueryCollectionConfig.md b/docs/reference/interfaces/LiveQueryCollectionConfig.md index 1c3a8ed77..b2b9df507 100644 --- a/docs/reference/interfaces/LiveQueryCollectionConfig.md +++ b/docs/reference/interfaces/LiveQueryCollectionConfig.md @@ -35,11 +35,11 @@ const config: LiveQueryCollectionConfig = { ### TContext -`TContext` *extends* [`Context`](../Context.md) +`TContext` *extends* [`Context`](Context.md) ### TResult -`TResult` *extends* `object` = [`GetResult`](../../type-aliases/GetResult.md)\<`TContext`\> & `object` +`TResult` *extends* `object` = [`GetResult`](../type-aliases/GetResult.md)\<`TContext`\> & `object` ## Properties diff --git a/docs/reference/interfaces/LocalOnlyCollectionConfig.md b/docs/reference/interfaces/LocalOnlyCollectionConfig.md index 5174a1e32..9ca473d97 100644 --- a/docs/reference/interfaces/LocalOnlyCollectionConfig.md +++ b/docs/reference/interfaces/LocalOnlyCollectionConfig.md @@ -11,7 +11,7 @@ Configuration interface for Local-only collection options ## Extends -- `Omit`\<[`BaseCollectionConfig`](../BaseCollectionConfig.md)\<`T`, `TKey`, `TSchema`, [`LocalOnlyCollectionUtils`](../LocalOnlyCollectionUtils.md)\>, `"gcTime"` \| `"startSync"`\> +- `Omit`\<[`BaseCollectionConfig`](BaseCollectionConfig.md)\<`T`, `TKey`, `TSchema`, [`LocalOnlyCollectionUtils`](LocalOnlyCollectionUtils.md)\>, `"gcTime"` \| `"startSync"`\> ## Type Parameters @@ -41,7 +41,7 @@ The type of the key returned by `getKey` optional autoIndex: "eager" | "off"; ``` -Defined in: [packages/db/src/types.ts:487](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L487) +Defined in: [packages/db/src/types.ts:542](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L542) Auto-indexing mode for the collection. When enabled, indexes will be automatically created for simple where expressions. @@ -59,7 +59,7 @@ When enabled, indexes will be automatically created for simple where expressions #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`autoIndex`](../BaseCollectionConfig.md#autoindex) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`autoIndex`](BaseCollectionConfig.md#autoindex) *** @@ -69,7 +69,7 @@ When enabled, indexes will be automatically created for simple where expressions optional compare: (x, y) => number; ``` -Defined in: [packages/db/src/types.ts:498](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L498) +Defined in: [packages/db/src/types.ts:553](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L553) Optional function to compare two items. This is used to order the items in the collection. @@ -115,7 +115,7 @@ Omit.compare optional defaultStringCollation: StringCollationConfig; ``` -Defined in: [packages/db/src/types.ts:644](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L644) +Defined in: [packages/db/src/types.ts:699](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L699) Specifies how to compare data in the collection. This should be configured to match data ordering on the backend. @@ -136,7 +136,7 @@ Omit.defaultStringCollation getKey: (item) => TKey; ``` -Defined in: [packages/db/src/types.ts:462](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L462) +Defined in: [packages/db/src/types.ts:517](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L517) Function to extract the ID from an object This is required for update/delete operations which now only accept IDs @@ -176,11 +176,11 @@ Omit.getKey optional id: string; ``` -Defined in: [packages/db/src/types.ts:451](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L451) +Defined in: [packages/db/src/types.ts:506](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L506) #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`id`](../BaseCollectionConfig.md#id) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`id`](BaseCollectionConfig.md#id) *** @@ -203,7 +203,7 @@ This data will be applied during the initial sync process optional onDelete: DeleteMutationFn; ``` -Defined in: [packages/db/src/types.ts:636](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L636) +Defined in: [packages/db/src/types.ts:691](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L691) Optional asynchronous handler function called before a delete operation @@ -273,7 +273,7 @@ Omit.onDelete optional onInsert: InsertMutationFn; ``` -Defined in: [packages/db/src/types.ts:549](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L549) +Defined in: [packages/db/src/types.ts:604](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L604) Optional asynchronous handler function called before an insert operation @@ -342,7 +342,7 @@ Omit.onInsert optional onUpdate: UpdateMutationFn; ``` -Defined in: [packages/db/src/types.ts:593](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L593) +Defined in: [packages/db/src/types.ts:648](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L648) Optional asynchronous handler function called before an update operation @@ -412,7 +412,7 @@ Omit.onUpdate optional schema: TSchema; ``` -Defined in: [packages/db/src/types.ts:452](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L452) +Defined in: [packages/db/src/types.ts:507](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L507) #### Inherited from @@ -428,7 +428,7 @@ Omit.schema optional syncMode: SyncMode; ``` -Defined in: [packages/db/src/types.ts:507](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L507) +Defined in: [packages/db/src/types.ts:562](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L562) The mode of sync to use for the collection. @@ -444,7 +444,7 @@ The exact implementation of the sync mode is up to the sync implementation. #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`syncMode`](../BaseCollectionConfig.md#syncmode) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`syncMode`](BaseCollectionConfig.md#syncmode) *** @@ -454,7 +454,7 @@ The exact implementation of the sync mode is up to the sync implementation. optional utils: LocalOnlyCollectionUtils; ``` -Defined in: [packages/db/src/types.ts:646](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L646) +Defined in: [packages/db/src/types.ts:701](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L701) #### Inherited from diff --git a/docs/reference/interfaces/LocalOnlyCollectionUtils.md b/docs/reference/interfaces/LocalOnlyCollectionUtils.md index 75d3e41ce..c86fbc07b 100644 --- a/docs/reference/interfaces/LocalOnlyCollectionUtils.md +++ b/docs/reference/interfaces/LocalOnlyCollectionUtils.md @@ -11,7 +11,7 @@ Local-only collection utilities type ## Extends -- [`UtilsRecord`](../../type-aliases/UtilsRecord.md) +- [`UtilsRecord`](../type-aliases/UtilsRecord.md) ## Indexable @@ -40,7 +40,7 @@ The transaction containing mutations to accept ###### mutations -[`PendingMutation`](../PendingMutation.md)\<`Record`\<`string`, `unknown`\>, [`OperationType`](../../type-aliases/OperationType.md), [`Collection`](../Collection.md)\<`Record`\<`string`, `unknown`\>, `any`, `any`, `any`, `any`\>\>[] +[`PendingMutation`](PendingMutation.md)\<`Record`\<`string`, `unknown`\>, [`OperationType`](../type-aliases/OperationType.md), [`Collection`](Collection.md)\<`Record`\<`string`, `unknown`\>, `any`, `any`, `any`, `any`\>\>[] #### Returns diff --git a/docs/reference/interfaces/LocalStorageCollectionConfig.md b/docs/reference/interfaces/LocalStorageCollectionConfig.md index 358d4e72f..ea895db11 100644 --- a/docs/reference/interfaces/LocalStorageCollectionConfig.md +++ b/docs/reference/interfaces/LocalStorageCollectionConfig.md @@ -11,7 +11,7 @@ Configuration interface for localStorage collection options ## Extends -- [`BaseCollectionConfig`](../BaseCollectionConfig.md)\<`T`, `TKey`, `TSchema`\> +- [`BaseCollectionConfig`](BaseCollectionConfig.md)\<`T`, `TKey`, `TSchema`\> ## Type Parameters @@ -41,7 +41,7 @@ The type of the key returned by `getKey` optional autoIndex: "eager" | "off"; ``` -Defined in: [packages/db/src/types.ts:487](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L487) +Defined in: [packages/db/src/types.ts:542](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L542) Auto-indexing mode for the collection. When enabled, indexes will be automatically created for simple where expressions. @@ -59,7 +59,7 @@ When enabled, indexes will be automatically created for simple where expressions #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`autoIndex`](../BaseCollectionConfig.md#autoindex) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`autoIndex`](BaseCollectionConfig.md#autoindex) *** @@ -69,7 +69,7 @@ When enabled, indexes will be automatically created for simple where expressions optional compare: (x, y) => number; ``` -Defined in: [packages/db/src/types.ts:498](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L498) +Defined in: [packages/db/src/types.ts:553](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L553) Optional function to compare two items. This is used to order the items in the collection. @@ -103,7 +103,7 @@ compare: (x, y) => x.createdAt.getTime() - y.createdAt.getTime() #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`compare`](../BaseCollectionConfig.md#compare) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`compare`](BaseCollectionConfig.md#compare) *** @@ -113,7 +113,7 @@ compare: (x, y) => x.createdAt.getTime() - y.createdAt.getTime() optional defaultStringCollation: StringCollationConfig; ``` -Defined in: [packages/db/src/types.ts:644](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L644) +Defined in: [packages/db/src/types.ts:699](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L699) Specifies how to compare data in the collection. This should be configured to match data ordering on the backend. @@ -122,7 +122,7 @@ E.g., when using the Electric DB collection these options #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`defaultStringCollation`](../BaseCollectionConfig.md#defaultstringcollation) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`defaultStringCollation`](BaseCollectionConfig.md#defaultstringcollation) *** @@ -132,14 +132,14 @@ E.g., when using the Electric DB collection these options optional gcTime: number; ``` -Defined in: [packages/db/src/types.ts:467](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L467) +Defined in: [packages/db/src/types.ts:522](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L522) Time in milliseconds after which the collection will be garbage collected when it has no active subscribers. Defaults to 5 minutes (300000ms). #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`gcTime`](../BaseCollectionConfig.md#gctime) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`gcTime`](BaseCollectionConfig.md#gctime) *** @@ -149,7 +149,7 @@ when it has no active subscribers. Defaults to 5 minutes (300000ms). getKey: (item) => TKey; ``` -Defined in: [packages/db/src/types.ts:462](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L462) +Defined in: [packages/db/src/types.ts:517](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L517) Function to extract the ID from an object This is required for update/delete operations which now only accept IDs @@ -177,7 +177,7 @@ getKey: (item) => item.uuid #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`getKey`](../BaseCollectionConfig.md#getkey) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`getKey`](BaseCollectionConfig.md#getkey) *** @@ -187,11 +187,11 @@ getKey: (item) => item.uuid optional id: string; ``` -Defined in: [packages/db/src/types.ts:451](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L451) +Defined in: [packages/db/src/types.ts:506](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L506) #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`id`](../BaseCollectionConfig.md#id) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`id`](BaseCollectionConfig.md#id) *** @@ -201,7 +201,7 @@ Defined in: [packages/db/src/types.ts:451](https://github.com/TanStack/db/blob/m optional onDelete: DeleteMutationFn; ``` -Defined in: [packages/db/src/types.ts:636](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L636) +Defined in: [packages/db/src/types.ts:691](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L691) Optional asynchronous handler function called before a delete operation @@ -259,7 +259,7 @@ onDelete: async ({ transaction, collection }) => { #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`onDelete`](../BaseCollectionConfig.md#ondelete) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`onDelete`](BaseCollectionConfig.md#ondelete) *** @@ -269,7 +269,7 @@ onDelete: async ({ transaction, collection }) => { optional onInsert: InsertMutationFn; ``` -Defined in: [packages/db/src/types.ts:549](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L549) +Defined in: [packages/db/src/types.ts:604](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L604) Optional asynchronous handler function called before an insert operation @@ -326,7 +326,7 @@ onInsert: async ({ transaction, collection }) => { #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`onInsert`](../BaseCollectionConfig.md#oninsert) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`onInsert`](BaseCollectionConfig.md#oninsert) *** @@ -336,7 +336,7 @@ onInsert: async ({ transaction, collection }) => { optional onUpdate: UpdateMutationFn; ``` -Defined in: [packages/db/src/types.ts:593](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L593) +Defined in: [packages/db/src/types.ts:648](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L648) Optional asynchronous handler function called before an update operation @@ -394,7 +394,7 @@ onUpdate: async ({ transaction, collection }) => { #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`onUpdate`](../BaseCollectionConfig.md#onupdate) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`onUpdate`](BaseCollectionConfig.md#onupdate) *** @@ -417,11 +417,11 @@ Defaults to JSON optional schema: TSchema; ``` -Defined in: [packages/db/src/types.ts:452](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L452) +Defined in: [packages/db/src/types.ts:507](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L507) #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`schema`](../BaseCollectionConfig.md#schema) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`schema`](BaseCollectionConfig.md#schema) *** @@ -431,7 +431,7 @@ Defined in: [packages/db/src/types.ts:452](https://github.com/TanStack/db/blob/m optional startSync: boolean; ``` -Defined in: [packages/db/src/types.ts:478](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L478) +Defined in: [packages/db/src/types.ts:533](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L533) Whether to eagerly start syncing on collection creation. When true, syncing begins immediately. When false, syncing starts when the first subscriber attaches. @@ -448,7 +448,7 @@ false #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`startSync`](../BaseCollectionConfig.md#startsync) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`startSync`](BaseCollectionConfig.md#startsync) *** @@ -496,7 +496,7 @@ The key to use for storing the collection data in localStorage/sessionStorage optional syncMode: SyncMode; ``` -Defined in: [packages/db/src/types.ts:507](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L507) +Defined in: [packages/db/src/types.ts:562](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L562) The mode of sync to use for the collection. @@ -512,7 +512,7 @@ The exact implementation of the sync mode is up to the sync implementation. #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`syncMode`](../BaseCollectionConfig.md#syncmode) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`syncMode`](BaseCollectionConfig.md#syncmode) *** @@ -522,8 +522,8 @@ The exact implementation of the sync mode is up to the sync implementation. optional utils: UtilsRecord; ``` -Defined in: [packages/db/src/types.ts:646](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L646) +Defined in: [packages/db/src/types.ts:701](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L701) #### Inherited from -[`BaseCollectionConfig`](../BaseCollectionConfig.md).[`utils`](../BaseCollectionConfig.md#utils) +[`BaseCollectionConfig`](BaseCollectionConfig.md).[`utils`](BaseCollectionConfig.md#utils) diff --git a/docs/reference/interfaces/LocalStorageCollectionUtils.md b/docs/reference/interfaces/LocalStorageCollectionUtils.md index 9b35e540d..9472f18f6 100644 --- a/docs/reference/interfaces/LocalStorageCollectionUtils.md +++ b/docs/reference/interfaces/LocalStorageCollectionUtils.md @@ -11,7 +11,7 @@ LocalStorage collection utilities type ## Extends -- [`UtilsRecord`](../../type-aliases/UtilsRecord.md) +- [`UtilsRecord`](../type-aliases/UtilsRecord.md) ## Indexable @@ -40,7 +40,7 @@ The transaction containing mutations to accept ###### mutations -[`PendingMutation`](../PendingMutation.md)\<`Record`\<`string`, `unknown`\>, [`OperationType`](../../type-aliases/OperationType.md), [`Collection`](../Collection.md)\<`Record`\<`string`, `unknown`\>, `any`, `any`, `any`, `any`\>\>[] +[`PendingMutation`](PendingMutation.md)\<`Record`\<`string`, `unknown`\>, [`OperationType`](../type-aliases/OperationType.md), [`Collection`](Collection.md)\<`Record`\<`string`, `unknown`\>, `any`, `any`, `any`, `any`\>\>[] #### Returns diff --git a/docs/reference/interfaces/OperationConfig.md b/docs/reference/interfaces/OperationConfig.md index 66c3e6e55..c0df1505d 100644 --- a/docs/reference/interfaces/OperationConfig.md +++ b/docs/reference/interfaces/OperationConfig.md @@ -5,7 +5,7 @@ title: OperationConfig # Interface: OperationConfig -Defined in: [packages/db/src/types.ts:350](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L350) +Defined in: [packages/db/src/types.ts:405](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L405) ## Properties @@ -15,7 +15,7 @@ Defined in: [packages/db/src/types.ts:350](https://github.com/TanStack/db/blob/m optional metadata: Record; ``` -Defined in: [packages/db/src/types.ts:351](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L351) +Defined in: [packages/db/src/types.ts:406](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L406) *** @@ -25,6 +25,6 @@ Defined in: [packages/db/src/types.ts:351](https://github.com/TanStack/db/blob/m optional optimistic: boolean; ``` -Defined in: [packages/db/src/types.ts:353](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L353) +Defined in: [packages/db/src/types.ts:408](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L408) Whether to apply optimistic updates immediately. Defaults to true. diff --git a/docs/reference/interfaces/OptimisticChangeMessage.md b/docs/reference/interfaces/OptimisticChangeMessage.md deleted file mode 100644 index cda28f0f3..000000000 --- a/docs/reference/interfaces/OptimisticChangeMessage.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -id: OptimisticChangeMessage -title: OptimisticChangeMessage ---- - -# Interface: OptimisticChangeMessage\ - -Defined in: [packages/db/src/types.ts:325](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L325) - -## Extends - -- [`ChangeMessage`](../ChangeMessage.md)\<`T`\> - -## Type Parameters - -### T - -`T` *extends* `object` = `Record`\<`string`, `unknown`\> - -## Properties - -### isActive? - -```ts -optional isActive: boolean; -``` - -Defined in: [packages/db/src/types.ts:329](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L329) - -*** - -### key - -```ts -key: string | number; -``` - -Defined in: [packages/db/src/types.ts:318](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L318) - -#### Inherited from - -[`ChangeMessage`](../ChangeMessage.md).[`key`](../ChangeMessage.md#key) - -*** - -### metadata? - -```ts -optional metadata: Record; -``` - -Defined in: [packages/db/src/types.ts:322](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L322) - -#### Inherited from - -[`ChangeMessage`](../ChangeMessage.md).[`metadata`](../ChangeMessage.md#metadata) - -*** - -### previousValue? - -```ts -optional previousValue: T; -``` - -Defined in: [packages/db/src/types.ts:320](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L320) - -#### Inherited from - -[`ChangeMessage`](../ChangeMessage.md).[`previousValue`](../ChangeMessage.md#previousvalue) - -*** - -### type - -```ts -type: OperationType; -``` - -Defined in: [packages/db/src/types.ts:321](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L321) - -#### Inherited from - -[`ChangeMessage`](../ChangeMessage.md).[`type`](../ChangeMessage.md#type) - -*** - -### value - -```ts -value: T; -``` - -Defined in: [packages/db/src/types.ts:319](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L319) - -#### Inherited from - -[`ChangeMessage`](../ChangeMessage.md).[`value`](../ChangeMessage.md#value) diff --git a/docs/reference/interfaces/PendingMutation.md b/docs/reference/interfaces/PendingMutation.md index 2a5264f25..2b9c68cc9 100644 --- a/docs/reference/interfaces/PendingMutation.md +++ b/docs/reference/interfaces/PendingMutation.md @@ -18,11 +18,11 @@ Contains information about the original and modified data, as well as metadata ### TOperation -`TOperation` *extends* [`OperationType`](../../type-aliases/OperationType.md) = [`OperationType`](../../type-aliases/OperationType.md) +`TOperation` *extends* [`OperationType`](../type-aliases/OperationType.md) = [`OperationType`](../type-aliases/OperationType.md) ### TCollection -`TCollection` *extends* [`Collection`](../Collection.md)\<`T`, `any`, `any`, `any`, `any`\> = [`Collection`](../Collection.md)\<`T`, `any`, `any`, `any`, `any`\> +`TCollection` *extends* [`Collection`](Collection.md)\<`T`, `any`, `any`, `any`, `any`\> = [`Collection`](Collection.md)\<`T`, `any`, `any`, `any`, `any`\> ## Properties diff --git a/docs/reference/interfaces/QueueStrategy.md b/docs/reference/interfaces/QueueStrategy.md index d22576848..b38776d5c 100644 --- a/docs/reference/interfaces/QueueStrategy.md +++ b/docs/reference/interfaces/QueueStrategy.md @@ -13,7 +13,7 @@ LIFO: { addItemsTo: 'back', getItemsFrom: 'back' } ## Extends -- [`BaseStrategy`](../BaseStrategy.md)\<`"queue"`\> +- [`BaseStrategy`](BaseStrategy.md)\<`"queue"`\> ## Properties @@ -29,7 +29,7 @@ Type discriminator for strategy identification #### Inherited from -[`BaseStrategy`](../BaseStrategy.md).[`_type`](../BaseStrategy.md#_type) +[`BaseStrategy`](BaseStrategy.md).[`_type`](BaseStrategy.md#_type) *** @@ -50,7 +50,7 @@ Should be called when the strategy is no longer needed #### Inherited from -[`BaseStrategy`](../BaseStrategy.md).[`cleanup`](../BaseStrategy.md#cleanup) +[`BaseStrategy`](BaseStrategy.md).[`cleanup`](BaseStrategy.md#cleanup) *** @@ -74,7 +74,7 @@ Execute a function according to the strategy's timing rules ##### fn -() => [`Transaction`](../Transaction.md)\<`T`\> +() => [`Transaction`](Transaction.md)\<`T`\> The function to execute @@ -86,7 +86,7 @@ The result of the function execution (if applicable) #### Inherited from -[`BaseStrategy`](../BaseStrategy.md).[`execute`](../BaseStrategy.md#execute) +[`BaseStrategy`](BaseStrategy.md).[`execute`](BaseStrategy.md#execute) *** diff --git a/docs/reference/interfaces/RangeQueryOptions.md b/docs/reference/interfaces/RangeQueryOptions.md index cae26c2a6..cdf9c1ba4 100644 --- a/docs/reference/interfaces/RangeQueryOptions.md +++ b/docs/reference/interfaces/RangeQueryOptions.md @@ -5,7 +5,7 @@ title: RangeQueryOptions # Interface: RangeQueryOptions -Defined in: [packages/db/src/indexes/btree-index.ts:19](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L19) +Defined in: [packages/db/src/indexes/btree-index.ts:20](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L20) Options for range queries @@ -17,7 +17,7 @@ Options for range queries optional from: any; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:20](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L20) +Defined in: [packages/db/src/indexes/btree-index.ts:21](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L21) *** @@ -27,7 +27,7 @@ Defined in: [packages/db/src/indexes/btree-index.ts:20](https://github.com/TanSt optional fromInclusive: boolean; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:22](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L22) +Defined in: [packages/db/src/indexes/btree-index.ts:23](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L23) *** @@ -37,7 +37,7 @@ Defined in: [packages/db/src/indexes/btree-index.ts:22](https://github.com/TanSt optional to: any; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:21](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L21) +Defined in: [packages/db/src/indexes/btree-index.ts:22](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L22) *** @@ -47,4 +47,4 @@ Defined in: [packages/db/src/indexes/btree-index.ts:21](https://github.com/TanSt optional toInclusive: boolean; ``` -Defined in: [packages/db/src/indexes/btree-index.ts:23](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L23) +Defined in: [packages/db/src/indexes/btree-index.ts:24](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/btree-index.ts#L24) diff --git a/docs/reference/interfaces/SubscribeChangesOptions.md b/docs/reference/interfaces/SubscribeChangesOptions.md index 901fa75b6..2af6fbdcd 100644 --- a/docs/reference/interfaces/SubscribeChangesOptions.md +++ b/docs/reference/interfaces/SubscribeChangesOptions.md @@ -5,7 +5,7 @@ title: SubscribeChangesOptions # Interface: SubscribeChangesOptions -Defined in: [packages/db/src/types.ts:723](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L723) +Defined in: [packages/db/src/types.ts:778](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L778) Options for subscribing to collection changes @@ -17,7 +17,7 @@ Options for subscribing to collection changes optional includeInitialState: boolean; ``` -Defined in: [packages/db/src/types.ts:725](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L725) +Defined in: [packages/db/src/types.ts:780](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L780) Whether to include the current state as initial changes @@ -29,6 +29,6 @@ Whether to include the current state as initial changes optional whereExpression: BasicExpression; ``` -Defined in: [packages/db/src/types.ts:727](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L727) +Defined in: [packages/db/src/types.ts:782](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L782) Pre-compiled expression for filtering changes diff --git a/docs/reference/interfaces/SubscribeChangesSnapshotOptions.md b/docs/reference/interfaces/SubscribeChangesSnapshotOptions.md index 34d59c8ad..5d6296f43 100644 --- a/docs/reference/interfaces/SubscribeChangesSnapshotOptions.md +++ b/docs/reference/interfaces/SubscribeChangesSnapshotOptions.md @@ -5,11 +5,11 @@ title: SubscribeChangesSnapshotOptions # Interface: SubscribeChangesSnapshotOptions -Defined in: [packages/db/src/types.ts:730](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L730) +Defined in: [packages/db/src/types.ts:785](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L785) ## Extends -- `Omit`\<[`SubscribeChangesOptions`](../SubscribeChangesOptions.md), `"includeInitialState"`\> +- `Omit`\<[`SubscribeChangesOptions`](SubscribeChangesOptions.md), `"includeInitialState"`\> ## Properties @@ -19,7 +19,7 @@ Defined in: [packages/db/src/types.ts:730](https://github.com/TanStack/db/blob/m optional limit: number; ``` -Defined in: [packages/db/src/types.ts:735](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L735) +Defined in: [packages/db/src/types.ts:790](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L790) *** @@ -29,7 +29,7 @@ Defined in: [packages/db/src/types.ts:735](https://github.com/TanStack/db/blob/m optional orderBy: OrderBy; ``` -Defined in: [packages/db/src/types.ts:734](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L734) +Defined in: [packages/db/src/types.ts:789](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L789) *** @@ -39,10 +39,10 @@ Defined in: [packages/db/src/types.ts:734](https://github.com/TanStack/db/blob/m optional whereExpression: BasicExpression; ``` -Defined in: [packages/db/src/types.ts:727](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L727) +Defined in: [packages/db/src/types.ts:782](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L782) Pre-compiled expression for filtering changes #### Inherited from -[`SubscribeChangesOptions`](../SubscribeChangesOptions.md).[`whereExpression`](../SubscribeChangesOptions.md#whereexpression) +[`SubscribeChangesOptions`](SubscribeChangesOptions.md).[`whereExpression`](SubscribeChangesOptions.md#whereexpression) diff --git a/docs/reference/interfaces/Subscription.md b/docs/reference/interfaces/Subscription.md index 7c7e38148..c8cb4a790 100644 --- a/docs/reference/interfaces/Subscription.md +++ b/docs/reference/interfaces/Subscription.md @@ -12,7 +12,7 @@ Used by sync implementations to track subscription lifecycle ## Extends -- `EventEmitter`\<[`SubscriptionEvents`](../../type-aliases/SubscriptionEvents.md)\> +- `EventEmitter`\<[`SubscriptionEvents`](../type-aliases/SubscriptionEvents.md)\> ## Properties @@ -66,7 +66,7 @@ Emit an event to all listeners ##### T -`T` *extends* keyof [`SubscriptionEvents`](../../type-aliases/SubscriptionEvents.md) +`T` *extends* keyof [`SubscriptionEvents`](../type-aliases/SubscriptionEvents.md) #### Parameters @@ -78,7 +78,7 @@ Event name to emit ##### eventPayload -[`SubscriptionEvents`](../../type-aliases/SubscriptionEvents.md)\[`T`\] +[`SubscriptionEvents`](../type-aliases/SubscriptionEvents.md)\[`T`\] Event payload For use by subclasses - subclasses should wrap this with a public emit if needed @@ -109,7 +109,7 @@ Unsubscribe from an event ##### T -`T` *extends* keyof [`SubscriptionEvents`](../../type-aliases/SubscriptionEvents.md) +`T` *extends* keyof [`SubscriptionEvents`](../type-aliases/SubscriptionEvents.md) #### Parameters @@ -151,7 +151,7 @@ Subscribe to an event ##### T -`T` *extends* keyof [`SubscriptionEvents`](../../type-aliases/SubscriptionEvents.md) +`T` *extends* keyof [`SubscriptionEvents`](../type-aliases/SubscriptionEvents.md) #### Parameters @@ -201,7 +201,7 @@ Subscribe to an event once (automatically unsubscribes after first emission) ##### T -`T` *extends* keyof [`SubscriptionEvents`](../../type-aliases/SubscriptionEvents.md) +`T` *extends* keyof [`SubscriptionEvents`](../type-aliases/SubscriptionEvents.md) #### Parameters @@ -251,7 +251,7 @@ Wait for an event to be emitted ##### T -`T` *extends* keyof [`SubscriptionEvents`](../../type-aliases/SubscriptionEvents.md) +`T` *extends* keyof [`SubscriptionEvents`](../type-aliases/SubscriptionEvents.md) #### Parameters @@ -269,7 +269,7 @@ Optional timeout in milliseconds #### Returns -`Promise`\<[`SubscriptionEvents`](../../type-aliases/SubscriptionEvents.md)\[`T`\]\> +`Promise`\<[`SubscriptionEvents`](../type-aliases/SubscriptionEvents.md)\[`T`\]\> Promise that resolves with the event payload diff --git a/docs/reference/interfaces/SubscriptionStatusEvent.md b/docs/reference/interfaces/SubscriptionStatusEvent.md index 4e9b14f26..a84679586 100644 --- a/docs/reference/interfaces/SubscriptionStatusEvent.md +++ b/docs/reference/interfaces/SubscriptionStatusEvent.md @@ -13,7 +13,7 @@ Event emitted when subscription status changes to a specific status ### T -`T` *extends* [`SubscriptionStatus`](../../type-aliases/SubscriptionStatus.md) +`T` *extends* [`SubscriptionStatus`](../type-aliases/SubscriptionStatus.md) ## Properties diff --git a/docs/reference/interfaces/SyncConfig.md b/docs/reference/interfaces/SyncConfig.md index d49cfbb86..f6510d576 100644 --- a/docs/reference/interfaces/SyncConfig.md +++ b/docs/reference/interfaces/SyncConfig.md @@ -5,7 +5,7 @@ title: SyncConfig # Interface: SyncConfig\ -Defined in: [packages/db/src/types.ts:285](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L285) +Defined in: [packages/db/src/types.ts:324](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L324) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [packages/db/src/types.ts:285](https://github.com/TanStack/db/blob/m optional getSyncMetadata: () => Record; ``` -Defined in: [packages/db/src/types.ts:302](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L302) +Defined in: [packages/db/src/types.ts:341](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L341) Get the sync metadata for insert operations @@ -43,7 +43,7 @@ Record containing relation information optional rowUpdateMode: "full" | "partial"; ``` -Defined in: [packages/db/src/types.ts:311](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L311) +Defined in: [packages/db/src/types.ts:350](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L350) The row update mode used to sync to the collection. @@ -67,7 +67,7 @@ sync: (params) => | SyncConfigRes; ``` -Defined in: [packages/db/src/types.ts:289](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L289) +Defined in: [packages/db/src/types.ts:328](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L328) #### Parameters @@ -79,7 +79,7 @@ Defined in: [packages/db/src/types.ts:289](https://github.com/TanStack/db/blob/m ###### collection -[`Collection`](../Collection.md)\<`T`, `TKey`, `any`, `any`, `any`\> +[`Collection`](Collection.md)\<`T`, `TKey`, `any`, `any`, `any`\> ###### commit @@ -100,5 +100,5 @@ Defined in: [packages/db/src/types.ts:289](https://github.com/TanStack/db/blob/m #### Returns \| `void` - \| [`CleanupFn`](../../type-aliases/CleanupFn.md) - \| [`SyncConfigRes`](../../type-aliases/SyncConfigRes.md) + \| [`CleanupFn`](../type-aliases/CleanupFn.md) + \| [`SyncConfigRes`](../type-aliases/SyncConfigRes.md) diff --git a/docs/reference/interfaces/ThrottleStrategy.md b/docs/reference/interfaces/ThrottleStrategy.md index e21a6f88e..0732d3b3a 100644 --- a/docs/reference/interfaces/ThrottleStrategy.md +++ b/docs/reference/interfaces/ThrottleStrategy.md @@ -11,7 +11,7 @@ Throttle strategy that spaces executions evenly over time ## Extends -- [`BaseStrategy`](../BaseStrategy.md)\<`"throttle"`\> +- [`BaseStrategy`](BaseStrategy.md)\<`"throttle"`\> ## Properties @@ -27,7 +27,7 @@ Type discriminator for strategy identification #### Inherited from -[`BaseStrategy`](../BaseStrategy.md).[`_type`](../BaseStrategy.md#_type) +[`BaseStrategy`](BaseStrategy.md).[`_type`](BaseStrategy.md#_type) *** @@ -48,7 +48,7 @@ Should be called when the strategy is no longer needed #### Inherited from -[`BaseStrategy`](../BaseStrategy.md).[`cleanup`](../BaseStrategy.md#cleanup) +[`BaseStrategy`](BaseStrategy.md).[`cleanup`](BaseStrategy.md#cleanup) *** @@ -72,7 +72,7 @@ Execute a function according to the strategy's timing rules ##### fn -() => [`Transaction`](../Transaction.md)\<`T`\> +() => [`Transaction`](Transaction.md)\<`T`\> The function to execute @@ -84,7 +84,7 @@ The result of the function execution (if applicable) #### Inherited from -[`BaseStrategy`](../BaseStrategy.md).[`execute`](../BaseStrategy.md#execute) +[`BaseStrategy`](BaseStrategy.md).[`execute`](BaseStrategy.md#execute) *** diff --git a/docs/reference/interfaces/Transaction.md b/docs/reference/interfaces/Transaction.md index 5ad434341..cffa50699 100644 --- a/docs/reference/interfaces/Transaction.md +++ b/docs/reference/interfaces/Transaction.md @@ -153,7 +153,7 @@ aligned with user intent. ##### mutations -[`PendingMutation`](../PendingMutation.md)\<`any`, [`OperationType`](../../type-aliases/OperationType.md), [`Collection`](../Collection.md)\<`any`, `any`, `any`, `any`, `any`\>\>[] +[`PendingMutation`](PendingMutation.md)\<`any`, [`OperationType`](../type-aliases/OperationType.md), [`Collection`](Collection.md)\<`any`, `any`, `any`, `any`, `any`\>\>[] Array of new mutations to apply @@ -396,7 +396,7 @@ Defined in: [packages/db/src/transactions.ts:238](https://github.com/TanStack/db ##### newState -[`TransactionState`](../../type-aliases/TransactionState.md) +[`TransactionState`](../type-aliases/TransactionState.md) #### Returns diff --git a/docs/reference/powersync-db-collection/classes/PowerSyncTransactor.md b/docs/reference/powersync-db-collection/classes/PowerSyncTransactor.md index e06450b40..b13c77ec4 100644 --- a/docs/reference/powersync-db-collection/classes/PowerSyncTransactor.md +++ b/docs/reference/powersync-db-collection/classes/PowerSyncTransactor.md @@ -57,7 +57,7 @@ Defined in: [PowerSyncTransactor.ts:55](https://github.com/TanStack/db/blob/main ##### options -[`TransactorOptions`](../../type-aliases/TransactorOptions.md) +[`TransactorOptions`](../type-aliases/TransactorOptions.md) #### Returns diff --git a/docs/reference/powersync-db-collection/functions/powerSyncCollectionOptions.md b/docs/reference/powersync-db-collection/functions/powerSyncCollectionOptions.md index e18eebcb9..a6dba45f7 100644 --- a/docs/reference/powersync-db-collection/functions/powerSyncCollectionOptions.md +++ b/docs/reference/powersync-db-collection/functions/powerSyncCollectionOptions.md @@ -32,7 +32,7 @@ Input and Output types are the SQLite column types. ### Returns -[`EnhancedPowerSyncCollectionConfig`](../../type-aliases/EnhancedPowerSyncCollectionConfig.md)\<`TTable`, `OptionalExtractedTable`\<`TTable`\>, `never`\> +[`EnhancedPowerSyncCollectionConfig`](../type-aliases/EnhancedPowerSyncCollectionConfig.md)\<`TTable`, `OptionalExtractedTable`\<`TTable`\>, `never`\> ### Example @@ -92,11 +92,11 @@ serializer specifications. Partial column overrides can be supplied to `serializ #### config -`Omit`\<`BaseCollectionConfig`\<`ExtractedTable`\<`TTable`\>, `string`, `TSchema`, `UtilsRecord`, `any`\>, `"onInsert"` \| `"onUpdate"` \| `"onDelete"` \| `"getKey"`\> & `object` & [`SerializerConfig`](../../type-aliases/SerializerConfig.md)\<`InferOutput`\<`TSchema`\>, `ExtractedTable`\<`TTable`\>\> & `object` +`Omit`\<`BaseCollectionConfig`\<`ExtractedTable`\<`TTable`\>, `string`, `TSchema`, `UtilsRecord`, `any`\>, `"onInsert"` \| `"onUpdate"` \| `"onDelete"` \| `"getKey"`\> & `object` & [`SerializerConfig`](../type-aliases/SerializerConfig.md)\<`InferOutput`\<`TSchema`\>, `ExtractedTable`\<`TTable`\>\> & `object` ### Returns -`CollectionConfig`\<[`InferPowerSyncOutputType`](../../type-aliases/InferPowerSyncOutputType.md)\<`TTable`, `TSchema`\>, `string`, `TSchema`, `UtilsRecord`\> & `object` & `object` +`CollectionConfig`\<[`InferPowerSyncOutputType`](../type-aliases/InferPowerSyncOutputType.md)\<`TTable`, `TSchema`\>, `string`, `TSchema`, `UtilsRecord`\> & `object` & `object` ### Example @@ -169,11 +169,11 @@ serializer specifications. Partial column overrides can be supplied to `serializ #### config -`Omit`\<`BaseCollectionConfig`\<`ExtractedTable`\<`TTable`\>, `string`, `TSchema`, `UtilsRecord`, `any`\>, `"onInsert"` \| `"onUpdate"` \| `"onDelete"` \| `"getKey"`\> & `object` & [`SerializerConfig`](../../type-aliases/SerializerConfig.md)\<`InferOutput`\<`TSchema`\>, `ExtractedTable`\<`TTable`\>\> & `object` +`Omit`\<`BaseCollectionConfig`\<`ExtractedTable`\<`TTable`\>, `string`, `TSchema`, `UtilsRecord`, `any`\>, `"onInsert"` \| `"onUpdate"` \| `"onDelete"` \| `"getKey"`\> & `object` & [`SerializerConfig`](../type-aliases/SerializerConfig.md)\<`InferOutput`\<`TSchema`\>, `ExtractedTable`\<`TTable`\>\> & `object` ### Returns -`CollectionConfig`\<[`InferPowerSyncOutputType`](../../type-aliases/InferPowerSyncOutputType.md)\<`TTable`, `TSchema`\>, `string`, `TSchema`, `UtilsRecord`\> & `object` & `object` +`CollectionConfig`\<[`InferPowerSyncOutputType`](../type-aliases/InferPowerSyncOutputType.md)\<`TTable`, `TSchema`\>, `string`, `TSchema`, `UtilsRecord`\> & `object` & `object` ### Example diff --git a/docs/reference/powersync-db-collection/index.md b/docs/reference/powersync-db-collection/index.md index c0894dac0..f6467856d 100644 --- a/docs/reference/powersync-db-collection/index.md +++ b/docs/reference/powersync-db-collection/index.md @@ -7,27 +7,27 @@ title: "@tanstack/powersync-db-collection" ## Classes -- [PowerSyncTransactor](../classes/PowerSyncTransactor.md) +- [PowerSyncTransactor](classes/PowerSyncTransactor.md) ## Type Aliases -- [BasePowerSyncCollectionConfig](../type-aliases/BasePowerSyncCollectionConfig.md) -- [ConfigWithArbitraryCollectionTypes](../type-aliases/ConfigWithArbitraryCollectionTypes.md) -- [ConfigWithSQLiteInputType](../type-aliases/ConfigWithSQLiteInputType.md) -- [ConfigWithSQLiteTypes](../type-aliases/ConfigWithSQLiteTypes.md) -- [CustomSQLiteSerializer](../type-aliases/CustomSQLiteSerializer.md) -- [EnhancedPowerSyncCollectionConfig](../type-aliases/EnhancedPowerSyncCollectionConfig.md) -- [InferPowerSyncOutputType](../type-aliases/InferPowerSyncOutputType.md) -- [PowerSyncCollectionConfig](../type-aliases/PowerSyncCollectionConfig.md) -- [PowerSyncCollectionMeta](../type-aliases/PowerSyncCollectionMeta.md) -- [PowerSyncCollectionUtils](../type-aliases/PowerSyncCollectionUtils.md) -- [SerializerConfig](../type-aliases/SerializerConfig.md) -- [TransactorOptions](../type-aliases/TransactorOptions.md) +- [BasePowerSyncCollectionConfig](type-aliases/BasePowerSyncCollectionConfig.md) +- [ConfigWithArbitraryCollectionTypes](type-aliases/ConfigWithArbitraryCollectionTypes.md) +- [ConfigWithSQLiteInputType](type-aliases/ConfigWithSQLiteInputType.md) +- [ConfigWithSQLiteTypes](type-aliases/ConfigWithSQLiteTypes.md) +- [CustomSQLiteSerializer](type-aliases/CustomSQLiteSerializer.md) +- [EnhancedPowerSyncCollectionConfig](type-aliases/EnhancedPowerSyncCollectionConfig.md) +- [InferPowerSyncOutputType](type-aliases/InferPowerSyncOutputType.md) +- [PowerSyncCollectionConfig](type-aliases/PowerSyncCollectionConfig.md) +- [PowerSyncCollectionMeta](type-aliases/PowerSyncCollectionMeta.md) +- [PowerSyncCollectionUtils](type-aliases/PowerSyncCollectionUtils.md) +- [SerializerConfig](type-aliases/SerializerConfig.md) +- [TransactorOptions](type-aliases/TransactorOptions.md) ## Variables -- [DEFAULT\_BATCH\_SIZE](../variables/DEFAULT_BATCH_SIZE.md) +- [DEFAULT\_BATCH\_SIZE](variables/DEFAULT_BATCH_SIZE.md) ## Functions -- [powerSyncCollectionOptions](../functions/powerSyncCollectionOptions.md) +- [powerSyncCollectionOptions](functions/powerSyncCollectionOptions.md) diff --git a/docs/reference/powersync-db-collection/type-aliases/BasePowerSyncCollectionConfig.md b/docs/reference/powersync-db-collection/type-aliases/BasePowerSyncCollectionConfig.md index ab1d26dcc..4966c6574 100644 --- a/docs/reference/powersync-db-collection/type-aliases/BasePowerSyncCollectionConfig.md +++ b/docs/reference/powersync-db-collection/type-aliases/BasePowerSyncCollectionConfig.md @@ -33,7 +33,7 @@ in-memory TanStack DB collection. #### Remarks -- Defaults to [DEFAULT\_BATCH\_SIZE](../../variables/DEFAULT_BATCH_SIZE.md) if not specified. +- Defaults to [DEFAULT\_BATCH\_SIZE](../variables/DEFAULT_BATCH_SIZE.md) if not specified. - Larger values reduce the number of round trips to the storage engine but increase memory usage per batch. - Smaller values may lower memory usage and allow earlier diff --git a/docs/reference/powersync-db-collection/type-aliases/PowerSyncCollectionUtils.md b/docs/reference/powersync-db-collection/type-aliases/PowerSyncCollectionUtils.md index 28ab62975..6657add36 100644 --- a/docs/reference/powersync-db-collection/type-aliases/PowerSyncCollectionUtils.md +++ b/docs/reference/powersync-db-collection/type-aliases/PowerSyncCollectionUtils.md @@ -31,4 +31,4 @@ Defined in: [definitions.ts:268](https://github.com/TanStack/db/blob/main/packag #### Returns -[`PowerSyncCollectionMeta`](../PowerSyncCollectionMeta.md)\<`TTable`\> +[`PowerSyncCollectionMeta`](PowerSyncCollectionMeta.md)\<`TTable`\> diff --git a/docs/reference/powersync-db-collection/type-aliases/SerializerConfig.md b/docs/reference/powersync-db-collection/type-aliases/SerializerConfig.md index f437cdbf2..2ce69107c 100644 --- a/docs/reference/powersync-db-collection/type-aliases/SerializerConfig.md +++ b/docs/reference/powersync-db-collection/type-aliases/SerializerConfig.md @@ -58,7 +58,7 @@ Defined in: [definitions.ts:87](https://github.com/TanStack/db/blob/main/package Optional partial serializer object for customizing how individual columns are serialized for SQLite. This should be a partial map of column keys to serialization functions, following the -[CustomSQLiteSerializer](../CustomSQLiteSerializer.md) type. Each function receives the column value and returns a value +[CustomSQLiteSerializer](CustomSQLiteSerializer.md) type. Each function receives the column value and returns a value compatible with SQLite storage. If not provided for a column, the default behavior is used: diff --git a/docs/reference/powersync-db-collection/variables/DEFAULT_BATCH_SIZE.md b/docs/reference/powersync-db-collection/variables/DEFAULT_BATCH_SIZE.md index 46f9f447a..16054c0b3 100644 --- a/docs/reference/powersync-db-collection/variables/DEFAULT_BATCH_SIZE.md +++ b/docs/reference/powersync-db-collection/variables/DEFAULT_BATCH_SIZE.md @@ -11,4 +11,4 @@ const DEFAULT_BATCH_SIZE: 1000 = 1000; Defined in: [definitions.ts:274](https://github.com/TanStack/db/blob/main/packages/powersync-db-collection/src/definitions.ts#L274) -Default value for [PowerSyncCollectionConfig#syncBatchSize](../../type-aliases/BasePowerSyncCollectionConfig.md). +Default value for [PowerSyncCollectionConfig#syncBatchSize](../type-aliases/BasePowerSyncCollectionConfig.md). diff --git a/docs/reference/query-db-collection/classes/DeleteOperationItemNotFoundError.md b/docs/reference/query-db-collection/classes/DeleteOperationItemNotFoundError.md index 34fa05249..ed4d24c84 100644 --- a/docs/reference/query-db-collection/classes/DeleteOperationItemNotFoundError.md +++ b/docs/reference/query-db-collection/classes/DeleteOperationItemNotFoundError.md @@ -9,7 +9,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:76](https://github.com/T ## Extends -- [`QueryCollectionError`](../QueryCollectionError.md) +- [`QueryCollectionError`](QueryCollectionError.md) ## Constructors @@ -33,7 +33,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:77](https://github.com/T #### Overrides -[`QueryCollectionError`](../QueryCollectionError.md).[`constructor`](../QueryCollectionError.md#constructor) +[`QueryCollectionError`](QueryCollectionError.md).[`constructor`](QueryCollectionError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`cause`](../QueryCollectionError.md#cause) +[`QueryCollectionError`](QueryCollectionError.md).[`cause`](QueryCollectionError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`message`](../QueryCollectionError.md#message) +[`QueryCollectionError`](QueryCollectionError.md).[`message`](QueryCollectionError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`name`](../QueryCollectionError.md#name) +[`QueryCollectionError`](QueryCollectionError.md).[`name`](QueryCollectionError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stack`](../QueryCollectionError.md#stack) +[`QueryCollectionError`](QueryCollectionError.md).[`stack`](QueryCollectionError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stackTraceLimit`](../QueryCollectionError.md#stacktracelimit) +[`QueryCollectionError`](QueryCollectionError.md).[`stackTraceLimit`](QueryCollectionError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`captureStackTrace`](../QueryCollectionError.md#capturestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`captureStackTrace`](QueryCollectionError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`prepareStackTrace`](../QueryCollectionError.md#preparestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`prepareStackTrace`](QueryCollectionError.md#preparestacktrace) diff --git a/docs/reference/query-db-collection/classes/DuplicateKeyInBatchError.md b/docs/reference/query-db-collection/classes/DuplicateKeyInBatchError.md index 7e04fe138..8c6038af9 100644 --- a/docs/reference/query-db-collection/classes/DuplicateKeyInBatchError.md +++ b/docs/reference/query-db-collection/classes/DuplicateKeyInBatchError.md @@ -9,7 +9,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:62](https://github.com/T ## Extends -- [`QueryCollectionError`](../QueryCollectionError.md) +- [`QueryCollectionError`](QueryCollectionError.md) ## Constructors @@ -33,7 +33,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:63](https://github.com/T #### Overrides -[`QueryCollectionError`](../QueryCollectionError.md).[`constructor`](../QueryCollectionError.md#constructor) +[`QueryCollectionError`](QueryCollectionError.md).[`constructor`](QueryCollectionError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`cause`](../QueryCollectionError.md#cause) +[`QueryCollectionError`](QueryCollectionError.md).[`cause`](QueryCollectionError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`message`](../QueryCollectionError.md#message) +[`QueryCollectionError`](QueryCollectionError.md).[`message`](QueryCollectionError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`name`](../QueryCollectionError.md#name) +[`QueryCollectionError`](QueryCollectionError.md).[`name`](QueryCollectionError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stack`](../QueryCollectionError.md#stack) +[`QueryCollectionError`](QueryCollectionError.md).[`stack`](QueryCollectionError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stackTraceLimit`](../QueryCollectionError.md#stacktracelimit) +[`QueryCollectionError`](QueryCollectionError.md).[`stackTraceLimit`](QueryCollectionError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`captureStackTrace`](../QueryCollectionError.md#capturestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`captureStackTrace`](QueryCollectionError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`prepareStackTrace`](../QueryCollectionError.md#preparestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`prepareStackTrace`](QueryCollectionError.md#preparestacktrace) diff --git a/docs/reference/query-db-collection/classes/GetKeyRequiredError.md b/docs/reference/query-db-collection/classes/GetKeyRequiredError.md index 6a02f66e5..adb0bb685 100644 --- a/docs/reference/query-db-collection/classes/GetKeyRequiredError.md +++ b/docs/reference/query-db-collection/classes/GetKeyRequiredError.md @@ -9,7 +9,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:32](https://github.com/T ## Extends -- [`QueryCollectionError`](../QueryCollectionError.md) +- [`QueryCollectionError`](QueryCollectionError.md) ## Constructors @@ -27,7 +27,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:33](https://github.com/T #### Overrides -[`QueryCollectionError`](../QueryCollectionError.md).[`constructor`](../QueryCollectionError.md#constructor) +[`QueryCollectionError`](QueryCollectionError.md).[`constructor`](QueryCollectionError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`cause`](../QueryCollectionError.md#cause) +[`QueryCollectionError`](QueryCollectionError.md).[`cause`](QueryCollectionError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`message`](../QueryCollectionError.md#message) +[`QueryCollectionError`](QueryCollectionError.md).[`message`](QueryCollectionError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`name`](../QueryCollectionError.md#name) +[`QueryCollectionError`](QueryCollectionError.md).[`name`](QueryCollectionError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stack`](../QueryCollectionError.md#stack) +[`QueryCollectionError`](QueryCollectionError.md).[`stack`](QueryCollectionError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stackTraceLimit`](../QueryCollectionError.md#stacktracelimit) +[`QueryCollectionError`](QueryCollectionError.md).[`stackTraceLimit`](QueryCollectionError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`captureStackTrace`](../QueryCollectionError.md#capturestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`captureStackTrace`](QueryCollectionError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`prepareStackTrace`](../QueryCollectionError.md#preparestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`prepareStackTrace`](QueryCollectionError.md#preparestacktrace) diff --git a/docs/reference/query-db-collection/classes/InvalidItemStructureError.md b/docs/reference/query-db-collection/classes/InvalidItemStructureError.md index be43e7c39..bc37f4f43 100644 --- a/docs/reference/query-db-collection/classes/InvalidItemStructureError.md +++ b/docs/reference/query-db-collection/classes/InvalidItemStructureError.md @@ -9,7 +9,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:48](https://github.com/T ## Extends -- [`QueryCollectionError`](../QueryCollectionError.md) +- [`QueryCollectionError`](QueryCollectionError.md) ## Constructors @@ -33,7 +33,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:49](https://github.com/T #### Overrides -[`QueryCollectionError`](../QueryCollectionError.md).[`constructor`](../QueryCollectionError.md#constructor) +[`QueryCollectionError`](QueryCollectionError.md).[`constructor`](QueryCollectionError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`cause`](../QueryCollectionError.md#cause) +[`QueryCollectionError`](QueryCollectionError.md).[`cause`](QueryCollectionError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`message`](../QueryCollectionError.md#message) +[`QueryCollectionError`](QueryCollectionError.md).[`message`](QueryCollectionError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`name`](../QueryCollectionError.md#name) +[`QueryCollectionError`](QueryCollectionError.md).[`name`](QueryCollectionError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stack`](../QueryCollectionError.md#stack) +[`QueryCollectionError`](QueryCollectionError.md).[`stack`](QueryCollectionError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stackTraceLimit`](../QueryCollectionError.md#stacktracelimit) +[`QueryCollectionError`](QueryCollectionError.md).[`stackTraceLimit`](QueryCollectionError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`captureStackTrace`](../QueryCollectionError.md#capturestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`captureStackTrace`](QueryCollectionError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`prepareStackTrace`](../QueryCollectionError.md#preparestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`prepareStackTrace`](QueryCollectionError.md#preparestacktrace) diff --git a/docs/reference/query-db-collection/classes/InvalidSyncOperationError.md b/docs/reference/query-db-collection/classes/InvalidSyncOperationError.md index 12f97f90f..9643105fc 100644 --- a/docs/reference/query-db-collection/classes/InvalidSyncOperationError.md +++ b/docs/reference/query-db-collection/classes/InvalidSyncOperationError.md @@ -9,7 +9,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:83](https://github.com/T ## Extends -- [`QueryCollectionError`](../QueryCollectionError.md) +- [`QueryCollectionError`](QueryCollectionError.md) ## Constructors @@ -33,7 +33,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:84](https://github.com/T #### Overrides -[`QueryCollectionError`](../QueryCollectionError.md).[`constructor`](../QueryCollectionError.md#constructor) +[`QueryCollectionError`](QueryCollectionError.md).[`constructor`](QueryCollectionError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`cause`](../QueryCollectionError.md#cause) +[`QueryCollectionError`](QueryCollectionError.md).[`cause`](QueryCollectionError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`message`](../QueryCollectionError.md#message) +[`QueryCollectionError`](QueryCollectionError.md).[`message`](QueryCollectionError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`name`](../QueryCollectionError.md#name) +[`QueryCollectionError`](QueryCollectionError.md).[`name`](QueryCollectionError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stack`](../QueryCollectionError.md#stack) +[`QueryCollectionError`](QueryCollectionError.md).[`stack`](QueryCollectionError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stackTraceLimit`](../QueryCollectionError.md#stacktracelimit) +[`QueryCollectionError`](QueryCollectionError.md).[`stackTraceLimit`](QueryCollectionError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`captureStackTrace`](../QueryCollectionError.md#capturestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`captureStackTrace`](QueryCollectionError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`prepareStackTrace`](../QueryCollectionError.md#preparestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`prepareStackTrace`](QueryCollectionError.md#preparestacktrace) diff --git a/docs/reference/query-db-collection/classes/ItemNotFoundError.md b/docs/reference/query-db-collection/classes/ItemNotFoundError.md index 682e70337..a9c7f9a17 100644 --- a/docs/reference/query-db-collection/classes/ItemNotFoundError.md +++ b/docs/reference/query-db-collection/classes/ItemNotFoundError.md @@ -9,7 +9,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:55](https://github.com/T ## Extends -- [`QueryCollectionError`](../QueryCollectionError.md) +- [`QueryCollectionError`](QueryCollectionError.md) ## Constructors @@ -33,7 +33,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:56](https://github.com/T #### Overrides -[`QueryCollectionError`](../QueryCollectionError.md).[`constructor`](../QueryCollectionError.md#constructor) +[`QueryCollectionError`](QueryCollectionError.md).[`constructor`](QueryCollectionError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`cause`](../QueryCollectionError.md#cause) +[`QueryCollectionError`](QueryCollectionError.md).[`cause`](QueryCollectionError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`message`](../QueryCollectionError.md#message) +[`QueryCollectionError`](QueryCollectionError.md).[`message`](QueryCollectionError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`name`](../QueryCollectionError.md#name) +[`QueryCollectionError`](QueryCollectionError.md).[`name`](QueryCollectionError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stack`](../QueryCollectionError.md#stack) +[`QueryCollectionError`](QueryCollectionError.md).[`stack`](QueryCollectionError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stackTraceLimit`](../QueryCollectionError.md#stacktracelimit) +[`QueryCollectionError`](QueryCollectionError.md).[`stackTraceLimit`](QueryCollectionError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`captureStackTrace`](../QueryCollectionError.md#capturestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`captureStackTrace`](QueryCollectionError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`prepareStackTrace`](../QueryCollectionError.md#preparestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`prepareStackTrace`](QueryCollectionError.md#preparestacktrace) diff --git a/docs/reference/query-db-collection/classes/MissingKeyFieldError.md b/docs/reference/query-db-collection/classes/MissingKeyFieldError.md index 6a0e666f3..a1ee4accc 100644 --- a/docs/reference/query-db-collection/classes/MissingKeyFieldError.md +++ b/docs/reference/query-db-collection/classes/MissingKeyFieldError.md @@ -9,7 +9,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:97](https://github.com/T ## Extends -- [`QueryCollectionError`](../QueryCollectionError.md) +- [`QueryCollectionError`](QueryCollectionError.md) ## Constructors @@ -37,7 +37,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:98](https://github.com/T #### Overrides -[`QueryCollectionError`](../QueryCollectionError.md).[`constructor`](../QueryCollectionError.md#constructor) +[`QueryCollectionError`](QueryCollectionError.md).[`constructor`](QueryCollectionError.md#constructor) ## Properties @@ -51,7 +51,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`cause`](../QueryCollectionError.md#cause) +[`QueryCollectionError`](QueryCollectionError.md).[`cause`](QueryCollectionError.md#cause) *** @@ -65,7 +65,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`message`](../QueryCollectionError.md#message) +[`QueryCollectionError`](QueryCollectionError.md).[`message`](QueryCollectionError.md#message) *** @@ -79,7 +79,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`name`](../QueryCollectionError.md#name) +[`QueryCollectionError`](QueryCollectionError.md).[`name`](QueryCollectionError.md#name) *** @@ -93,7 +93,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stack`](../QueryCollectionError.md#stack) +[`QueryCollectionError`](QueryCollectionError.md).[`stack`](QueryCollectionError.md#stack) *** @@ -117,7 +117,7 @@ not capture any frames. #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stackTraceLimit`](../QueryCollectionError.md#stacktracelimit) +[`QueryCollectionError`](QueryCollectionError.md).[`stackTraceLimit`](QueryCollectionError.md#stacktracelimit) ## Methods @@ -189,7 +189,7 @@ a(); #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`captureStackTrace`](../QueryCollectionError.md#capturestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`captureStackTrace`](QueryCollectionError.md#capturestacktrace) *** @@ -221,4 +221,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`prepareStackTrace`](../QueryCollectionError.md#preparestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`prepareStackTrace`](QueryCollectionError.md#preparestacktrace) diff --git a/docs/reference/query-db-collection/classes/QueryClientRequiredError.md b/docs/reference/query-db-collection/classes/QueryClientRequiredError.md index bfd900f4b..cf983aae2 100644 --- a/docs/reference/query-db-collection/classes/QueryClientRequiredError.md +++ b/docs/reference/query-db-collection/classes/QueryClientRequiredError.md @@ -9,7 +9,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:25](https://github.com/T ## Extends -- [`QueryCollectionError`](../QueryCollectionError.md) +- [`QueryCollectionError`](QueryCollectionError.md) ## Constructors @@ -27,7 +27,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:26](https://github.com/T #### Overrides -[`QueryCollectionError`](../QueryCollectionError.md).[`constructor`](../QueryCollectionError.md#constructor) +[`QueryCollectionError`](QueryCollectionError.md).[`constructor`](QueryCollectionError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`cause`](../QueryCollectionError.md#cause) +[`QueryCollectionError`](QueryCollectionError.md).[`cause`](QueryCollectionError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`message`](../QueryCollectionError.md#message) +[`QueryCollectionError`](QueryCollectionError.md).[`message`](QueryCollectionError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`name`](../QueryCollectionError.md#name) +[`QueryCollectionError`](QueryCollectionError.md).[`name`](QueryCollectionError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stack`](../QueryCollectionError.md#stack) +[`QueryCollectionError`](QueryCollectionError.md).[`stack`](QueryCollectionError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stackTraceLimit`](../QueryCollectionError.md#stacktracelimit) +[`QueryCollectionError`](QueryCollectionError.md).[`stackTraceLimit`](QueryCollectionError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`captureStackTrace`](../QueryCollectionError.md#capturestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`captureStackTrace`](QueryCollectionError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`prepareStackTrace`](../QueryCollectionError.md#preparestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`prepareStackTrace`](QueryCollectionError.md#preparestacktrace) diff --git a/docs/reference/query-db-collection/classes/QueryCollectionError.md b/docs/reference/query-db-collection/classes/QueryCollectionError.md index 83b6c2d31..4e443177e 100644 --- a/docs/reference/query-db-collection/classes/QueryCollectionError.md +++ b/docs/reference/query-db-collection/classes/QueryCollectionError.md @@ -13,19 +13,19 @@ Defined in: [packages/query-db-collection/src/errors.ts:4](https://github.com/Ta ## Extended by -- [`QueryKeyRequiredError`](../QueryKeyRequiredError.md) -- [`QueryFnRequiredError`](../QueryFnRequiredError.md) -- [`QueryClientRequiredError`](../QueryClientRequiredError.md) -- [`GetKeyRequiredError`](../GetKeyRequiredError.md) -- [`SyncNotInitializedError`](../SyncNotInitializedError.md) -- [`InvalidItemStructureError`](../InvalidItemStructureError.md) -- [`ItemNotFoundError`](../ItemNotFoundError.md) -- [`DuplicateKeyInBatchError`](../DuplicateKeyInBatchError.md) -- [`UpdateOperationItemNotFoundError`](../UpdateOperationItemNotFoundError.md) -- [`DeleteOperationItemNotFoundError`](../DeleteOperationItemNotFoundError.md) -- [`InvalidSyncOperationError`](../InvalidSyncOperationError.md) -- [`UnknownOperationTypeError`](../UnknownOperationTypeError.md) -- [`MissingKeyFieldError`](../MissingKeyFieldError.md) +- [`QueryKeyRequiredError`](QueryKeyRequiredError.md) +- [`QueryFnRequiredError`](QueryFnRequiredError.md) +- [`QueryClientRequiredError`](QueryClientRequiredError.md) +- [`GetKeyRequiredError`](GetKeyRequiredError.md) +- [`SyncNotInitializedError`](SyncNotInitializedError.md) +- [`InvalidItemStructureError`](InvalidItemStructureError.md) +- [`ItemNotFoundError`](ItemNotFoundError.md) +- [`DuplicateKeyInBatchError`](DuplicateKeyInBatchError.md) +- [`UpdateOperationItemNotFoundError`](UpdateOperationItemNotFoundError.md) +- [`DeleteOperationItemNotFoundError`](DeleteOperationItemNotFoundError.md) +- [`InvalidSyncOperationError`](InvalidSyncOperationError.md) +- [`UnknownOperationTypeError`](UnknownOperationTypeError.md) +- [`MissingKeyFieldError`](MissingKeyFieldError.md) ## Constructors diff --git a/docs/reference/query-db-collection/classes/QueryFnRequiredError.md b/docs/reference/query-db-collection/classes/QueryFnRequiredError.md index 4ba61732f..8acbcf589 100644 --- a/docs/reference/query-db-collection/classes/QueryFnRequiredError.md +++ b/docs/reference/query-db-collection/classes/QueryFnRequiredError.md @@ -9,7 +9,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:18](https://github.com/T ## Extends -- [`QueryCollectionError`](../QueryCollectionError.md) +- [`QueryCollectionError`](QueryCollectionError.md) ## Constructors @@ -27,7 +27,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:19](https://github.com/T #### Overrides -[`QueryCollectionError`](../QueryCollectionError.md).[`constructor`](../QueryCollectionError.md#constructor) +[`QueryCollectionError`](QueryCollectionError.md).[`constructor`](QueryCollectionError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`cause`](../QueryCollectionError.md#cause) +[`QueryCollectionError`](QueryCollectionError.md).[`cause`](QueryCollectionError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`message`](../QueryCollectionError.md#message) +[`QueryCollectionError`](QueryCollectionError.md).[`message`](QueryCollectionError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`name`](../QueryCollectionError.md#name) +[`QueryCollectionError`](QueryCollectionError.md).[`name`](QueryCollectionError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stack`](../QueryCollectionError.md#stack) +[`QueryCollectionError`](QueryCollectionError.md).[`stack`](QueryCollectionError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stackTraceLimit`](../QueryCollectionError.md#stacktracelimit) +[`QueryCollectionError`](QueryCollectionError.md).[`stackTraceLimit`](QueryCollectionError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`captureStackTrace`](../QueryCollectionError.md#capturestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`captureStackTrace`](QueryCollectionError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`prepareStackTrace`](../QueryCollectionError.md#preparestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`prepareStackTrace`](QueryCollectionError.md#preparestacktrace) diff --git a/docs/reference/query-db-collection/classes/QueryKeyRequiredError.md b/docs/reference/query-db-collection/classes/QueryKeyRequiredError.md index 3988a0acb..fdbbafa46 100644 --- a/docs/reference/query-db-collection/classes/QueryKeyRequiredError.md +++ b/docs/reference/query-db-collection/classes/QueryKeyRequiredError.md @@ -9,7 +9,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:11](https://github.com/T ## Extends -- [`QueryCollectionError`](../QueryCollectionError.md) +- [`QueryCollectionError`](QueryCollectionError.md) ## Constructors @@ -27,7 +27,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:12](https://github.com/T #### Overrides -[`QueryCollectionError`](../QueryCollectionError.md).[`constructor`](../QueryCollectionError.md#constructor) +[`QueryCollectionError`](QueryCollectionError.md).[`constructor`](QueryCollectionError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`cause`](../QueryCollectionError.md#cause) +[`QueryCollectionError`](QueryCollectionError.md).[`cause`](QueryCollectionError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`message`](../QueryCollectionError.md#message) +[`QueryCollectionError`](QueryCollectionError.md).[`message`](QueryCollectionError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`name`](../QueryCollectionError.md#name) +[`QueryCollectionError`](QueryCollectionError.md).[`name`](QueryCollectionError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stack`](../QueryCollectionError.md#stack) +[`QueryCollectionError`](QueryCollectionError.md).[`stack`](QueryCollectionError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stackTraceLimit`](../QueryCollectionError.md#stacktracelimit) +[`QueryCollectionError`](QueryCollectionError.md).[`stackTraceLimit`](QueryCollectionError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`captureStackTrace`](../QueryCollectionError.md#capturestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`captureStackTrace`](QueryCollectionError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`prepareStackTrace`](../QueryCollectionError.md#preparestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`prepareStackTrace`](QueryCollectionError.md#preparestacktrace) diff --git a/docs/reference/query-db-collection/classes/SyncNotInitializedError.md b/docs/reference/query-db-collection/classes/SyncNotInitializedError.md index 8adee5e9a..25a501e89 100644 --- a/docs/reference/query-db-collection/classes/SyncNotInitializedError.md +++ b/docs/reference/query-db-collection/classes/SyncNotInitializedError.md @@ -9,7 +9,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:39](https://github.com/T ## Extends -- [`QueryCollectionError`](../QueryCollectionError.md) +- [`QueryCollectionError`](QueryCollectionError.md) ## Constructors @@ -27,7 +27,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:40](https://github.com/T #### Overrides -[`QueryCollectionError`](../QueryCollectionError.md).[`constructor`](../QueryCollectionError.md#constructor) +[`QueryCollectionError`](QueryCollectionError.md).[`constructor`](QueryCollectionError.md#constructor) ## Properties @@ -41,7 +41,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`cause`](../QueryCollectionError.md#cause) +[`QueryCollectionError`](QueryCollectionError.md).[`cause`](QueryCollectionError.md#cause) *** @@ -55,7 +55,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`message`](../QueryCollectionError.md#message) +[`QueryCollectionError`](QueryCollectionError.md).[`message`](QueryCollectionError.md#message) *** @@ -69,7 +69,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`name`](../QueryCollectionError.md#name) +[`QueryCollectionError`](QueryCollectionError.md).[`name`](QueryCollectionError.md#name) *** @@ -83,7 +83,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stack`](../QueryCollectionError.md#stack) +[`QueryCollectionError`](QueryCollectionError.md).[`stack`](QueryCollectionError.md#stack) *** @@ -107,7 +107,7 @@ not capture any frames. #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stackTraceLimit`](../QueryCollectionError.md#stacktracelimit) +[`QueryCollectionError`](QueryCollectionError.md).[`stackTraceLimit`](QueryCollectionError.md#stacktracelimit) ## Methods @@ -179,7 +179,7 @@ a(); #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`captureStackTrace`](../QueryCollectionError.md#capturestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`captureStackTrace`](QueryCollectionError.md#capturestacktrace) *** @@ -211,4 +211,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`prepareStackTrace`](../QueryCollectionError.md#preparestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`prepareStackTrace`](QueryCollectionError.md#preparestacktrace) diff --git a/docs/reference/query-db-collection/classes/UnknownOperationTypeError.md b/docs/reference/query-db-collection/classes/UnknownOperationTypeError.md index f3bb18fdd..0fd2aab5c 100644 --- a/docs/reference/query-db-collection/classes/UnknownOperationTypeError.md +++ b/docs/reference/query-db-collection/classes/UnknownOperationTypeError.md @@ -9,7 +9,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:90](https://github.com/T ## Extends -- [`QueryCollectionError`](../QueryCollectionError.md) +- [`QueryCollectionError`](QueryCollectionError.md) ## Constructors @@ -33,7 +33,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:91](https://github.com/T #### Overrides -[`QueryCollectionError`](../QueryCollectionError.md).[`constructor`](../QueryCollectionError.md#constructor) +[`QueryCollectionError`](QueryCollectionError.md).[`constructor`](QueryCollectionError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`cause`](../QueryCollectionError.md#cause) +[`QueryCollectionError`](QueryCollectionError.md).[`cause`](QueryCollectionError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`message`](../QueryCollectionError.md#message) +[`QueryCollectionError`](QueryCollectionError.md).[`message`](QueryCollectionError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`name`](../QueryCollectionError.md#name) +[`QueryCollectionError`](QueryCollectionError.md).[`name`](QueryCollectionError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stack`](../QueryCollectionError.md#stack) +[`QueryCollectionError`](QueryCollectionError.md).[`stack`](QueryCollectionError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stackTraceLimit`](../QueryCollectionError.md#stacktracelimit) +[`QueryCollectionError`](QueryCollectionError.md).[`stackTraceLimit`](QueryCollectionError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`captureStackTrace`](../QueryCollectionError.md#capturestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`captureStackTrace`](QueryCollectionError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`prepareStackTrace`](../QueryCollectionError.md#preparestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`prepareStackTrace`](QueryCollectionError.md#preparestacktrace) diff --git a/docs/reference/query-db-collection/classes/UpdateOperationItemNotFoundError.md b/docs/reference/query-db-collection/classes/UpdateOperationItemNotFoundError.md index 2745b0a98..3a86f840e 100644 --- a/docs/reference/query-db-collection/classes/UpdateOperationItemNotFoundError.md +++ b/docs/reference/query-db-collection/classes/UpdateOperationItemNotFoundError.md @@ -9,7 +9,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:69](https://github.com/T ## Extends -- [`QueryCollectionError`](../QueryCollectionError.md) +- [`QueryCollectionError`](QueryCollectionError.md) ## Constructors @@ -33,7 +33,7 @@ Defined in: [packages/query-db-collection/src/errors.ts:70](https://github.com/T #### Overrides -[`QueryCollectionError`](../QueryCollectionError.md).[`constructor`](../QueryCollectionError.md#constructor) +[`QueryCollectionError`](QueryCollectionError.md).[`constructor`](QueryCollectionError.md#constructor) ## Properties @@ -47,7 +47,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`cause`](../QueryCollectionError.md#cause) +[`QueryCollectionError`](QueryCollectionError.md).[`cause`](QueryCollectionError.md#cause) *** @@ -61,7 +61,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`message`](../QueryCollectionError.md#message) +[`QueryCollectionError`](QueryCollectionError.md).[`message`](QueryCollectionError.md#message) *** @@ -75,7 +75,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`name`](../QueryCollectionError.md#name) +[`QueryCollectionError`](QueryCollectionError.md).[`name`](QueryCollectionError.md#name) *** @@ -89,7 +89,7 @@ Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/li #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stack`](../QueryCollectionError.md#stack) +[`QueryCollectionError`](QueryCollectionError.md).[`stack`](QueryCollectionError.md#stack) *** @@ -113,7 +113,7 @@ not capture any frames. #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`stackTraceLimit`](../QueryCollectionError.md#stacktracelimit) +[`QueryCollectionError`](QueryCollectionError.md).[`stackTraceLimit`](QueryCollectionError.md#stacktracelimit) ## Methods @@ -185,7 +185,7 @@ a(); #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`captureStackTrace`](../QueryCollectionError.md#capturestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`captureStackTrace`](QueryCollectionError.md#capturestacktrace) *** @@ -217,4 +217,4 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from -[`QueryCollectionError`](../QueryCollectionError.md).[`prepareStackTrace`](../QueryCollectionError.md#preparestacktrace) +[`QueryCollectionError`](QueryCollectionError.md).[`prepareStackTrace`](QueryCollectionError.md#preparestacktrace) diff --git a/docs/reference/query-db-collection/functions/queryCollectionOptions.md b/docs/reference/query-db-collection/functions/queryCollectionOptions.md index 36fe817f4..3aab0096f 100644 --- a/docs/reference/query-db-collection/functions/queryCollectionOptions.md +++ b/docs/reference/query-db-collection/functions/queryCollectionOptions.md @@ -11,7 +11,7 @@ title: queryCollectionOptions function queryCollectionOptions(config): CollectionConfig, TKey, T, QueryCollectionUtils, TKey, InferSchemaInput, TError>> & object; ``` -Defined in: [packages/query-db-collection/src/query.ts:393](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L393) +Defined in: [packages/query-db-collection/src/query.ts:394](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L394) Creates query collection options for use with a standard Collection. This integrates TanStack Query with TanStack DB for automatic synchronization. @@ -58,13 +58,13 @@ The type of the item keys #### config -[`QueryCollectionConfig`](../../interfaces/QueryCollectionConfig.md)\<`InferSchemaOutput`\<`T`\>, `TQueryFn`, `TError`, `TQueryKey`, `TKey`, `T`, `Awaited`\<`ReturnType`\<`TQueryFn`\>\>\> & `object` +[`QueryCollectionConfig`](../interfaces/QueryCollectionConfig.md)\<`InferSchemaOutput`\<`T`\>, `TQueryFn`, `TError`, `TQueryKey`, `TKey`, `T`, `Awaited`\<`ReturnType`\<`TQueryFn`\>\>\> & `object` Configuration options for the Query collection ### Returns -`CollectionConfig`\<`InferSchemaOutput`\<`T`\>, `TKey`, `T`, [`QueryCollectionUtils`](../../interfaces/QueryCollectionUtils.md)\<`InferSchemaOutput`\<`T`\>, `TKey`, `InferSchemaInput`\<`T`\>, `TError`\>\> & `object` +`CollectionConfig`\<`InferSchemaOutput`\<`T`\>, `TKey`, `T`, [`QueryCollectionUtils`](../interfaces/QueryCollectionUtils.md)\<`InferSchemaOutput`\<`T`\>, `TKey`, `InferSchemaInput`\<`T`\>, `TError`\>\> & `object` Collection options with utilities for direct writes and manual operations @@ -151,7 +151,7 @@ const todosCollection = createCollection( function queryCollectionOptions(config): CollectionConfig> & object; ``` -Defined in: [packages/query-db-collection/src/query.ts:428](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L428) +Defined in: [packages/query-db-collection/src/query.ts:429](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L429) Creates query collection options for use with a standard Collection. This integrates TanStack Query with TanStack DB for automatic synchronization. @@ -198,13 +198,13 @@ The type of the item keys #### config -[`QueryCollectionConfig`](../../interfaces/QueryCollectionConfig.md)\<`T`, `TQueryFn`, `TError`, `TQueryKey`, `TKey`, `never`, `TQueryData`\> & `object` +[`QueryCollectionConfig`](../interfaces/QueryCollectionConfig.md)\<`T`, `TQueryFn`, `TError`, `TQueryKey`, `TKey`, `never`, `TQueryData`\> & `object` Configuration options for the Query collection ### Returns -`CollectionConfig`\<`T`, `TKey`, `never`, [`QueryCollectionUtils`](../../interfaces/QueryCollectionUtils.md)\<`T`, `TKey`, `T`, `TError`\>\> & `object` +`CollectionConfig`\<`T`, `TKey`, `never`, [`QueryCollectionUtils`](../interfaces/QueryCollectionUtils.md)\<`T`, `TKey`, `T`, `TError`\>\> & `object` Collection options with utilities for direct writes and manual operations @@ -291,7 +291,7 @@ const todosCollection = createCollection( function queryCollectionOptions(config): CollectionConfig, TKey, T, QueryCollectionUtils, TKey, InferSchemaInput, TError>> & object; ``` -Defined in: [packages/query-db-collection/src/query.ts:461](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L461) +Defined in: [packages/query-db-collection/src/query.ts:462](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L462) Creates query collection options for use with a standard Collection. This integrates TanStack Query with TanStack DB for automatic synchronization. @@ -330,13 +330,13 @@ The type of the item keys #### config -[`QueryCollectionConfig`](../../interfaces/QueryCollectionConfig.md)\<`InferSchemaOutput`\<`T`\>, (`context`) => `Promise`\<`InferSchemaOutput`\<`T`\>[]\>, `TError`, `TQueryKey`, `TKey`, `T`, `InferSchemaOutput`\<`T`\>[]\> & `object` +[`QueryCollectionConfig`](../interfaces/QueryCollectionConfig.md)\<`InferSchemaOutput`\<`T`\>, (`context`) => `Promise`\<`InferSchemaOutput`\<`T`\>[]\>, `TError`, `TQueryKey`, `TKey`, `T`, `InferSchemaOutput`\<`T`\>[]\> & `object` Configuration options for the Query collection ### Returns -`CollectionConfig`\<`InferSchemaOutput`\<`T`\>, `TKey`, `T`, [`QueryCollectionUtils`](../../interfaces/QueryCollectionUtils.md)\<`InferSchemaOutput`\<`T`\>, `TKey`, `InferSchemaInput`\<`T`\>, `TError`\>\> & `object` +`CollectionConfig`\<`InferSchemaOutput`\<`T`\>, `TKey`, `T`, [`QueryCollectionUtils`](../interfaces/QueryCollectionUtils.md)\<`InferSchemaOutput`\<`T`\>, `TKey`, `InferSchemaInput`\<`T`\>, `TError`\>\> & `object` Collection options with utilities for direct writes and manual operations @@ -423,7 +423,7 @@ const todosCollection = createCollection( function queryCollectionOptions(config): CollectionConfig> & object; ``` -Defined in: [packages/query-db-collection/src/query.ts:495](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L495) +Defined in: [packages/query-db-collection/src/query.ts:496](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L496) Creates query collection options for use with a standard Collection. This integrates TanStack Query with TanStack DB for automatic synchronization. @@ -462,13 +462,13 @@ The type of the item keys #### config -[`QueryCollectionConfig`](../../interfaces/QueryCollectionConfig.md)\<`T`, (`context`) => `Promise`\<`T`[]\>, `TError`, `TQueryKey`, `TKey`, `never`, `T`[]\> & `object` +[`QueryCollectionConfig`](../interfaces/QueryCollectionConfig.md)\<`T`, (`context`) => `Promise`\<`T`[]\>, `TError`, `TQueryKey`, `TKey`, `never`, `T`[]\> & `object` Configuration options for the Query collection ### Returns -`CollectionConfig`\<`T`, `TKey`, `never`, [`QueryCollectionUtils`](../../interfaces/QueryCollectionUtils.md)\<`T`, `TKey`, `T`, `TError`\>\> & `object` +`CollectionConfig`\<`T`, `TKey`, `never`, [`QueryCollectionUtils`](../interfaces/QueryCollectionUtils.md)\<`T`, `TKey`, `T`, `TError`\>\> & `object` Collection options with utilities for direct writes and manual operations diff --git a/docs/reference/query-db-collection/index.md b/docs/reference/query-db-collection/index.md index c75c60703..569ee31dd 100644 --- a/docs/reference/query-db-collection/index.md +++ b/docs/reference/query-db-collection/index.md @@ -7,31 +7,31 @@ title: "@tanstack/query-db-collection" ## Classes -- [DeleteOperationItemNotFoundError](../classes/DeleteOperationItemNotFoundError.md) -- [DuplicateKeyInBatchError](../classes/DuplicateKeyInBatchError.md) -- [GetKeyRequiredError](../classes/GetKeyRequiredError.md) -- [InvalidItemStructureError](../classes/InvalidItemStructureError.md) -- [InvalidSyncOperationError](../classes/InvalidSyncOperationError.md) -- [ItemNotFoundError](../classes/ItemNotFoundError.md) -- [MissingKeyFieldError](../classes/MissingKeyFieldError.md) -- [QueryClientRequiredError](../classes/QueryClientRequiredError.md) -- [QueryCollectionError](../classes/QueryCollectionError.md) -- [QueryFnRequiredError](../classes/QueryFnRequiredError.md) -- [QueryKeyRequiredError](../classes/QueryKeyRequiredError.md) -- [SyncNotInitializedError](../classes/SyncNotInitializedError.md) -- [UnknownOperationTypeError](../classes/UnknownOperationTypeError.md) -- [UpdateOperationItemNotFoundError](../classes/UpdateOperationItemNotFoundError.md) +- [DeleteOperationItemNotFoundError](classes/DeleteOperationItemNotFoundError.md) +- [DuplicateKeyInBatchError](classes/DuplicateKeyInBatchError.md) +- [GetKeyRequiredError](classes/GetKeyRequiredError.md) +- [InvalidItemStructureError](classes/InvalidItemStructureError.md) +- [InvalidSyncOperationError](classes/InvalidSyncOperationError.md) +- [ItemNotFoundError](classes/ItemNotFoundError.md) +- [MissingKeyFieldError](classes/MissingKeyFieldError.md) +- [QueryClientRequiredError](classes/QueryClientRequiredError.md) +- [QueryCollectionError](classes/QueryCollectionError.md) +- [QueryFnRequiredError](classes/QueryFnRequiredError.md) +- [QueryKeyRequiredError](classes/QueryKeyRequiredError.md) +- [SyncNotInitializedError](classes/SyncNotInitializedError.md) +- [UnknownOperationTypeError](classes/UnknownOperationTypeError.md) +- [UpdateOperationItemNotFoundError](classes/UpdateOperationItemNotFoundError.md) ## Interfaces -- [QueryCollectionConfig](../interfaces/QueryCollectionConfig.md) -- [QueryCollectionMeta](../interfaces/QueryCollectionMeta.md) -- [QueryCollectionUtils](../interfaces/QueryCollectionUtils.md) +- [QueryCollectionConfig](interfaces/QueryCollectionConfig.md) +- [QueryCollectionMeta](interfaces/QueryCollectionMeta.md) +- [QueryCollectionUtils](interfaces/QueryCollectionUtils.md) ## Type Aliases -- [SyncOperation](../type-aliases/SyncOperation.md) +- [SyncOperation](type-aliases/SyncOperation.md) ## Functions -- [queryCollectionOptions](../functions/queryCollectionOptions.md) +- [queryCollectionOptions](functions/queryCollectionOptions.md) diff --git a/docs/reference/query-db-collection/interfaces/QueryCollectionConfig.md b/docs/reference/query-db-collection/interfaces/QueryCollectionConfig.md index f2c1b8498..710db1ee9 100644 --- a/docs/reference/query-db-collection/interfaces/QueryCollectionConfig.md +++ b/docs/reference/query-db-collection/interfaces/QueryCollectionConfig.md @@ -5,7 +5,7 @@ title: QueryCollectionConfig # Interface: QueryCollectionConfig\ -Defined in: [packages/query-db-collection/src/query.ts:59](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L59) +Defined in: [packages/query-db-collection/src/query.ts:60](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L60) Configuration options for creating a Query Collection @@ -63,7 +63,7 @@ The schema type for validation optional enabled: boolean; ``` -Defined in: [packages/query-db-collection/src/query.ts:85](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L85) +Defined in: [packages/query-db-collection/src/query.ts:86](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L86) Whether the query should automatically run (default: true) @@ -75,7 +75,7 @@ Whether the query should automatically run (default: true) optional meta: Record; ``` -Defined in: [packages/query-db-collection/src/query.ts:135](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L135) +Defined in: [packages/query-db-collection/src/query.ts:136](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L136) Metadata to pass to the query. Available in queryFn via context.meta @@ -107,7 +107,7 @@ meta: { queryClient: QueryClient; ``` -Defined in: [packages/query-db-collection/src/query.ts:81](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L81) +Defined in: [packages/query-db-collection/src/query.ts:82](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L82) The TanStack Query client instance @@ -119,7 +119,7 @@ The TanStack Query client instance queryFn: TQueryFn extends (context) => Promise ? (context) => Promise : TQueryFn; ``` -Defined in: [packages/query-db-collection/src/query.ts:73](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L73) +Defined in: [packages/query-db-collection/src/query.ts:74](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L74) Function that fetches data from the server. Must return the complete collection state @@ -131,7 +131,7 @@ Function that fetches data from the server. Must return the complete collection queryKey: TQueryKey | TQueryKeyBuilder; ``` -Defined in: [packages/query-db-collection/src/query.ts:71](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L71) +Defined in: [packages/query-db-collection/src/query.ts:72](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L72) The query key used by TanStack Query to identify this query @@ -143,7 +143,7 @@ The query key used by TanStack Query to identify this query optional refetchInterval: number | false | (query) => number | false | undefined; ``` -Defined in: [packages/query-db-collection/src/query.ts:86](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L86) +Defined in: [packages/query-db-collection/src/query.ts:87](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L87) *** @@ -153,7 +153,7 @@ Defined in: [packages/query-db-collection/src/query.ts:86](https://github.com/Ta optional retry: RetryValue; ``` -Defined in: [packages/query-db-collection/src/query.ts:93](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L93) +Defined in: [packages/query-db-collection/src/query.ts:94](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L94) *** @@ -163,7 +163,7 @@ Defined in: [packages/query-db-collection/src/query.ts:93](https://github.com/Ta optional retryDelay: RetryDelayValue; ``` -Defined in: [packages/query-db-collection/src/query.ts:100](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L100) +Defined in: [packages/query-db-collection/src/query.ts:101](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L101) *** @@ -173,7 +173,7 @@ Defined in: [packages/query-db-collection/src/query.ts:100](https://github.com/T optional select: (data) => T[]; ``` -Defined in: [packages/query-db-collection/src/query.ts:79](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L79) +Defined in: [packages/query-db-collection/src/query.ts:80](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L80) #### Parameters @@ -193,4 +193,4 @@ Defined in: [packages/query-db-collection/src/query.ts:79](https://github.com/Ta optional staleTime: StaleTimeFunction; ``` -Defined in: [packages/query-db-collection/src/query.ts:107](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L107) +Defined in: [packages/query-db-collection/src/query.ts:108](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L108) diff --git a/docs/reference/query-db-collection/interfaces/QueryCollectionUtils.md b/docs/reference/query-db-collection/interfaces/QueryCollectionUtils.md index 47cb7ea56..2385eca11 100644 --- a/docs/reference/query-db-collection/interfaces/QueryCollectionUtils.md +++ b/docs/reference/query-db-collection/interfaces/QueryCollectionUtils.md @@ -5,7 +5,7 @@ title: QueryCollectionUtils # Interface: QueryCollectionUtils\ -Defined in: [packages/query-db-collection/src/query.ts:154](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L154) +Defined in: [packages/query-db-collection/src/query.ts:155](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L155) Utility methods available on Query Collections for direct writes and manual operations. Direct writes bypass the normal query/mutation flow and write directly to the synced data store. @@ -54,7 +54,7 @@ The type of errors that can occur during queries clearError: () => Promise; ``` -Defined in: [packages/query-db-collection/src/query.ts:199](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L199) +Defined in: [packages/query-db-collection/src/query.ts:200](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L200) Clear the error state and trigger a refetch of the query @@ -76,7 +76,7 @@ Error if the refetch fails dataUpdatedAt: number; ``` -Defined in: [packages/query-db-collection/src/query.ts:190](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L190) +Defined in: [packages/query-db-collection/src/query.ts:191](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L191) Get timestamp of last successful data update (in milliseconds) @@ -88,7 +88,7 @@ Get timestamp of last successful data update (in milliseconds) errorCount: number; ``` -Defined in: [packages/query-db-collection/src/query.ts:182](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L182) +Defined in: [packages/query-db-collection/src/query.ts:183](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L183) Get the number of consecutive sync failures. Incremented only when query fails completely (not per retry attempt); reset on success. @@ -101,7 +101,7 @@ Incremented only when query fails completely (not per retry attempt); reset on s fetchStatus: "idle" | "fetching" | "paused"; ``` -Defined in: [packages/query-db-collection/src/query.ts:192](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L192) +Defined in: [packages/query-db-collection/src/query.ts:193](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L193) Get current fetch status @@ -113,7 +113,7 @@ Get current fetch status isError: boolean; ``` -Defined in: [packages/query-db-collection/src/query.ts:177](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L177) +Defined in: [packages/query-db-collection/src/query.ts:178](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L178) Check if the collection is in an error state @@ -125,7 +125,7 @@ Check if the collection is in an error state isFetching: boolean; ``` -Defined in: [packages/query-db-collection/src/query.ts:184](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L184) +Defined in: [packages/query-db-collection/src/query.ts:185](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L185) Check if query is currently fetching (initial or background) @@ -137,7 +137,7 @@ Check if query is currently fetching (initial or background) isLoading: boolean; ``` -Defined in: [packages/query-db-collection/src/query.ts:188](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L188) +Defined in: [packages/query-db-collection/src/query.ts:189](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L189) Check if query is loading for the first time (no data yet) @@ -149,7 +149,7 @@ Check if query is loading for the first time (no data yet) isRefetching: boolean; ``` -Defined in: [packages/query-db-collection/src/query.ts:186](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L186) +Defined in: [packages/query-db-collection/src/query.ts:187](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L187) Check if query is refetching in background (not initial fetch) @@ -161,7 +161,7 @@ Check if query is refetching in background (not initial fetch) lastError: TError | undefined; ``` -Defined in: [packages/query-db-collection/src/query.ts:175](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L175) +Defined in: [packages/query-db-collection/src/query.ts:176](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L176) Get the last error encountered by the query (if any); reset on success @@ -173,7 +173,7 @@ Get the last error encountered by the query (if any); reset on success refetch: RefetchFn; ``` -Defined in: [packages/query-db-collection/src/query.ts:161](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L161) +Defined in: [packages/query-db-collection/src/query.ts:162](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L162) Manually trigger a refetch of the query @@ -185,7 +185,7 @@ Manually trigger a refetch of the query writeBatch: (callback) => void; ``` -Defined in: [packages/query-db-collection/src/query.ts:171](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L171) +Defined in: [packages/query-db-collection/src/query.ts:172](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L172) Execute multiple write operations as a single atomic batch to the synced data store @@ -207,7 +207,7 @@ Execute multiple write operations as a single atomic batch to the synced data st writeDelete: (keys) => void; ``` -Defined in: [packages/query-db-collection/src/query.ts:167](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L167) +Defined in: [packages/query-db-collection/src/query.ts:168](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L168) Delete one or more items directly from the synced data store without triggering a query refetch or optimistic update @@ -229,7 +229,7 @@ Delete one or more items directly from the synced data store without triggering writeInsert: (data) => void; ``` -Defined in: [packages/query-db-collection/src/query.ts:163](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L163) +Defined in: [packages/query-db-collection/src/query.ts:164](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L164) Insert one or more items directly into the synced data store without triggering a query refetch or optimistic update @@ -251,7 +251,7 @@ Insert one or more items directly into the synced data store without triggering writeUpdate: (updates) => void; ``` -Defined in: [packages/query-db-collection/src/query.ts:165](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L165) +Defined in: [packages/query-db-collection/src/query.ts:166](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L166) Update one or more items directly in the synced data store without triggering a query refetch or optimistic update @@ -273,7 +273,7 @@ Update one or more items directly in the synced data store without triggering a writeUpsert: (data) => void; ``` -Defined in: [packages/query-db-collection/src/query.ts:169](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L169) +Defined in: [packages/query-db-collection/src/query.ts:170](https://github.com/TanStack/db/blob/main/packages/query-db-collection/src/query.ts#L170) Insert or update one or more items directly in the synced data store without triggering a query refetch or optimistic update diff --git a/docs/reference/type-aliases/ChangeListener.md b/docs/reference/type-aliases/ChangeListener.md index 5c5950806..6a393f0f9 100644 --- a/docs/reference/type-aliases/ChangeListener.md +++ b/docs/reference/type-aliases/ChangeListener.md @@ -9,7 +9,7 @@ title: ChangeListener type ChangeListener = (changes) => void; ``` -Defined in: [packages/db/src/types.ts:780](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L780) +Defined in: [packages/db/src/types.ts:835](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L835) Function type for listening to collection changes @@ -27,7 +27,7 @@ Function type for listening to collection changes ### changes -[`ChangeMessage`](../../interfaces/ChangeMessage.md)\<`T`, `TKey`\>[] +[`ChangeMessage`](../interfaces/ChangeMessage.md)\<`T`, `TKey`\>[] Array of change messages describing what happened diff --git a/docs/reference/type-aliases/ChangeMessageOrDeleteKeyMessage.md b/docs/reference/type-aliases/ChangeMessageOrDeleteKeyMessage.md new file mode 100644 index 000000000..74c5078f6 --- /dev/null +++ b/docs/reference/type-aliases/ChangeMessageOrDeleteKeyMessage.md @@ -0,0 +1,24 @@ +--- +id: ChangeMessageOrDeleteKeyMessage +title: ChangeMessageOrDeleteKeyMessage +--- + +# Type Alias: ChangeMessageOrDeleteKeyMessage\ + +```ts +type ChangeMessageOrDeleteKeyMessage = + | Omit, "key"> +| DeleteKeyMessage; +``` + +Defined in: [packages/db/src/types.ts:369](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L369) + +## Type Parameters + +### T + +`T` *extends* `object` = `Record`\<`string`, `unknown`\> + +### TKey + +`TKey` *extends* `string` \| `number` = `string` \| `number` diff --git a/docs/reference/type-aliases/ChangesPayload.md b/docs/reference/type-aliases/ChangesPayload.md index 492558932..05ba48656 100644 --- a/docs/reference/type-aliases/ChangesPayload.md +++ b/docs/reference/type-aliases/ChangesPayload.md @@ -9,7 +9,7 @@ title: ChangesPayload type ChangesPayload = ChangeMessage[]; ``` -Defined in: [packages/db/src/types.ts:681](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L681) +Defined in: [packages/db/src/types.ts:736](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L736) ## Type Parameters diff --git a/docs/reference/type-aliases/CleanupFn.md b/docs/reference/type-aliases/CleanupFn.md index 75202b7a1..13b001030 100644 --- a/docs/reference/type-aliases/CleanupFn.md +++ b/docs/reference/type-aliases/CleanupFn.md @@ -9,7 +9,7 @@ title: CleanupFn type CleanupFn = () => void; ``` -Defined in: [packages/db/src/types.ts:278](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L278) +Defined in: [packages/db/src/types.ts:317](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L317) ## Returns diff --git a/docs/reference/type-aliases/CollectionConfigSingleRowOption.md b/docs/reference/type-aliases/CollectionConfigSingleRowOption.md index 950a98e3f..586c1a116 100644 --- a/docs/reference/type-aliases/CollectionConfigSingleRowOption.md +++ b/docs/reference/type-aliases/CollectionConfigSingleRowOption.md @@ -9,7 +9,7 @@ title: CollectionConfigSingleRowOption type CollectionConfigSingleRowOption = CollectionConfig & MaybeSingleResult; ``` -Defined in: [packages/db/src/types.ts:674](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L674) +Defined in: [packages/db/src/types.ts:729](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L729) ## Type Parameters @@ -27,5 +27,5 @@ Defined in: [packages/db/src/types.ts:674](https://github.com/TanStack/db/blob/m ### TUtils -`TUtils` *extends* [`UtilsRecord`](../UtilsRecord.md) = \{ +`TUtils` *extends* [`UtilsRecord`](UtilsRecord.md) = \{ \} diff --git a/docs/reference/type-aliases/CollectionStatus.md b/docs/reference/type-aliases/CollectionStatus.md index de248cd6e..a438a8d6b 100644 --- a/docs/reference/type-aliases/CollectionStatus.md +++ b/docs/reference/type-aliases/CollectionStatus.md @@ -9,7 +9,7 @@ title: CollectionStatus type CollectionStatus = "idle" | "loading" | "ready" | "error" | "cleaned-up"; ``` -Defined in: [packages/db/src/types.ts:424](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L424) +Defined in: [packages/db/src/types.ts:479](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L479) Collection status values for lifecycle management diff --git a/docs/reference/type-aliases/CursorExpressions.md b/docs/reference/type-aliases/CursorExpressions.md new file mode 100644 index 000000000..ea48981db --- /dev/null +++ b/docs/reference/type-aliases/CursorExpressions.md @@ -0,0 +1,60 @@ +--- +id: CursorExpressions +title: CursorExpressions +--- + +# Type Alias: CursorExpressions + +```ts +type CursorExpressions = object; +``` + +Defined in: [packages/db/src/types.ts:263](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L263) + +Cursor expressions for pagination, passed separately from the main `where` clause. +The sync layer can choose to use cursor-based pagination (combining these with the where) +or offset-based pagination (ignoring these and using the `offset` parameter). + +Neither expression includes the main `where` clause - they are cursor-specific only. + +## Properties + +### lastKey? + +```ts +optional lastKey: string | number; +``` + +Defined in: [packages/db/src/types.ts:281](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L281) + +The key of the last item that was loaded. +Can be used by sync layers for tracking or deduplication. + +*** + +### whereCurrent + +```ts +whereCurrent: BasicExpression; +``` + +Defined in: [packages/db/src/types.ts:276](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L276) + +Expression for rows equal to the current cursor value (first orderBy column only). +Used to handle tie-breaking/duplicates at the boundary. +Example: eq(col1, v1) or for Dates: and(gte(col1, v1), lt(col1, v1+1ms)) + +*** + +### whereFrom + +```ts +whereFrom: BasicExpression; +``` + +Defined in: [packages/db/src/types.ts:270](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L270) + +Expression for rows greater than (after) the cursor value. +For multi-column orderBy, this is a composite cursor using OR of conditions. +Example for [col1 ASC, col2 DESC] with values [v1, v2]: + or(gt(col1, v1), and(eq(col1, v1), lt(col2, v2))) diff --git a/docs/reference/type-aliases/DeleteKeyMessage.md b/docs/reference/type-aliases/DeleteKeyMessage.md new file mode 100644 index 000000000..50511304a --- /dev/null +++ b/docs/reference/type-aliases/DeleteKeyMessage.md @@ -0,0 +1,26 @@ +--- +id: DeleteKeyMessage +title: DeleteKeyMessage +--- + +# Type Alias: DeleteKeyMessage\ + +```ts +type DeleteKeyMessage = Omit, "value" | "previousValue" | "type"> & object; +``` + +Defined in: [packages/db/src/types.ts:364](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L364) + +## Type Declaration + +### type + +```ts +type: "delete"; +``` + +## Type Parameters + +### TKey + +`TKey` *extends* `string` \| `number` = `string` \| `number` diff --git a/docs/reference/type-aliases/DeleteMutationFn.md b/docs/reference/type-aliases/DeleteMutationFn.md index 5f48caad8..e81d79037 100644 --- a/docs/reference/type-aliases/DeleteMutationFn.md +++ b/docs/reference/type-aliases/DeleteMutationFn.md @@ -9,7 +9,7 @@ title: DeleteMutationFn type DeleteMutationFn = (params) => Promise; ``` -Defined in: [packages/db/src/types.ts:402](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L402) +Defined in: [packages/db/src/types.ts:457](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L457) ## Type Parameters @@ -23,7 +23,7 @@ Defined in: [packages/db/src/types.ts:402](https://github.com/TanStack/db/blob/m ### TUtils -`TUtils` *extends* [`UtilsRecord`](../UtilsRecord.md) = [`UtilsRecord`](../UtilsRecord.md) +`TUtils` *extends* [`UtilsRecord`](UtilsRecord.md) = [`UtilsRecord`](UtilsRecord.md) ### TReturn @@ -33,7 +33,7 @@ Defined in: [packages/db/src/types.ts:402](https://github.com/TanStack/db/blob/m ### params -[`DeleteMutationFnParams`](../DeleteMutationFnParams.md)\<`T`, `TKey`, `TUtils`\> +[`DeleteMutationFnParams`](DeleteMutationFnParams.md)\<`T`, `TKey`, `TUtils`\> ## Returns diff --git a/docs/reference/type-aliases/DeleteMutationFnParams.md b/docs/reference/type-aliases/DeleteMutationFnParams.md index 872eccd9b..8e2d767aa 100644 --- a/docs/reference/type-aliases/DeleteMutationFnParams.md +++ b/docs/reference/type-aliases/DeleteMutationFnParams.md @@ -9,7 +9,7 @@ title: DeleteMutationFnParams type DeleteMutationFnParams = object; ``` -Defined in: [packages/db/src/types.ts:379](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L379) +Defined in: [packages/db/src/types.ts:434](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L434) ## Type Parameters @@ -23,7 +23,7 @@ Defined in: [packages/db/src/types.ts:379](https://github.com/TanStack/db/blob/m ### TUtils -`TUtils` *extends* [`UtilsRecord`](../UtilsRecord.md) = [`UtilsRecord`](../UtilsRecord.md) +`TUtils` *extends* [`UtilsRecord`](UtilsRecord.md) = [`UtilsRecord`](UtilsRecord.md) ## Properties @@ -33,7 +33,7 @@ Defined in: [packages/db/src/types.ts:379](https://github.com/TanStack/db/blob/m collection: Collection; ``` -Defined in: [packages/db/src/types.ts:385](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L385) +Defined in: [packages/db/src/types.ts:440](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L440) *** @@ -43,4 +43,4 @@ Defined in: [packages/db/src/types.ts:385](https://github.com/TanStack/db/blob/m transaction: TransactionWithMutations; ``` -Defined in: [packages/db/src/types.ts:384](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L384) +Defined in: [packages/db/src/types.ts:439](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L439) diff --git a/docs/reference/type-aliases/GetResult.md b/docs/reference/type-aliases/GetResult.md index fde3475a2..8a311ca9d 100644 --- a/docs/reference/type-aliases/GetResult.md +++ b/docs/reference/type-aliases/GetResult.md @@ -39,4 +39,4 @@ complex intersection types into readable object types. ### TContext -`TContext` *extends* [`Context`](../../interfaces/Context.md) +`TContext` *extends* [`Context`](../interfaces/Context.md) diff --git a/docs/reference/type-aliases/IndexConstructor.md b/docs/reference/type-aliases/IndexConstructor.md index fa3e2d37b..37b7a182a 100644 --- a/docs/reference/type-aliases/IndexConstructor.md +++ b/docs/reference/type-aliases/IndexConstructor.md @@ -27,7 +27,7 @@ Type for index constructor ### expression -[`BasicExpression`](../../@tanstack/namespaces/IR/type-aliases/BasicExpression.md) +[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md) ### name? @@ -39,4 +39,4 @@ Type for index constructor ## Returns -[`BaseIndex`](../../classes/BaseIndex.md)\<`TKey`\> +[`BaseIndex`](../classes/BaseIndex.md)\<`TKey`\> diff --git a/docs/reference/type-aliases/InferResultType.md b/docs/reference/type-aliases/InferResultType.md index 851862eee..76e19e763 100644 --- a/docs/reference/type-aliases/InferResultType.md +++ b/docs/reference/type-aliases/InferResultType.md @@ -17,4 +17,4 @@ Utility type to infer the query result size (single row or an array) ### TContext -`TContext` *extends* [`Context`](../../interfaces/Context.md) +`TContext` *extends* [`Context`](../interfaces/Context.md) diff --git a/docs/reference/type-aliases/InputRow.md b/docs/reference/type-aliases/InputRow.md index 991ce93f7..9be0b19c2 100644 --- a/docs/reference/type-aliases/InputRow.md +++ b/docs/reference/type-aliases/InputRow.md @@ -9,6 +9,6 @@ title: InputRow type InputRow = [unknown, Record]; ``` -Defined in: [packages/db/src/types.ts:688](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L688) +Defined in: [packages/db/src/types.ts:743](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L743) An input row from a collection diff --git a/docs/reference/type-aliases/InsertMutationFn.md b/docs/reference/type-aliases/InsertMutationFn.md index 573a31414..b8e357f0c 100644 --- a/docs/reference/type-aliases/InsertMutationFn.md +++ b/docs/reference/type-aliases/InsertMutationFn.md @@ -9,7 +9,7 @@ title: InsertMutationFn type InsertMutationFn = (params) => Promise; ``` -Defined in: [packages/db/src/types.ts:388](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L388) +Defined in: [packages/db/src/types.ts:443](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L443) ## Type Parameters @@ -23,7 +23,7 @@ Defined in: [packages/db/src/types.ts:388](https://github.com/TanStack/db/blob/m ### TUtils -`TUtils` *extends* [`UtilsRecord`](../UtilsRecord.md) = [`UtilsRecord`](../UtilsRecord.md) +`TUtils` *extends* [`UtilsRecord`](UtilsRecord.md) = [`UtilsRecord`](UtilsRecord.md) ### TReturn @@ -33,7 +33,7 @@ Defined in: [packages/db/src/types.ts:388](https://github.com/TanStack/db/blob/m ### params -[`InsertMutationFnParams`](../InsertMutationFnParams.md)\<`T`, `TKey`, `TUtils`\> +[`InsertMutationFnParams`](InsertMutationFnParams.md)\<`T`, `TKey`, `TUtils`\> ## Returns diff --git a/docs/reference/type-aliases/InsertMutationFnParams.md b/docs/reference/type-aliases/InsertMutationFnParams.md index 6080b4a33..9646082be 100644 --- a/docs/reference/type-aliases/InsertMutationFnParams.md +++ b/docs/reference/type-aliases/InsertMutationFnParams.md @@ -9,7 +9,7 @@ title: InsertMutationFnParams type InsertMutationFnParams = object; ``` -Defined in: [packages/db/src/types.ts:371](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L371) +Defined in: [packages/db/src/types.ts:426](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L426) ## Type Parameters @@ -23,7 +23,7 @@ Defined in: [packages/db/src/types.ts:371](https://github.com/TanStack/db/blob/m ### TUtils -`TUtils` *extends* [`UtilsRecord`](../UtilsRecord.md) = [`UtilsRecord`](../UtilsRecord.md) +`TUtils` *extends* [`UtilsRecord`](UtilsRecord.md) = [`UtilsRecord`](UtilsRecord.md) ## Properties @@ -33,7 +33,7 @@ Defined in: [packages/db/src/types.ts:371](https://github.com/TanStack/db/blob/m collection: Collection; ``` -Defined in: [packages/db/src/types.ts:377](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L377) +Defined in: [packages/db/src/types.ts:432](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L432) *** @@ -43,4 +43,4 @@ Defined in: [packages/db/src/types.ts:377](https://github.com/TanStack/db/blob/m transaction: TransactionWithMutations; ``` -Defined in: [packages/db/src/types.ts:376](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L376) +Defined in: [packages/db/src/types.ts:431](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L431) diff --git a/docs/reference/type-aliases/KeyedNamespacedRow.md b/docs/reference/type-aliases/KeyedNamespacedRow.md index 8a1de5808..65a0dd8a4 100644 --- a/docs/reference/type-aliases/KeyedNamespacedRow.md +++ b/docs/reference/type-aliases/KeyedNamespacedRow.md @@ -9,7 +9,7 @@ title: KeyedNamespacedRow type KeyedNamespacedRow = [unknown, NamespacedRow]; ``` -Defined in: [packages/db/src/types.ts:711](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L711) +Defined in: [packages/db/src/types.ts:766](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L766) A keyed namespaced row is a row with a key and a namespaced row This is the main representation of a row in a query pipeline diff --git a/docs/reference/type-aliases/KeyedStream.md b/docs/reference/type-aliases/KeyedStream.md index d8607f87a..377570018 100644 --- a/docs/reference/type-aliases/KeyedStream.md +++ b/docs/reference/type-aliases/KeyedStream.md @@ -9,7 +9,7 @@ title: KeyedStream type KeyedStream = IStreamBuilder; ``` -Defined in: [packages/db/src/types.ts:694](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L694) +Defined in: [packages/db/src/types.ts:749](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L749) A keyed stream is a stream of rows This is used as the inputs from a collection to a query diff --git a/docs/reference/type-aliases/LoadSubsetFn.md b/docs/reference/type-aliases/LoadSubsetFn.md index 9c6d796e5..092ea1e72 100644 --- a/docs/reference/type-aliases/LoadSubsetFn.md +++ b/docs/reference/type-aliases/LoadSubsetFn.md @@ -9,13 +9,13 @@ title: LoadSubsetFn type LoadSubsetFn = (options) => true | Promise; ``` -Defined in: [packages/db/src/types.ts:274](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L274) +Defined in: [packages/db/src/types.ts:313](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L313) ## Parameters ### options -[`LoadSubsetOptions`](../LoadSubsetOptions.md) +[`LoadSubsetOptions`](LoadSubsetOptions.md) ## Returns diff --git a/docs/reference/type-aliases/LoadSubsetOptions.md b/docs/reference/type-aliases/LoadSubsetOptions.md index 64c0a3c4e..aa3f1b5eb 100644 --- a/docs/reference/type-aliases/LoadSubsetOptions.md +++ b/docs/reference/type-aliases/LoadSubsetOptions.md @@ -9,29 +9,56 @@ title: LoadSubsetOptions type LoadSubsetOptions = object; ``` -Defined in: [packages/db/src/types.ts:256](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L256) +Defined in: [packages/db/src/types.ts:284](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L284) ## Properties +### cursor? + +```ts +optional cursor: CursorExpressions; +``` + +Defined in: [packages/db/src/types.ts:296](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L296) + +Cursor expressions for cursor-based pagination. +These are separate from `where` - the sync layer should combine them if using cursor-based pagination. +Neither expression includes the main `where` clause. + +*** + ### limit? ```ts optional limit: number; ``` -Defined in: [packages/db/src/types.ts:262](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L262) +Defined in: [packages/db/src/types.ts:290](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L290) The limit of the data to load *** +### offset? + +```ts +optional offset: number; +``` + +Defined in: [packages/db/src/types.ts:301](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L301) + +Row offset for offset-based pagination. +The sync layer can use this instead of `cursor` if it prefers offset-based pagination. + +*** + ### orderBy? ```ts optional orderBy: OrderBy; ``` -Defined in: [packages/db/src/types.ts:260](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L260) +Defined in: [packages/db/src/types.ts:288](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L288) The order by clause to sort the data @@ -43,7 +70,7 @@ The order by clause to sort the data optional subscription: Subscription; ``` -Defined in: [packages/db/src/types.ts:271](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L271) +Defined in: [packages/db/src/types.ts:310](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L310) The subscription that triggered the load. Advanced sync implementations can use this for: @@ -63,6 +90,6 @@ Available when called from CollectionSubscription, may be undefined for direct c optional where: BasicExpression; ``` -Defined in: [packages/db/src/types.ts:258](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L258) +Defined in: [packages/db/src/types.ts:286](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L286) -The where expression to filter the data +The where expression to filter the data (does NOT include cursor expressions) diff --git a/docs/reference/type-aliases/MakeOptional.md b/docs/reference/type-aliases/MakeOptional.md new file mode 100644 index 000000000..bcaba38e1 --- /dev/null +++ b/docs/reference/type-aliases/MakeOptional.md @@ -0,0 +1,22 @@ +--- +id: MakeOptional +title: MakeOptional +--- + +# Type Alias: MakeOptional\ + +```ts +type MakeOptional = Omit & Partial>; +``` + +Defined in: [packages/db/src/types.ts:914](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L914) + +## Type Parameters + +### T + +`T` + +### K + +`K` *extends* keyof `T` diff --git a/docs/reference/type-aliases/MaybeSingleResult.md b/docs/reference/type-aliases/MaybeSingleResult.md index 95512ef93..9eeb7a1b2 100644 --- a/docs/reference/type-aliases/MaybeSingleResult.md +++ b/docs/reference/type-aliases/MaybeSingleResult.md @@ -9,7 +9,7 @@ title: MaybeSingleResult type MaybeSingleResult = object; ``` -Defined in: [packages/db/src/types.ts:666](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L666) +Defined in: [packages/db/src/types.ts:721](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L721) ## Properties @@ -19,6 +19,6 @@ Defined in: [packages/db/src/types.ts:666](https://github.com/TanStack/db/blob/m optional singleResult: true; ``` -Defined in: [packages/db/src/types.ts:670](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L670) +Defined in: [packages/db/src/types.ts:725](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L725) If enabled the collection will return a single object instead of an array diff --git a/docs/reference/type-aliases/MutationFn.md b/docs/reference/type-aliases/MutationFn.md index 146de19e0..9ebaa5538 100644 --- a/docs/reference/type-aliases/MutationFn.md +++ b/docs/reference/type-aliases/MutationFn.md @@ -21,7 +21,7 @@ Defined in: [packages/db/src/types.ts:126](https://github.com/TanStack/db/blob/m ### params -[`MutationFnParams`](../MutationFnParams.md)\<`T`\> +[`MutationFnParams`](MutationFnParams.md)\<`T`\> ## Returns diff --git a/docs/reference/type-aliases/NamespacedAndKeyedStream.md b/docs/reference/type-aliases/NamespacedAndKeyedStream.md index c7d501506..48fe8ec75 100644 --- a/docs/reference/type-aliases/NamespacedAndKeyedStream.md +++ b/docs/reference/type-aliases/NamespacedAndKeyedStream.md @@ -9,7 +9,7 @@ title: NamespacedAndKeyedStream type NamespacedAndKeyedStream = IStreamBuilder; ``` -Defined in: [packages/db/src/types.ts:718](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L718) +Defined in: [packages/db/src/types.ts:773](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L773) A namespaced and keyed stream is a stream of rows This is used throughout a query pipeline and as the output from a query without diff --git a/docs/reference/type-aliases/NamespacedRow.md b/docs/reference/type-aliases/NamespacedRow.md index f2759dc9e..1b9e35c18 100644 --- a/docs/reference/type-aliases/NamespacedRow.md +++ b/docs/reference/type-aliases/NamespacedRow.md @@ -9,6 +9,6 @@ title: NamespacedRow type NamespacedRow = Record>; ``` -Defined in: [packages/db/src/types.ts:705](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L705) +Defined in: [packages/db/src/types.ts:760](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L760) A namespaced row is a row withing a pipeline that had each table wrapped in its alias diff --git a/docs/reference/type-aliases/NonSingleResult.md b/docs/reference/type-aliases/NonSingleResult.md index 7a7306afb..690995848 100644 --- a/docs/reference/type-aliases/NonSingleResult.md +++ b/docs/reference/type-aliases/NonSingleResult.md @@ -9,7 +9,7 @@ title: NonSingleResult type NonSingleResult = object; ``` -Defined in: [packages/db/src/types.ts:662](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L662) +Defined in: [packages/db/src/types.ts:717](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L717) ## Properties @@ -19,4 +19,4 @@ Defined in: [packages/db/src/types.ts:662](https://github.com/TanStack/db/blob/m optional singleResult: never; ``` -Defined in: [packages/db/src/types.ts:663](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L663) +Defined in: [packages/db/src/types.ts:718](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L718) diff --git a/docs/reference/type-aliases/OptimisticChangeMessage.md b/docs/reference/type-aliases/OptimisticChangeMessage.md new file mode 100644 index 000000000..23cfbd7a4 --- /dev/null +++ b/docs/reference/type-aliases/OptimisticChangeMessage.md @@ -0,0 +1,24 @@ +--- +id: OptimisticChangeMessage +title: OptimisticChangeMessage +--- + +# Type Alias: OptimisticChangeMessage\ + +```ts +type OptimisticChangeMessage = + | ChangeMessage & object + | DeleteKeyMessage & object; +``` + +Defined in: [packages/db/src/types.ts:374](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L374) + +## Type Parameters + +### T + +`T` *extends* `object` = `Record`\<`string`, `unknown`\> + +### TKey + +`TKey` *extends* `string` \| `number` = `string` \| `number` diff --git a/docs/reference/type-aliases/QueryBuilder.md b/docs/reference/type-aliases/QueryBuilder.md index 63ca2622f..314c04f38 100644 --- a/docs/reference/type-aliases/QueryBuilder.md +++ b/docs/reference/type-aliases/QueryBuilder.md @@ -15,4 +15,4 @@ Defined in: [packages/db/src/query/builder/index.ts:850](https://github.com/TanS ### TContext -`TContext` *extends* [`Context`](../../interfaces/Context.md) +`TContext` *extends* [`Context`](../interfaces/Context.md) diff --git a/docs/reference/type-aliases/ResolveTransactionChanges.md b/docs/reference/type-aliases/ResolveTransactionChanges.md index d8349caab..12a4e2ed0 100644 --- a/docs/reference/type-aliases/ResolveTransactionChanges.md +++ b/docs/reference/type-aliases/ResolveTransactionChanges.md @@ -19,7 +19,7 @@ Defined in: [packages/db/src/types.ts:79](https://github.com/TanStack/db/blob/ma ### TOperation -`TOperation` *extends* [`OperationType`](../OperationType.md) = [`OperationType`](../OperationType.md) +`TOperation` *extends* [`OperationType`](OperationType.md) = [`OperationType`](OperationType.md) ## Remarks diff --git a/docs/reference/type-aliases/ResultStream.md b/docs/reference/type-aliases/ResultStream.md index bce6ea4af..22de70167 100644 --- a/docs/reference/type-aliases/ResultStream.md +++ b/docs/reference/type-aliases/ResultStream.md @@ -9,7 +9,7 @@ title: ResultStream type ResultStream = IStreamBuilder<[unknown, [any, string | undefined]]>; ``` -Defined in: [packages/db/src/types.ts:700](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L700) +Defined in: [packages/db/src/types.ts:755](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L755) Result stream type representing the output of compiled queries Always returns [key, [result, orderByIndex]] where orderByIndex is undefined for unordered queries diff --git a/docs/reference/type-aliases/SingleResult.md b/docs/reference/type-aliases/SingleResult.md index f0b9e74b8..1865f0741 100644 --- a/docs/reference/type-aliases/SingleResult.md +++ b/docs/reference/type-aliases/SingleResult.md @@ -9,7 +9,7 @@ title: SingleResult type SingleResult = object; ``` -Defined in: [packages/db/src/types.ts:658](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L658) +Defined in: [packages/db/src/types.ts:713](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L713) ## Properties @@ -19,4 +19,4 @@ Defined in: [packages/db/src/types.ts:658](https://github.com/TanStack/db/blob/m singleResult: true; ``` -Defined in: [packages/db/src/types.ts:659](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L659) +Defined in: [packages/db/src/types.ts:714](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L714) diff --git a/docs/reference/type-aliases/StandardSchema.md b/docs/reference/type-aliases/StandardSchema.md index d59b54f94..25a86f518 100644 --- a/docs/reference/type-aliases/StandardSchema.md +++ b/docs/reference/type-aliases/StandardSchema.md @@ -9,7 +9,7 @@ title: StandardSchema type StandardSchema = StandardSchemaV1 & object; ``` -Defined in: [packages/db/src/types.ts:336](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L336) +Defined in: [packages/db/src/types.ts:391](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L391) The Standard Schema interface. This follows the standard-schema specification: https://github.com/standard-schema/standard-schema diff --git a/docs/reference/type-aliases/StandardSchemaAlias.md b/docs/reference/type-aliases/StandardSchemaAlias.md index f2ac532e4..400d678dd 100644 --- a/docs/reference/type-aliases/StandardSchemaAlias.md +++ b/docs/reference/type-aliases/StandardSchemaAlias.md @@ -9,7 +9,7 @@ title: StandardSchemaAlias type StandardSchemaAlias = StandardSchema; ``` -Defined in: [packages/db/src/types.ts:348](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L348) +Defined in: [packages/db/src/types.ts:403](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L403) Type alias for StandardSchema diff --git a/docs/reference/type-aliases/StrategyOptions.md b/docs/reference/type-aliases/StrategyOptions.md index e4b212030..e7dd3712d 100644 --- a/docs/reference/type-aliases/StrategyOptions.md +++ b/docs/reference/type-aliases/StrategyOptions.md @@ -17,4 +17,4 @@ Extract the options type from a strategy ### T -`T` *extends* [`Strategy`](../Strategy.md) +`T` *extends* [`Strategy`](Strategy.md) diff --git a/docs/reference/type-aliases/SyncConfigRes.md b/docs/reference/type-aliases/SyncConfigRes.md index 6e0e64aca..0a873792f 100644 --- a/docs/reference/type-aliases/SyncConfigRes.md +++ b/docs/reference/type-aliases/SyncConfigRes.md @@ -9,7 +9,7 @@ title: SyncConfigRes type SyncConfigRes = object; ``` -Defined in: [packages/db/src/types.ts:280](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L280) +Defined in: [packages/db/src/types.ts:319](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L319) ## Properties @@ -19,7 +19,7 @@ Defined in: [packages/db/src/types.ts:280](https://github.com/TanStack/db/blob/m optional cleanup: CleanupFn; ``` -Defined in: [packages/db/src/types.ts:281](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L281) +Defined in: [packages/db/src/types.ts:320](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L320) *** @@ -29,7 +29,7 @@ Defined in: [packages/db/src/types.ts:281](https://github.com/TanStack/db/blob/m optional loadSubset: LoadSubsetFn; ``` -Defined in: [packages/db/src/types.ts:282](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L282) +Defined in: [packages/db/src/types.ts:321](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L321) *** @@ -39,4 +39,4 @@ Defined in: [packages/db/src/types.ts:282](https://github.com/TanStack/db/blob/m optional unloadSubset: UnloadSubsetFn; ``` -Defined in: [packages/db/src/types.ts:283](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L283) +Defined in: [packages/db/src/types.ts:322](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L322) diff --git a/docs/reference/type-aliases/SyncMode.md b/docs/reference/type-aliases/SyncMode.md index 6e72cfbf4..450eff6ab 100644 --- a/docs/reference/type-aliases/SyncMode.md +++ b/docs/reference/type-aliases/SyncMode.md @@ -9,4 +9,4 @@ title: SyncMode type SyncMode = "eager" | "on-demand"; ``` -Defined in: [packages/db/src/types.ts:436](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L436) +Defined in: [packages/db/src/types.ts:491](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L491) diff --git a/docs/reference/type-aliases/TransactionWithMutations.md b/docs/reference/type-aliases/TransactionWithMutations.md index 493335cd9..3aca2e51f 100644 --- a/docs/reference/type-aliases/TransactionWithMutations.md +++ b/docs/reference/type-aliases/TransactionWithMutations.md @@ -48,4 +48,4 @@ With `Omit`: ### TOperation -`TOperation` *extends* [`OperationType`](../OperationType.md) = [`OperationType`](../OperationType.md) +`TOperation` *extends* [`OperationType`](OperationType.md) = [`OperationType`](OperationType.md) diff --git a/docs/reference/type-aliases/UnloadSubsetFn.md b/docs/reference/type-aliases/UnloadSubsetFn.md index 3a8eb3d37..3073bbe16 100644 --- a/docs/reference/type-aliases/UnloadSubsetFn.md +++ b/docs/reference/type-aliases/UnloadSubsetFn.md @@ -9,13 +9,13 @@ title: UnloadSubsetFn type UnloadSubsetFn = (options) => void; ``` -Defined in: [packages/db/src/types.ts:276](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L276) +Defined in: [packages/db/src/types.ts:315](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L315) ## Parameters ### options -[`LoadSubsetOptions`](../LoadSubsetOptions.md) +[`LoadSubsetOptions`](LoadSubsetOptions.md) ## Returns diff --git a/docs/reference/type-aliases/UpdateMutationFn.md b/docs/reference/type-aliases/UpdateMutationFn.md index cda049813..e1d45bf9c 100644 --- a/docs/reference/type-aliases/UpdateMutationFn.md +++ b/docs/reference/type-aliases/UpdateMutationFn.md @@ -9,7 +9,7 @@ title: UpdateMutationFn type UpdateMutationFn = (params) => Promise; ``` -Defined in: [packages/db/src/types.ts:395](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L395) +Defined in: [packages/db/src/types.ts:450](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L450) ## Type Parameters @@ -23,7 +23,7 @@ Defined in: [packages/db/src/types.ts:395](https://github.com/TanStack/db/blob/m ### TUtils -`TUtils` *extends* [`UtilsRecord`](../UtilsRecord.md) = [`UtilsRecord`](../UtilsRecord.md) +`TUtils` *extends* [`UtilsRecord`](UtilsRecord.md) = [`UtilsRecord`](UtilsRecord.md) ### TReturn @@ -33,7 +33,7 @@ Defined in: [packages/db/src/types.ts:395](https://github.com/TanStack/db/blob/m ### params -[`UpdateMutationFnParams`](../UpdateMutationFnParams.md)\<`T`, `TKey`, `TUtils`\> +[`UpdateMutationFnParams`](UpdateMutationFnParams.md)\<`T`, `TKey`, `TUtils`\> ## Returns diff --git a/docs/reference/type-aliases/UpdateMutationFnParams.md b/docs/reference/type-aliases/UpdateMutationFnParams.md index 56e33c0e0..96a812c41 100644 --- a/docs/reference/type-aliases/UpdateMutationFnParams.md +++ b/docs/reference/type-aliases/UpdateMutationFnParams.md @@ -9,7 +9,7 @@ title: UpdateMutationFnParams type UpdateMutationFnParams = object; ``` -Defined in: [packages/db/src/types.ts:362](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L362) +Defined in: [packages/db/src/types.ts:417](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L417) ## Type Parameters @@ -23,7 +23,7 @@ Defined in: [packages/db/src/types.ts:362](https://github.com/TanStack/db/blob/m ### TUtils -`TUtils` *extends* [`UtilsRecord`](../UtilsRecord.md) = [`UtilsRecord`](../UtilsRecord.md) +`TUtils` *extends* [`UtilsRecord`](UtilsRecord.md) = [`UtilsRecord`](UtilsRecord.md) ## Properties @@ -33,7 +33,7 @@ Defined in: [packages/db/src/types.ts:362](https://github.com/TanStack/db/blob/m collection: Collection; ``` -Defined in: [packages/db/src/types.ts:368](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L368) +Defined in: [packages/db/src/types.ts:423](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L423) *** @@ -43,4 +43,4 @@ Defined in: [packages/db/src/types.ts:368](https://github.com/TanStack/db/blob/m transaction: TransactionWithMutations; ``` -Defined in: [packages/db/src/types.ts:367](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L367) +Defined in: [packages/db/src/types.ts:422](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L422) diff --git a/docs/reference/type-aliases/WritableDeep.md b/docs/reference/type-aliases/WritableDeep.md index fd6c796ed..d6ffa90b2 100644 --- a/docs/reference/type-aliases/WritableDeep.md +++ b/docs/reference/type-aliases/WritableDeep.md @@ -9,7 +9,7 @@ title: WritableDeep type WritableDeep = T extends BuiltIns ? T : T extends (...arguments_) => unknown ? object extends WritableObjectDeep ? T : HasMultipleCallSignatures extends true ? T : (...arguments_) => ReturnType & WritableObjectDeep : T extends ReadonlyMap ? WritableMapDeep : T extends ReadonlySet ? WritableSetDeep : T extends ReadonlyArray ? WritableArrayDeep : T extends object ? WritableObjectDeep : unknown; ``` -Defined in: [packages/db/src/types.ts:840](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L840) +Defined in: [packages/db/src/types.ts:895](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L895) ## Type Parameters diff --git a/eslint.config.js b/eslint.config.js index 1f40676a4..5c4455420 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,7 +1,4 @@ -import prettierPlugin from "eslint-plugin-prettier" -import prettierConfig from "eslint-config-prettier" -import stylisticPlugin from "@stylistic/eslint-plugin" -import { tanstackConfig } from "@tanstack/config/eslint" +import { tanstackConfig } from '@tanstack/eslint-config' export default [ ...tanstackConfig, @@ -15,31 +12,24 @@ export default [ ], }, { - plugins: { - stylistic: stylisticPlugin, - prettier: prettierPlugin, - }, settings: { // import-x/* settings required for import/no-cycle. - "import-x/resolver": { typescript: true }, - "import-x/extensions": [".ts", ".tsx", ".js", ".jsx", ".cjs", ".mjs"], + 'import-x/resolver': { typescript: true }, + 'import-x/extensions': ['.ts', '.tsx', '.js', '.jsx', '.cjs', '.mjs'], }, rules: { - "prettier/prettier": `error`, - "stylistic/quotes": [`error`, `backtick`], - "pnpm/enforce-catalog": `off`, - "pnpm/json-enforce-catalog": `off`, - ...prettierConfig.rules, + 'pnpm/enforce-catalog': `off`, + 'pnpm/json-enforce-catalog': `off`, }, }, { files: [`**/*.ts`, `**/*.tsx`], rules: { - "@typescript-eslint/no-unused-vars": [ + '@typescript-eslint/no-unused-vars': [ `error`, { argsIgnorePattern: `^_`, varsIgnorePattern: `^_` }, ], - "@typescript-eslint/naming-convention": [ + '@typescript-eslint/naming-convention': [ `error`, { selector: `typeParameter`, @@ -47,7 +37,7 @@ export default [ leadingUnderscore: `allow`, }, ], - "import/no-cycle": `error`, + 'import/no-cycle': `error`, }, }, ] diff --git a/examples/angular/todos/.postcssrc.json b/examples/angular/todos/.postcssrc.json index 380d67686..e092dc7c1 100644 --- a/examples/angular/todos/.postcssrc.json +++ b/examples/angular/todos/.postcssrc.json @@ -1,6 +1,5 @@ { "plugins": { - "tailwindcss": {}, - "autoprefixer": {} + "@tailwindcss/postcss": {} } } diff --git a/examples/angular/todos/package.json b/examples/angular/todos/package.json index f80286c1a..b5b2abd33 100644 --- a/examples/angular/todos/package.json +++ b/examples/angular/todos/package.json @@ -22,32 +22,32 @@ }, "private": true, "dependencies": { - "@angular/common": "^20.3.13", - "@angular/compiler": "^20.3.14", - "@angular/core": "^20.3.14", - "@angular/forms": "^20.3.14", - "@angular/platform-browser": "^20.3.14", - "@angular/router": "^20.3.14", - "@tanstack/angular-db": ">=0.0.0 <1.0.0", - "@tanstack/db": ">=0.0.0 <1.0.0", - "rxjs": "~7.8.2", + "@angular/common": "^19.2.17", + "@angular/compiler": "^20.3.15", + "@angular/core": "^19.2.17", + "@angular/forms": "^20.3.15", + "@angular/platform-browser": "^19.2.17", + "@angular/router": "^20.3.15", + "@tanstack/angular-db": "^0.1.37", + "@tanstack/db": "^0.5.11", + "rxjs": "^7.8.2", "tslib": "^2.8.1", - "zone.js": "~0.16.0" + "zone.js": "^0.16.0" }, "devDependencies": { - "@angular/build": "^20.3.12", - "@angular/cli": "^20.3.12", - "@angular/compiler-cli": "^20.3.14", + "@angular/build": "^20.3.13", + "@angular/cli": "^20.3.13", + "@angular/compiler-cli": "^20.3.15", + "@tailwindcss/postcss": "^4.1.17", "@types/jasmine": "~5.1.13", - "autoprefixer": "^10.4.22", - "jasmine-core": "~5.12.1", + "jasmine-core": "~5.13.0", "karma": "~6.4.4", "karma-chrome-launcher": "~3.2.0", "karma-coverage": "~2.2.1", "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "~2.1.0", "postcss": "^8.5.6", - "tailwindcss": "^3.4.18", - "typescript": "~5.8.2" + "tailwindcss": "^4.1.17", + "typescript": "^5.9.2" } } diff --git a/examples/angular/todos/src/app/app.config.ts b/examples/angular/todos/src/app/app.config.ts index 414eeaeb8..a690ebc33 100644 --- a/examples/angular/todos/src/app/app.config.ts +++ b/examples/angular/todos/src/app/app.config.ts @@ -2,10 +2,10 @@ import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZoneChangeDetection, -} from '@angular/core'; -import { provideRouter } from '@angular/router'; +} from '@angular/core' +import { provideRouter } from '@angular/router' -import { routes } from './app.routes'; +import { routes } from './app.routes' export const appConfig: ApplicationConfig = { providers: [ @@ -13,4 +13,4 @@ export const appConfig: ApplicationConfig = { provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes), ], -}; +} diff --git a/examples/angular/todos/src/app/app.routes.ts b/examples/angular/todos/src/app/app.routes.ts index c4dcbaef3..5281a3272 100644 --- a/examples/angular/todos/src/app/app.routes.ts +++ b/examples/angular/todos/src/app/app.routes.ts @@ -1,5 +1,5 @@ -import { Routes } from '@angular/router'; +import { Routes } from '@angular/router' export const routes: Routes = [ // Add your routes here -]; +] diff --git a/examples/angular/todos/src/app/app.ts b/examples/angular/todos/src/app/app.ts index 55c59b7f2..46b1609d0 100644 --- a/examples/angular/todos/src/app/app.ts +++ b/examples/angular/todos/src/app/app.ts @@ -1,9 +1,9 @@ -import { Component, signal } from '@angular/core'; -import { injectLiveQuery } from '@tanstack/angular-db'; -import { eq } from '@tanstack/db'; -import { todosCollection } from '../collections/todos-collection'; -import { FormsModule } from '@angular/forms'; -import { CommonModule } from '@angular/common'; +import { Component, signal } from '@angular/core' +import { injectLiveQuery } from '@tanstack/angular-db' +import { eq } from '@tanstack/db' +import { todosCollection } from '../collections/todos-collection' +import { FormsModule } from '@angular/forms' +import { CommonModule } from '@angular/common' @Component({ selector: 'app-root', @@ -140,20 +140,20 @@ export class App { projects = [ { id: 1, name: 'Work' }, { id: 2, name: 'Home' }, - ]; + ] - selectedProjectId = signal(2); + selectedProjectId = signal(2) todoQuery = injectLiveQuery({ params: () => ({ projectID: this.selectedProjectId() }), query: ({ params, q }) => q.from({ todo: todosCollection }).where(({ todo }) => eq(todo.projectID, params.projectID)), - }); + }) - newTodoText = ''; + newTodoText = '' addTodo() { - if (!this.newTodoText.trim()) return; + if (!this.newTodoText.trim()) return const newTodo = { id: Date.now(), @@ -161,23 +161,23 @@ export class App { projectID: this.selectedProjectId(), completed: false, created_at: new Date(), - }; + } - todosCollection.insert(newTodo); - this.newTodoText = ''; + todosCollection.insert(newTodo) + this.newTodoText = '' } toggleTodo(id: number) { todosCollection.update(id, (draft: any) => { - draft.completed = !draft.completed; - }); + draft.completed = !draft.completed + }) } deleteTodo(id: number) { - todosCollection.delete(id); + todosCollection.delete(id) } getCompletedCount(): number { - return this.todoQuery.data().filter((todo) => todo.completed).length; + return this.todoQuery.data().filter((todo) => todo.completed).length } } diff --git a/examples/angular/todos/src/collections/todos-collection.ts b/examples/angular/todos/src/collections/todos-collection.ts index 1aa97d796..70e2fbb89 100644 --- a/examples/angular/todos/src/collections/todos-collection.ts +++ b/examples/angular/todos/src/collections/todos-collection.ts @@ -1,11 +1,11 @@ -import { createCollection, localOnlyCollectionOptions } from '@tanstack/db'; +import { createCollection, localOnlyCollectionOptions } from '@tanstack/db' interface Todo { - id: number; - text: string; - projectID: number; - completed: boolean; - created_at: Date; + id: number + text: string + projectID: number + completed: boolean + created_at: Date } export const todosCollection = createCollection( @@ -42,4 +42,4 @@ export const todosCollection = createCollection( }, ], }), -); +) diff --git a/examples/angular/todos/src/main.ts b/examples/angular/todos/src/main.ts index 190f3418d..8192dca69 100644 --- a/examples/angular/todos/src/main.ts +++ b/examples/angular/todos/src/main.ts @@ -1,5 +1,5 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { appConfig } from './app/app.config'; -import { App } from './app/app'; +import { bootstrapApplication } from '@angular/platform-browser' +import { appConfig } from './app/app.config' +import { App } from './app/app' -bootstrapApplication(App, appConfig).catch((err) => console.error(err)); +bootstrapApplication(App, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/todos/src/styles.css b/examples/angular/todos/src/styles.css index b5c61c956..d4b507858 100644 --- a/examples/angular/todos/src/styles.css +++ b/examples/angular/todos/src/styles.css @@ -1,3 +1 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; +@import 'tailwindcss'; diff --git a/examples/angular/todos/tailwind.config.js b/examples/angular/todos/tailwind.config.js deleted file mode 100644 index 0cc494f78..000000000 --- a/examples/angular/todos/tailwind.config.js +++ /dev/null @@ -1,8 +0,0 @@ -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: ['./src/**/*.{html,ts}'], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/examples/react/offline-transactions/package.json b/examples/react/offline-transactions/package.json index 81c85c2ef..7616b0c17 100644 --- a/examples/react/offline-transactions/package.json +++ b/examples/react/offline-transactions/package.json @@ -9,28 +9,27 @@ "start": "node .output/server/index.mjs" }, "dependencies": { - "@tanstack/offline-transactions": ">=1.0.0", - "@tanstack/query-db-collection": ">=1.0.5", - "@tanstack/react-db": ">=0.1.54", - "@tanstack/react-query": "^5.90.11", - "@tanstack/react-router": "^1.139.12", - "@tanstack/react-router-devtools": "^1.139.12", - "@tanstack/react-start": "^1.139.12", - "react": "^19.2.0", - "react-dom": "^19.2.0", + "@tanstack/offline-transactions": "^1.0.5", + "@tanstack/query-db-collection": "^1.0.11", + "@tanstack/react-db": "^0.1.59", + "@tanstack/react-query": "^5.90.12", + "@tanstack/react-router": "^1.140.0", + "@tanstack/react-router-devtools": "^1.140.0", + "@tanstack/react-start": "^1.140.0", + "react": "^19.2.1", + "react-dom": "^19.2.1", "tailwind-merge": "^2.6.0", "zod": "^3.25.76" }, "devDependencies": { - "@types/node": "^22.5.4", + "@tailwindcss/vite": "^4.1.17", + "@types/node": "^24.6.2", "@types/react": "^19.2.7", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.1.1", - "autoprefixer": "^10.4.22", "chokidar": "^4.0.3", - "postcss": "^8.5.6", - "tailwindcss": "^3.4.18", - "typescript": "^5.7.2", + "tailwindcss": "^4.1.17", + "typescript": "^5.9.2", "vite": "^7.2.6", "vite-tsconfig-paths": "^5.1.4" } diff --git a/examples/react/offline-transactions/postcss.config.mjs b/examples/react/offline-transactions/postcss.config.mjs deleted file mode 100644 index 2e7af2b7f..000000000 --- a/examples/react/offline-transactions/postcss.config.mjs +++ /dev/null @@ -1,6 +0,0 @@ -export default { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} diff --git a/examples/react/offline-transactions/src/components/DefaultCatchBoundary.tsx b/examples/react/offline-transactions/src/components/DefaultCatchBoundary.tsx index 63e20524f..ae1b64f67 100644 --- a/examples/react/offline-transactions/src/components/DefaultCatchBoundary.tsx +++ b/examples/react/offline-transactions/src/components/DefaultCatchBoundary.tsx @@ -4,8 +4,8 @@ import { rootRouteId, useMatch, useRouter, -} from "@tanstack/react-router" -import type { ErrorComponentProps } from "@tanstack/react-router" +} from '@tanstack/react-router' +import type { ErrorComponentProps } from '@tanstack/react-router' export function DefaultCatchBoundary({ error }: ErrorComponentProps) { const router = useRouter() diff --git a/examples/react/offline-transactions/src/components/NotFound.tsx b/examples/react/offline-transactions/src/components/NotFound.tsx index b29bf8dc7..7b54fa568 100644 --- a/examples/react/offline-transactions/src/components/NotFound.tsx +++ b/examples/react/offline-transactions/src/components/NotFound.tsx @@ -1,4 +1,4 @@ -import { Link } from "@tanstack/react-router" +import { Link } from '@tanstack/react-router' export function NotFound({ children }: { children?: any }) { return ( diff --git a/examples/react/offline-transactions/src/components/TodoDemo.tsx b/examples/react/offline-transactions/src/components/TodoDemo.tsx index 4a4bd3259..fcdf088da 100644 --- a/examples/react/offline-transactions/src/components/TodoDemo.tsx +++ b/examples/react/offline-transactions/src/components/TodoDemo.tsx @@ -1,6 +1,6 @@ -import React, { useEffect, useMemo, useState } from "react" -import { useLiveQuery } from "@tanstack/react-db" -import { createTodoActions, todoCollection } from "~/db/todos" +import React, { useEffect, useMemo, useState } from 'react' +import { useLiveQuery } from '@tanstack/react-db' +import { createTodoActions, todoCollection } from '~/db/todos' interface TodoDemoProps { title: string @@ -28,7 +28,7 @@ export function TodoDemo({ const { data: todoList = [], isLoading } = useLiveQuery((q) => q .from({ todo: todoCollection }) - .orderBy(({ todo }) => todo.createdAt, `desc`) + .orderBy(({ todo }) => todo.createdAt, `desc`), ) // Monitor online status diff --git a/examples/react/offline-transactions/src/db/todos.ts b/examples/react/offline-transactions/src/db/todos.ts index bc50377f4..1d8be0340 100644 --- a/examples/react/offline-transactions/src/db/todos.ts +++ b/examples/react/offline-transactions/src/db/todos.ts @@ -1,14 +1,14 @@ -import { createCollection } from "@tanstack/react-db" -import { queryCollectionOptions } from "@tanstack/query-db-collection" +import { createCollection } from '@tanstack/react-db' +import { queryCollectionOptions } from '@tanstack/query-db-collection' import { IndexedDBAdapter, LocalStorageAdapter, startOfflineExecutor, -} from "@tanstack/offline-transactions" -import { z } from "zod" -import type { PendingMutation } from "@tanstack/db" -import type { Todo } from "~/utils/todos" -import { queryClient } from "~/utils/queryClient" +} from '@tanstack/offline-transactions' +import { z } from 'zod' +import type { PendingMutation } from '@tanstack/db' +import type { Todo } from '~/utils/todos' +import { queryClient } from '~/utils/queryClient' /** * A utility function to fetch data from a URL with built-in retry logic for non-200 responses. @@ -29,7 +29,7 @@ import { queryClient } from "~/utils/queryClient" export async function fetchWithRetry( url: string, options: RequestInit = {}, - retryConfig: { retries?: number; delay?: number; backoff?: number } = {} + retryConfig: { retries?: number; delay?: number; backoff?: number } = {}, ): Promise { const { retries = 6, delay = 1000, backoff = 2 } = retryConfig @@ -45,7 +45,7 @@ export async function fetchWithRetry( // If it's a non-200 response, log the status and prepare to retry console.warn( - `Fetch attempt ${i + 1} failed with status: ${response.status}. Retrying...` + `Fetch attempt ${i + 1} failed with status: ${response.status}. Retrying...`, ) // Wait before the next attempt, with exponential backoff @@ -57,7 +57,7 @@ export async function fetchWithRetry( // Catch network errors and log a message console.error( `Fetch attempt ${i + 1} failed due to a network error:`, - error + error, ) // Wait before the next attempt, with exponential backoff @@ -104,7 +104,7 @@ export const todoCollection = createCollection( }, getKey: (item) => item.id, schema: todoSchema, - }) + }), ) // API client functions @@ -127,8 +127,8 @@ export const todoAPI = { const response = await fetchWithRetry(`/api/todos`, { method: `POST`, headers: { - "Content-Type": `application/json`, - "Idempotency-Key": idempotencyKey, + 'Content-Type': `application/json`, + 'Idempotency-Key': idempotencyKey, }, body: JSON.stringify({ text: todoData.text, @@ -149,14 +149,14 @@ export const todoAPI = { { method: `PUT`, headers: { - "Content-Type": `application/json`, - "Idempotency-Key": idempotencyKey, + 'Content-Type': `application/json`, + 'Idempotency-Key': idempotencyKey, }, body: JSON.stringify({ text: todoData.text, completed: todoData.completed, }), - } + }, ) if (!response.ok) { @@ -171,9 +171,9 @@ export const todoAPI = { { method: `DELETE`, headers: { - "Idempotency-Key": idempotencyKey, + 'Idempotency-Key': idempotencyKey, }, - } + }, ) if (!response.ok) { @@ -265,7 +265,7 @@ export async function createIndexedDBOfflineExecutor() { code: diagnostic.code, message: diagnostic.message, error: diagnostic.error, - } + }, ) }, }) @@ -297,7 +297,7 @@ export async function createLocalStorageOfflineExecutor() { code: diagnostic.code, message: diagnostic.message, error: diagnostic.error, - } + }, ) }, }) diff --git a/examples/react/offline-transactions/src/routeTree.gen.ts b/examples/react/offline-transactions/src/routeTree.gen.ts index def28e530..d594674fe 100644 --- a/examples/react/offline-transactions/src/routeTree.gen.ts +++ b/examples/react/offline-transactions/src/routeTree.gen.ts @@ -8,18 +8,10 @@ // You should NOT make any changes in this file as it will be overwritten. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. -import { createServerRootRoute } from '@tanstack/react-start/server' - import { Route as rootRouteImport } from './routes/__root' import { Route as LocalstorageRouteImport } from './routes/localstorage' import { Route as IndexeddbRouteImport } from './routes/indexeddb' import { Route as IndexRouteImport } from './routes/index' -import { ServerRoute as ApiUsersServerRouteImport } from './routes/api/users' -import { ServerRoute as ApiTodosServerRouteImport } from './routes/api/todos' -import { ServerRoute as ApiUsersUserIdServerRouteImport } from './routes/api/users.$userId' -import { ServerRoute as ApiTodosTodoIdServerRouteImport } from './routes/api/todos.$todoId' - -const rootServerRouteImport = createServerRootRoute() const LocalstorageRoute = LocalstorageRouteImport.update({ id: '/localstorage', @@ -36,26 +28,6 @@ const IndexRoute = IndexRouteImport.update({ path: '/', getParentRoute: () => rootRouteImport, } as any) -const ApiUsersServerRoute = ApiUsersServerRouteImport.update({ - id: '/api/users', - path: '/api/users', - getParentRoute: () => rootServerRouteImport, -} as any) -const ApiTodosServerRoute = ApiTodosServerRouteImport.update({ - id: '/api/todos', - path: '/api/todos', - getParentRoute: () => rootServerRouteImport, -} as any) -const ApiUsersUserIdServerRoute = ApiUsersUserIdServerRouteImport.update({ - id: '/$userId', - path: '/$userId', - getParentRoute: () => ApiUsersServerRoute, -} as any) -const ApiTodosTodoIdServerRoute = ApiTodosTodoIdServerRouteImport.update({ - id: '/$todoId', - path: '/$todoId', - getParentRoute: () => ApiTodosServerRoute, -} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -86,46 +58,6 @@ export interface RootRouteChildren { IndexeddbRoute: typeof IndexeddbRoute LocalstorageRoute: typeof LocalstorageRoute } -export interface FileServerRoutesByFullPath { - '/api/todos': typeof ApiTodosServerRouteWithChildren - '/api/users': typeof ApiUsersServerRouteWithChildren - '/api/todos/$todoId': typeof ApiTodosTodoIdServerRoute - '/api/users/$userId': typeof ApiUsersUserIdServerRoute -} -export interface FileServerRoutesByTo { - '/api/todos': typeof ApiTodosServerRouteWithChildren - '/api/users': typeof ApiUsersServerRouteWithChildren - '/api/todos/$todoId': typeof ApiTodosTodoIdServerRoute - '/api/users/$userId': typeof ApiUsersUserIdServerRoute -} -export interface FileServerRoutesById { - __root__: typeof rootServerRouteImport - '/api/todos': typeof ApiTodosServerRouteWithChildren - '/api/users': typeof ApiUsersServerRouteWithChildren - '/api/todos/$todoId': typeof ApiTodosTodoIdServerRoute - '/api/users/$userId': typeof ApiUsersUserIdServerRoute -} -export interface FileServerRouteTypes { - fileServerRoutesByFullPath: FileServerRoutesByFullPath - fullPaths: - | '/api/todos' - | '/api/users' - | '/api/todos/$todoId' - | '/api/users/$userId' - fileServerRoutesByTo: FileServerRoutesByTo - to: '/api/todos' | '/api/users' | '/api/todos/$todoId' | '/api/users/$userId' - id: - | '__root__' - | '/api/todos' - | '/api/users' - | '/api/todos/$todoId' - | '/api/users/$userId' - fileServerRoutesById: FileServerRoutesById -} -export interface RootServerRouteChildren { - ApiTodosServerRoute: typeof ApiTodosServerRouteWithChildren - ApiUsersServerRoute: typeof ApiUsersServerRouteWithChildren -} declare module '@tanstack/react-router' { interface FileRoutesByPath { @@ -152,62 +84,6 @@ declare module '@tanstack/react-router' { } } } -declare module '@tanstack/react-start/server' { - interface ServerFileRoutesByPath { - '/api/users': { - id: '/api/users' - path: '/api/users' - fullPath: '/api/users' - preLoaderRoute: typeof ApiUsersServerRouteImport - parentRoute: typeof rootServerRouteImport - } - '/api/todos': { - id: '/api/todos' - path: '/api/todos' - fullPath: '/api/todos' - preLoaderRoute: typeof ApiTodosServerRouteImport - parentRoute: typeof rootServerRouteImport - } - '/api/users/$userId': { - id: '/api/users/$userId' - path: '/$userId' - fullPath: '/api/users/$userId' - preLoaderRoute: typeof ApiUsersUserIdServerRouteImport - parentRoute: typeof ApiUsersServerRoute - } - '/api/todos/$todoId': { - id: '/api/todos/$todoId' - path: '/$todoId' - fullPath: '/api/todos/$todoId' - preLoaderRoute: typeof ApiTodosTodoIdServerRouteImport - parentRoute: typeof ApiTodosServerRoute - } - } -} - -interface ApiTodosServerRouteChildren { - ApiTodosTodoIdServerRoute: typeof ApiTodosTodoIdServerRoute -} - -const ApiTodosServerRouteChildren: ApiTodosServerRouteChildren = { - ApiTodosTodoIdServerRoute: ApiTodosTodoIdServerRoute, -} - -const ApiTodosServerRouteWithChildren = ApiTodosServerRoute._addFileChildren( - ApiTodosServerRouteChildren, -) - -interface ApiUsersServerRouteChildren { - ApiUsersUserIdServerRoute: typeof ApiUsersUserIdServerRoute -} - -const ApiUsersServerRouteChildren: ApiUsersServerRouteChildren = { - ApiUsersUserIdServerRoute: ApiUsersUserIdServerRoute, -} - -const ApiUsersServerRouteWithChildren = ApiUsersServerRoute._addFileChildren( - ApiUsersServerRouteChildren, -) const rootRouteChildren: RootRouteChildren = { IndexRoute: IndexRoute, @@ -217,10 +93,12 @@ const rootRouteChildren: RootRouteChildren = { export const routeTree = rootRouteImport ._addFileChildren(rootRouteChildren) ._addFileTypes() -const rootServerRouteChildren: RootServerRouteChildren = { - ApiTodosServerRoute: ApiTodosServerRouteWithChildren, - ApiUsersServerRoute: ApiUsersServerRouteWithChildren, + +import type { getRouter } from './router.tsx' +import type { createStart } from '@tanstack/react-start' +declare module '@tanstack/react-start' { + interface Register { + ssr: true + router: Awaited> + } } -export const serverRouteTree = rootServerRouteImport - ._addFileChildren(rootServerRouteChildren) - ._addFileTypes() diff --git a/examples/react/offline-transactions/src/router.tsx b/examples/react/offline-transactions/src/router.tsx index e15333a99..d5579a802 100644 --- a/examples/react/offline-transactions/src/router.tsx +++ b/examples/react/offline-transactions/src/router.tsx @@ -1,7 +1,7 @@ -import { createRouter as createTanStackRouter } from "@tanstack/react-router" -import { routeTree } from "./routeTree.gen" -import { DefaultCatchBoundary } from "./components/DefaultCatchBoundary" -import { NotFound } from "./components/NotFound" +import { createRouter as createTanStackRouter } from '@tanstack/react-router' +import { routeTree } from './routeTree.gen' +import { DefaultCatchBoundary } from './components/DefaultCatchBoundary' +import { NotFound } from './components/NotFound' export function createRouter() { const router = createTanStackRouter({ @@ -15,7 +15,7 @@ export function createRouter() { return router } -declare module "@tanstack/react-router" { +declare module '@tanstack/react-router' { interface Register { router: ReturnType } diff --git a/examples/react/offline-transactions/src/routes/__root.tsx b/examples/react/offline-transactions/src/routes/__root.tsx index ae2487fb4..89588bacb 100644 --- a/examples/react/offline-transactions/src/routes/__root.tsx +++ b/examples/react/offline-transactions/src/routes/__root.tsx @@ -4,15 +4,15 @@ import { Link, Scripts, createRootRoute, -} from "@tanstack/react-router" -import { TanStackRouterDevtools } from "@tanstack/react-router-devtools" -import { QueryClientProvider } from "@tanstack/react-query" -import * as React from "react" -import { DefaultCatchBoundary } from "~/components/DefaultCatchBoundary" -import { NotFound } from "~/components/NotFound" -import appCss from "~/styles/app.css?url" -import { seo } from "~/utils/seo" -import { queryClient } from "~/utils/queryClient" +} from '@tanstack/react-router' +import { TanStackRouterDevtools } from '@tanstack/react-router-devtools' +import { QueryClientProvider } from '@tanstack/react-query' +import * as React from 'react' +import { DefaultCatchBoundary } from '~/components/DefaultCatchBoundary' +import { NotFound } from '~/components/NotFound' +import appCss from '~/styles/app.css?url' +import { seo } from '~/utils/seo' +import { queryClient } from '~/utils/queryClient' export const Route = createRootRoute({ head: () => ({ diff --git a/examples/react/offline-transactions/src/routes/api/todos.$todoId.ts b/examples/react/offline-transactions/src/routes/api/todos.$todoId.ts index e55263518..21b293645 100644 --- a/examples/react/offline-transactions/src/routes/api/todos.$todoId.ts +++ b/examples/react/offline-transactions/src/routes/api/todos.$todoId.ts @@ -1,7 +1,7 @@ -import { createServerFileRoute } from "@tanstack/react-start/server" -import { json } from "@tanstack/react-start" -import type { TodoUpdate } from "~/utils/todos" -import { todoService } from "~/utils/todos" +import { createServerFileRoute } from '@tanstack/react-start/server' +import { json } from '@tanstack/react-start' +import type { TodoUpdate } from '~/utils/todos' +import { todoService } from '~/utils/todos' export const ServerRoute = createServerFileRoute(`/api/todos/$todoId`).methods({ GET: async ({ params, request }) => { @@ -45,7 +45,7 @@ export const ServerRoute = createServerFileRoute(`/api/todos/$todoId`).methods({ if (error instanceof Error && error.message.includes(`Simulated`)) { return json( { error: `Network error - please try again` }, - { status: 503 } + { status: 503 }, ) } return json({ error: `Failed to update todo` }, { status: 500 }) @@ -71,7 +71,7 @@ export const ServerRoute = createServerFileRoute(`/api/todos/$todoId`).methods({ if (error instanceof Error && error.message.includes(`Simulated`)) { return json( { error: `Network error - please try again` }, - { status: 503 } + { status: 503 }, ) } return json({ error: `Failed to delete todo` }, { status: 500 }) diff --git a/examples/react/offline-transactions/src/routes/api/todos.ts b/examples/react/offline-transactions/src/routes/api/todos.ts index 76623dd3c..8b6d1f8d7 100644 --- a/examples/react/offline-transactions/src/routes/api/todos.ts +++ b/examples/react/offline-transactions/src/routes/api/todos.ts @@ -1,7 +1,7 @@ -import { createServerFileRoute } from "@tanstack/react-start/server" -import { json } from "@tanstack/react-start" -import type { TodoInput } from "~/utils/todos" -import { todoService } from "~/utils/todos" +import { createServerFileRoute } from '@tanstack/react-start/server' +import { json } from '@tanstack/react-start' +import type { TodoInput } from '~/utils/todos' +import { todoService } from '~/utils/todos' export const ServerRoute = createServerFileRoute(`/api/todos`).methods({ GET: async ({ request }) => { @@ -43,7 +43,7 @@ export const ServerRoute = createServerFileRoute(`/api/todos`).methods({ if (error instanceof Error && error.message.includes(`Simulated`)) { return json( { error: `Network error - please try again` }, - { status: 503 } + { status: 503 }, ) } return json({ error: `Failed to create todo` }, { status: 500 }) diff --git a/examples/react/offline-transactions/src/routes/api/users.$userId.ts b/examples/react/offline-transactions/src/routes/api/users.$userId.ts index 8f966de20..19426fbbf 100644 --- a/examples/react/offline-transactions/src/routes/api/users.$userId.ts +++ b/examples/react/offline-transactions/src/routes/api/users.$userId.ts @@ -1,13 +1,13 @@ -import { createServerFileRoute } from "@tanstack/react-start/server" -import { json } from "@tanstack/react-start" -import type { User } from "~/utils/users" +import { createServerFileRoute } from '@tanstack/react-start/server' +import { json } from '@tanstack/react-start' +import type { User } from '~/utils/users' export const ServerRoute = createServerFileRoute(`/api/users/$userId`).methods({ GET: async ({ params, request }) => { console.info(`Fetching users by id=${params.userId}... @`, request.url) try { const res = await fetch( - `https://jsonplaceholder.typicode.com/users/` + params.userId + `https://jsonplaceholder.typicode.com/users/` + params.userId, ) if (!res.ok) { throw new Error(`Failed to fetch user`) diff --git a/examples/react/offline-transactions/src/routes/api/users.ts b/examples/react/offline-transactions/src/routes/api/users.ts index d92e39318..b627c2f1f 100644 --- a/examples/react/offline-transactions/src/routes/api/users.ts +++ b/examples/react/offline-transactions/src/routes/api/users.ts @@ -1,9 +1,9 @@ import { createServerFileRoute, getRequestHeaders, -} from "@tanstack/react-start/server" -import { createMiddleware, json } from "@tanstack/react-start" -import type { User } from "~/utils/users" +} from '@tanstack/react-start/server' +import { createMiddleware, json } from '@tanstack/react-start' +import type { User } from '~/utils/users' const userLoggerMiddleware = createMiddleware({ type: `request` }).server( async ({ next, _request }) => { @@ -13,7 +13,7 @@ const userLoggerMiddleware = createMiddleware({ type: `request` }).server( result.response.headers.set(`x-users`, `true`) console.info(`Out: /users`) return result - } + }, ) const testParentMiddleware = createMiddleware({ type: `request` }).server( @@ -23,7 +23,7 @@ const testParentMiddleware = createMiddleware({ type: `request` }).server( result.response.headers.set(`x-test-parent`, `true`) console.info(`Out: testParentMiddleware`) return result - } + }, ) const testMiddleware = createMiddleware({ type: `request` }) diff --git a/examples/react/offline-transactions/src/routes/index.tsx b/examples/react/offline-transactions/src/routes/index.tsx index bb1db6612..6e9141e5d 100644 --- a/examples/react/offline-transactions/src/routes/index.tsx +++ b/examples/react/offline-transactions/src/routes/index.tsx @@ -1,4 +1,4 @@ -import { Link, createFileRoute } from "@tanstack/react-router" +import { Link, createFileRoute } from '@tanstack/react-router' export const Route = createFileRoute(`/`)({ component: Home, diff --git a/examples/react/offline-transactions/src/routes/indexeddb.tsx b/examples/react/offline-transactions/src/routes/indexeddb.tsx index 5ab1db0d3..de3b88db9 100644 --- a/examples/react/offline-transactions/src/routes/indexeddb.tsx +++ b/examples/react/offline-transactions/src/routes/indexeddb.tsx @@ -1,7 +1,7 @@ -import { createFileRoute } from "@tanstack/react-router" -import { useEffect, useState } from "react" -import { TodoDemo } from "~/components/TodoDemo" -import { createIndexedDBOfflineExecutor } from "~/db/todos" +import { createFileRoute } from '@tanstack/react-router' +import { useEffect, useState } from 'react' +import { TodoDemo } from '~/components/TodoDemo' +import { createIndexedDBOfflineExecutor } from '~/db/todos' export const Route = createFileRoute(`/indexeddb`)({ component: IndexedDBDemo, diff --git a/examples/react/offline-transactions/src/routes/localstorage.tsx b/examples/react/offline-transactions/src/routes/localstorage.tsx index a9db81c5c..91ee02bff 100644 --- a/examples/react/offline-transactions/src/routes/localstorage.tsx +++ b/examples/react/offline-transactions/src/routes/localstorage.tsx @@ -1,7 +1,7 @@ -import { createFileRoute } from "@tanstack/react-router" -import { useEffect, useState } from "react" -import { TodoDemo } from "~/components/TodoDemo" -import { createLocalStorageOfflineExecutor } from "~/db/todos" +import { createFileRoute } from '@tanstack/react-router' +import { useEffect, useState } from 'react' +import { TodoDemo } from '~/components/TodoDemo' +import { createLocalStorageOfflineExecutor } from '~/db/todos' export const Route = createFileRoute(`/localstorage`)({ component: LocalStorageDemo, diff --git a/examples/react/offline-transactions/src/styles/app.css b/examples/react/offline-transactions/src/styles/app.css index c53c87066..857e5045e 100644 --- a/examples/react/offline-transactions/src/styles/app.css +++ b/examples/react/offline-transactions/src/styles/app.css @@ -1,6 +1,4 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; +@import 'tailwindcss'; @layer base { html { diff --git a/examples/react/offline-transactions/src/utils/loggingMiddleware.tsx b/examples/react/offline-transactions/src/utils/loggingMiddleware.tsx index 2c516283b..336587007 100644 --- a/examples/react/offline-transactions/src/utils/loggingMiddleware.tsx +++ b/examples/react/offline-transactions/src/utils/loggingMiddleware.tsx @@ -1,4 +1,4 @@ -import { createMiddleware } from "@tanstack/react-start" +import { createMiddleware } from '@tanstack/react-start' const preLogMiddleware = createMiddleware({ type: `function` }) .client(async (ctx) => { diff --git a/examples/react/offline-transactions/src/utils/queryClient.ts b/examples/react/offline-transactions/src/utils/queryClient.ts index 3706eed12..5ca414ef7 100644 --- a/examples/react/offline-transactions/src/utils/queryClient.ts +++ b/examples/react/offline-transactions/src/utils/queryClient.ts @@ -1,4 +1,4 @@ -import { QueryClient } from "@tanstack/react-query" +import { QueryClient } from '@tanstack/react-query' export const queryClient = new QueryClient({ defaultOptions: { diff --git a/examples/react/offline-transactions/src/utils/todos.ts b/examples/react/offline-transactions/src/utils/todos.ts index 935a7f565..419683556 100644 --- a/examples/react/offline-transactions/src/utils/todos.ts +++ b/examples/react/offline-transactions/src/utils/todos.ts @@ -28,7 +28,7 @@ export const todoService = { getAll(): Array { return Array.from(todosStore.values()).sort( (a, b) => - new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime() + new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(), ) }, diff --git a/examples/react/offline-transactions/tailwind.config.mjs b/examples/react/offline-transactions/tailwind.config.mjs deleted file mode 100644 index 6765f75b2..000000000 --- a/examples/react/offline-transactions/tailwind.config.mjs +++ /dev/null @@ -1,4 +0,0 @@ -/** @type {import('tailwindcss').Config} */ -export default { - content: ["./src/**/*.{js,jsx,ts,tsx}"], -} diff --git a/examples/react/offline-transactions/vite.config.ts b/examples/react/offline-transactions/vite.config.ts index f730c1bf5..402e2d611 100644 --- a/examples/react/offline-transactions/vite.config.ts +++ b/examples/react/offline-transactions/vite.config.ts @@ -1,9 +1,10 @@ -import path from "node:path" -import { tanstackStart } from "@tanstack/react-start/plugin/vite" -import { defineConfig } from "vite" -import tsConfigPaths from "vite-tsconfig-paths" -import viteReact from "@vitejs/plugin-react" -import chokidar from "chokidar" +import path from 'node:path' +import { tanstackStart } from '@tanstack/react-start/plugin/vite' +import { defineConfig } from 'vite' +import tsConfigPaths from 'vite-tsconfig-paths' +import viteReact from '@vitejs/plugin-react' +import tailwindcss from '@tailwindcss/vite' +import chokidar from 'chokidar' function watchWorkspacePackages() { return { @@ -27,7 +28,7 @@ function watchWorkspacePackages() { watcher.on(`ready`, () => { console.log( - `[watch-workspace] Initial scan complete. Watching for changes...` + `[watch-workspace] Initial scan complete. Watching for changes...`, ) const watchedPaths = watcher.getWatched() console.log(`[watch-workspace] Currently watching:`, watchedPaths) @@ -74,5 +75,6 @@ export default defineConfig({ mode: `spa`, // SPA mode for client-side only offline features }), viteReact(), + tailwindcss(), ], }) diff --git a/examples/react/paced-mutations-demo/package.json b/examples/react/paced-mutations-demo/package.json index 347c9a369..8e8ba243b 100644 --- a/examples/react/paced-mutations-demo/package.json +++ b/examples/react/paced-mutations-demo/package.json @@ -9,17 +9,17 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/db": ">=0.0.0 <1.0.0", - "@tanstack/react-db": ">=0.0.0 <1.0.0", + "@tanstack/db": "^0.5.11", + "@tanstack/react-db": "^0.1.59", "mitt": "^3.0.1", - "react": "^18.3.1", - "react-dom": "^18.3.1" + "react": "^19.2.1", + "react-dom": "^19.2.1" }, "devDependencies": { - "@types/react": "^18.3.27", - "@types/react-dom": "^18.3.7", - "@vitejs/plugin-react": "^4.7.0", - "typescript": "^5.7.2", - "vite": "^6.4.1" + "@types/react": "^19.2.7", + "@types/react-dom": "^19.2.3", + "@vitejs/plugin-react": "^5.1.1", + "typescript": "^5.9.2", + "vite": "^7.2.6" } } diff --git a/examples/react/paced-mutations-demo/src/App.tsx b/examples/react/paced-mutations-demo/src/App.tsx index 57f1ad33c..26781446c 100644 --- a/examples/react/paced-mutations-demo/src/App.tsx +++ b/examples/react/paced-mutations-demo/src/App.tsx @@ -1,13 +1,13 @@ -import { useEffect, useMemo, useState } from "react" -import mitt from "mitt" +import { useEffect, useMemo, useState } from 'react' +import mitt from 'mitt' import { createCollection, debounceStrategy, queueStrategy, throttleStrategy, usePacedMutations, -} from "@tanstack/react-db" -import type { PendingMutation, Transaction } from "@tanstack/react-db" +} from '@tanstack/react-db' +import type { PendingMutation, Transaction } from '@tanstack/react-db' interface Item { id: number @@ -86,7 +86,7 @@ export function App() { const [trailing, setTrailing] = useState(true) const [transactions, setTransactions] = useState>( - [] + [], ) const [optimisticState, setOptimisticState] = useState(null) const [syncedState, setSyncedState] = useState(fakeServer.get(1)!) @@ -130,7 +130,7 @@ export function App() { return { ...t, state: `executing` as const, executingAt } } return t - }) + }), ) // Simulate network delay to fake server (random 100-600ms) @@ -200,7 +200,7 @@ export function App() { } } return t - }) + }), ) // Update optimistic state after completion setOptimisticState(itemCollection.get(1)) @@ -213,7 +213,7 @@ export function App() { return { ...t, state: `failed` as const, completedAt: Date.now() } } return t - }) + }), ) // Update optimistic state after failure setOptimisticState(itemCollection.get(1)) diff --git a/examples/react/paced-mutations-demo/src/index.css b/examples/react/paced-mutations-demo/src/index.css index d863dbaf4..e315d3e3d 100644 --- a/examples/react/paced-mutations-demo/src/index.css +++ b/examples/react/paced-mutations-demo/src/index.css @@ -6,8 +6,8 @@ body { font-family: - -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", - "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; + -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', + 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background: #f5f5f5; @@ -16,7 +16,7 @@ body { code { font-family: - source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace; + source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; background: #f0f0f0; padding: 2px 6px; border-radius: 3px; @@ -74,7 +74,7 @@ h1 { } .control-group select, -.control-group input[type="number"] { +.control-group input[type='number'] { width: 100%; padding: 8px; border: 1px solid #ddd; @@ -89,7 +89,7 @@ h1 { margin-bottom: 8px; } -.checkbox-group input[type="checkbox"] { +.checkbox-group input[type='checkbox'] { width: 16px; height: 16px; } diff --git a/examples/react/paced-mutations-demo/src/main.tsx b/examples/react/paced-mutations-demo/src/main.tsx index 8def6fa63..950701bda 100644 --- a/examples/react/paced-mutations-demo/src/main.tsx +++ b/examples/react/paced-mutations-demo/src/main.tsx @@ -1,10 +1,10 @@ -import React from "react" -import ReactDOM from "react-dom/client" -import { App } from "./App" -import "./index.css" +import React from 'react' +import ReactDOM from 'react-dom/client' +import { App } from './App' +import './index.css' ReactDOM.createRoot(document.getElementById(`root`)!).render( - + , ) diff --git a/examples/react/paced-mutations-demo/vite.config.ts b/examples/react/paced-mutations-demo/vite.config.ts index ea1889ae7..9ffcc6757 100644 --- a/examples/react/paced-mutations-demo/vite.config.ts +++ b/examples/react/paced-mutations-demo/vite.config.ts @@ -1,5 +1,5 @@ -import { defineConfig } from "vite" -import react from "@vitejs/plugin-react" +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [react()], diff --git a/examples/react/projects/.env.example b/examples/react/projects/.env.example index 232094023..6b0e9f5f2 100644 --- a/examples/react/projects/.env.example +++ b/examples/react/projects/.env.example @@ -3,4 +3,4 @@ DATABASE_URL=postgresql://postgres:password@localhost:54321/projects # Create a secret for better-auth -BETTER_AUTH_SECRET= +BETTER_AUTH_SECRET=example-secret-for-development-only diff --git a/examples/react/projects/README.md b/examples/react/projects/README.md index 3bfe71853..7a122431d 100644 --- a/examples/react/projects/README.md +++ b/examples/react/projects/README.md @@ -78,7 +78,7 @@ Now that you have two routes you can use a `Link` component to navigate between To use SPA (Single Page Application) navigation you will need to import the `Link` component from `@tanstack/react-router`. ```tsx -import { Link } from "@tanstack/react-router" +import { Link } from '@tanstack/react-router' ``` Then anywhere in your JSX you can use it like so: @@ -98,10 +98,10 @@ In the File Based Routing setup the layout is located in `src/routes/__root.tsx` Here is an example layout that includes a header: ```tsx -import { Outlet, createRootRoute } from "@tanstack/react-router" -import { TanStackRouterDevtools } from "@tanstack/react-router-devtools" +import { Outlet, createRootRoute } from '@tanstack/react-router' +import { TanStackRouterDevtools } from '@tanstack/react-router-devtools' -import { Link } from "@tanstack/react-router" +import { Link } from '@tanstack/react-router' export const Route = createRootRoute({ component: () => ( @@ -132,9 +132,9 @@ For example: ```tsx const peopleRoute = createRoute({ getParentRoute: () => rootRoute, - path: "/people", + path: '/people', loader: async () => { - const response = await fetch("https://swapi.dev/api/people") + const response = await fetch('https://swapi.dev/api/people') return response.json() as Promise<{ results: { name: string @@ -180,16 +180,16 @@ Built on a TypeScript implementation of differential dataflow, TanStack DB provi This example uses Query Collections for server-state synchronization with tRPC: ```tsx -import { createCollection } from "@tanstack/react-db" -import { queryCollectionOptions } from "@tanstack/query-db-collection" -import { QueryClient } from "@tanstack/query-core" +import { createCollection } from '@tanstack/react-db' +import { queryCollectionOptions } from '@tanstack/query-db-collection' +import { QueryClient } from '@tanstack/query-core' const queryClient = new QueryClient() export const todoCollection = createCollection( queryCollectionOptions({ - id: "todos", - queryKey: ["todos"], + id: 'todos', + queryKey: ['todos'], queryFn: async () => { const todos = await trpc.todos.getAll.query() return todos.map((todo) => ({ @@ -224,7 +224,7 @@ const AddTodo = () => { onClick={() => todoCollection.insert({ id: crypto.randomUUID(), - text: "šŸ”„ Make app faster", + text: 'šŸ”„ Make app faster', completed: false, }) } @@ -238,7 +238,7 @@ const AddTodo = () => { Use live queries to read data reactively across collections: ```tsx -import { useLiveQuery } from "@tanstack/react-db" +import { useLiveQuery } from '@tanstack/react-db' const Todos = () => { // Read data using live queries with cross-collection joins @@ -246,12 +246,12 @@ const Todos = () => { query .from({ t: todoCollection }) .join({ - type: "inner", + type: 'inner', from: { l: listCollection }, on: [`@l.id`, `=`, `@t.list_id`], }) - .where("@l.active", "=", true) - .select("@t.id", "@t.text", "@t.status", "@l.name") + .where('@l.active', '=', true) + .select('@t.id', '@t.text', '@t.status', '@l.name') ) return ( diff --git a/examples/react/projects/docker-compose.yaml b/examples/react/projects/docker-compose.yaml index 6da89ad48..42a8aca0d 100644 --- a/examples/react/projects/docker-compose.yaml +++ b/examples/react/projects/docker-compose.yaml @@ -1,5 +1,5 @@ -version: "3.3" -name: "tanstack-start-db-projects" +version: '3.3' +name: 'tanstack-start-db-projects' services: postgres: diff --git a/examples/react/projects/drizzle.config.ts b/examples/react/projects/drizzle.config.ts index 6a6f388fd..30ae9a282 100644 --- a/examples/react/projects/drizzle.config.ts +++ b/examples/react/projects/drizzle.config.ts @@ -1,5 +1,5 @@ -import "dotenv/config" -import { defineConfig } from "drizzle-kit" +import 'dotenv/config' +import { defineConfig } from 'drizzle-kit' export default defineConfig({ out: `./src/db/out`, diff --git a/examples/react/projects/eslint.config.mjs b/examples/react/projects/eslint.config.mjs index e3c217b91..29a94ce29 100644 --- a/examples/react/projects/eslint.config.mjs +++ b/examples/react/projects/eslint.config.mjs @@ -1,19 +1,19 @@ -import js from "@eslint/js" -import tsParser from "@typescript-eslint/parser" -import tsPlugin from "@typescript-eslint/eslint-plugin" -import reactPlugin from "eslint-plugin-react" -import prettierPlugin from "eslint-plugin-prettier" -import prettierConfig from "eslint-config-prettier" -import globals from "globals" -import { includeIgnoreFile } from "@eslint/compat" -import { fileURLToPath } from "url" +import js from '@eslint/js' +import tsParser from '@typescript-eslint/parser' +import tsPlugin from '@typescript-eslint/eslint-plugin' +import reactPlugin from 'eslint-plugin-react' +import prettierPlugin from 'eslint-plugin-prettier' +import prettierConfig from 'eslint-config-prettier' +import globals from 'globals' +import { includeIgnoreFile } from '@eslint/compat' +import { fileURLToPath } from 'url' -const gitignorePath = fileURLToPath(new URL(".gitignore", import.meta.url)) +const gitignorePath = fileURLToPath(new URL('.gitignore', import.meta.url)) export default [ - includeIgnoreFile(gitignorePath, "Imported .gitignore patterns"), + includeIgnoreFile(gitignorePath, 'Imported .gitignore patterns'), { - files: ["src/**/*.{js,jsx,ts,tsx,mjs}"], + files: ['src/**/*.{js,jsx,ts,tsx,mjs}'], languageOptions: { ecmaVersion: 2022, sourceType: `module`, @@ -35,7 +35,7 @@ export default [ }, }, plugins: { - "@typescript-eslint": tsPlugin, + '@typescript-eslint': tsPlugin, react: reactPlugin, prettier: prettierPlugin, }, @@ -44,12 +44,12 @@ export default [ ...tsPlugin.configs.recommended.rules, ...reactPlugin.configs.recommended.rules, ...prettierConfig.rules, - "prettier/prettier": `error`, - "react/react-in-jsx-scope": `off`, - "react/jsx-uses-react": `off`, - "no-undef": `off`, - "@typescript-eslint/no-undef": "off", - "@typescript-eslint/no-unused-vars": [ + 'prettier/prettier': `error`, + 'react/react-in-jsx-scope': `off`, + 'react/jsx-uses-react': `off`, + 'no-undef': `off`, + '@typescript-eslint/no-undef': 'off', + '@typescript-eslint/no-unused-vars': [ `error`, { argsIgnorePattern: `^_`, diff --git a/examples/react/projects/package.json b/examples/react/projects/package.json index 8fb7374a4..70cf79649 100644 --- a/examples/react/projects/package.json +++ b/examples/react/projects/package.json @@ -16,25 +16,25 @@ }, "dependencies": { "@tailwindcss/vite": "^4.1.17", - "@tanstack/query-core": "^5.90.11", - "@tanstack/query-db-collection": ">=1.0.5", - "@tanstack/react-db": ">=0.1.54", - "@tanstack/react-router": "^1.139.12", - "@tanstack/react-router-devtools": "^1.139.12", + "@tanstack/query-core": "^5.90.12", + "@tanstack/query-db-collection": "^1.0.11", + "@tanstack/react-db": "^0.1.59", + "@tanstack/react-router": "^1.140.0", + "@tanstack/react-router-devtools": "^1.140.0", "@tanstack/react-router-with-query": "^1.130.17", - "@tanstack/react-start": "^1.139.12", - "@tanstack/router-plugin": "^1.139.12", + "@tanstack/react-start": "^1.140.0", + "@tanstack/router-plugin": "^1.140.0", "@trpc/client": "^11.7.2", "@trpc/server": "^11.7.2", "better-auth": "^1.3.26", "dotenv": "^17.2.3", - "drizzle-orm": "^0.44.7", + "drizzle-orm": "^0.45.0", "drizzle-zod": "^0.8.3", "pg": "^8.16.3", - "react": "^19.2.0", - "react-dom": "^19.2.0", + "react": "^19.2.1", + "react-dom": "^19.2.1", "tailwindcss": "^4.1.17", - "vite": "^6.3.5", + "vite": "^7.2.6", "vite-tsconfig-paths": "^5.1.4", "zod": "^4.1.11" }, @@ -46,21 +46,21 @@ "@types/pg": "^8.15.6", "@types/react": "^19.2.7", "@types/react-dom": "^19.2.3", - "@typescript-eslint/eslint-plugin": "^8.48.0", - "@typescript-eslint/parser": "^8.48.0", - "@vitejs/plugin-react": "^5.0.4", + "@typescript-eslint/eslint-plugin": "^8.48.1", + "@typescript-eslint/parser": "^8.48.1", + "@vitejs/plugin-react": "^5.1.1", "concurrently": "^9.2.1", - "drizzle-kit": "^0.31.7", + "drizzle-kit": "^0.31.8", "eslint": "^9.39.1", "eslint-config-prettier": "^10.1.8", "eslint-plugin-prettier": "^5.5.4", "eslint-plugin-react": "^7.37.5", "globals": "^16.5.0", - "jsdom": "^27.0.0", - "prettier": "^3.7.3", + "jsdom": "^27.2.0", + "prettier": "^3.7.4", "tsx": "^4.21.0", "typescript": "^5.9.2", - "vite": "^6.4.1", + "vite": "^7.2.6", "vitest": "^3.2.4", "web-vitals": "^5.1.0" } diff --git a/examples/react/projects/src/db/auth-schema.ts b/examples/react/projects/src/db/auth-schema.ts index c0ff607e2..ac78b4658 100644 --- a/examples/react/projects/src/db/auth-schema.ts +++ b/examples/react/projects/src/db/auth-schema.ts @@ -1,61 +1,61 @@ -import { pgTable, text, timestamp, boolean } from "drizzle-orm/pg-core" +import { pgTable, text, timestamp, boolean } from 'drizzle-orm/pg-core' -export const users = pgTable("users", { - id: text("id").primaryKey(), - name: text("name").notNull(), - email: text("email").notNull().unique(), - emailVerified: boolean("email_verified") +export const users = pgTable('users', { + id: text('id').primaryKey(), + name: text('name').notNull(), + email: text('email').notNull().unique(), + emailVerified: boolean('email_verified') .$defaultFn(() => false) .notNull(), - image: text("image"), - createdAt: timestamp("created_at") + image: text('image'), + createdAt: timestamp('created_at') .$defaultFn(() => /* @__PURE__ */ new Date()) .notNull(), - updatedAt: timestamp("updated_at") + updatedAt: timestamp('updated_at') .$defaultFn(() => /* @__PURE__ */ new Date()) .notNull(), }) -export const sessions = pgTable("sessions", { - id: text("id").primaryKey(), - expiresAt: timestamp("expires_at").notNull(), - token: text("token").notNull().unique(), - createdAt: timestamp("created_at").notNull(), - updatedAt: timestamp("updated_at").notNull(), - ipAddress: text("ip_address"), - userAgent: text("user_agent"), - userId: text("user_id") +export const sessions = pgTable('sessions', { + id: text('id').primaryKey(), + expiresAt: timestamp('expires_at').notNull(), + token: text('token').notNull().unique(), + createdAt: timestamp('created_at').notNull(), + updatedAt: timestamp('updated_at').notNull(), + ipAddress: text('ip_address'), + userAgent: text('user_agent'), + userId: text('user_id') .notNull() - .references(() => users.id, { onDelete: "cascade" }), + .references(() => users.id, { onDelete: 'cascade' }), }) -export const accounts = pgTable("accounts", { - id: text("id").primaryKey(), - accountId: text("account_id").notNull(), - providerId: text("provider_id").notNull(), - userId: text("user_id") +export const accounts = pgTable('accounts', { + id: text('id').primaryKey(), + accountId: text('account_id').notNull(), + providerId: text('provider_id').notNull(), + userId: text('user_id') .notNull() - .references(() => users.id, { onDelete: "cascade" }), - accessToken: text("access_token"), - refreshToken: text("refresh_token"), - idToken: text("id_token"), - accessTokenExpiresAt: timestamp("access_token_expires_at"), - refreshTokenExpiresAt: timestamp("refresh_token_expires_at"), - scope: text("scope"), - password: text("password"), - createdAt: timestamp("created_at").notNull(), - updatedAt: timestamp("updated_at").notNull(), + .references(() => users.id, { onDelete: 'cascade' }), + accessToken: text('access_token'), + refreshToken: text('refresh_token'), + idToken: text('id_token'), + accessTokenExpiresAt: timestamp('access_token_expires_at'), + refreshTokenExpiresAt: timestamp('refresh_token_expires_at'), + scope: text('scope'), + password: text('password'), + createdAt: timestamp('created_at').notNull(), + updatedAt: timestamp('updated_at').notNull(), }) -export const verifications = pgTable("verifications", { - id: text("id").primaryKey(), - identifier: text("identifier").notNull(), - value: text("value").notNull(), - expiresAt: timestamp("expires_at").notNull(), - createdAt: timestamp("created_at").$defaultFn( +export const verifications = pgTable('verifications', { + id: text('id').primaryKey(), + identifier: text('identifier').notNull(), + value: text('value').notNull(), + expiresAt: timestamp('expires_at').notNull(), + createdAt: timestamp('created_at').$defaultFn( () => /* @__PURE__ */ new Date() ), - updatedAt: timestamp("updated_at").$defaultFn( + updatedAt: timestamp('updated_at').$defaultFn( () => /* @__PURE__ */ new Date() ), }) diff --git a/examples/react/projects/src/db/connection.ts b/examples/react/projects/src/db/connection.ts index 5a8ea8beb..2712baa58 100644 --- a/examples/react/projects/src/db/connection.ts +++ b/examples/react/projects/src/db/connection.ts @@ -1,4 +1,4 @@ -import "dotenv/config" -import { drizzle } from "drizzle-orm/node-postgres" +import 'dotenv/config' +import { drizzle } from 'drizzle-orm/node-postgres' export const db = drizzle(process.env.DATABASE_URL!, { casing: `snake_case` }) diff --git a/examples/react/projects/src/db/out/meta/0000_snapshot.json b/examples/react/projects/src/db/out/meta/0000_snapshot.json index 1adb2bfa7..37908ea08 100644 --- a/examples/react/projects/src/db/out/meta/0000_snapshot.json +++ b/examples/react/projects/src/db/out/meta/0000_snapshot.json @@ -64,12 +64,8 @@ "name": "projects_owner_id_users_id_fk", "tableFrom": "projects", "tableTo": "users", - "columnsFrom": [ - "owner_id" - ], - "columnsTo": [ - "id" - ], + "columnsFrom": ["owner_id"], + "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } @@ -147,12 +143,8 @@ "name": "todos_user_id_users_id_fk", "tableFrom": "todos", "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], + "columnsFrom": ["user_id"], + "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" }, @@ -160,12 +152,8 @@ "name": "todos_project_id_projects_id_fk", "tableFrom": "todos", "tableTo": "projects", - "columnsFrom": [ - "project_id" - ], - "columnsTo": [ - "id" - ], + "columnsFrom": ["project_id"], + "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } @@ -265,12 +253,8 @@ "name": "accounts_user_id_users_id_fk", "tableFrom": "accounts", "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], + "columnsFrom": ["user_id"], + "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } @@ -340,12 +324,8 @@ "name": "sessions_user_id_users_id_fk", "tableFrom": "sessions", "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], + "columnsFrom": ["user_id"], + "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } @@ -355,9 +335,7 @@ "sessions_token_unique": { "name": "sessions_token_unique", "nullsNotDistinct": false, - "columns": [ - "token" - ] + "columns": ["token"] } }, "policies": {}, @@ -418,9 +396,7 @@ "users_email_unique": { "name": "users_email_unique", "nullsNotDistinct": false, - "columns": [ - "email" - ] + "columns": ["email"] } }, "policies": {}, @@ -488,4 +464,4 @@ "schemas": {}, "tables": {} } -} \ No newline at end of file +} diff --git a/examples/react/projects/src/db/out/meta/_journal.json b/examples/react/projects/src/db/out/meta/_journal.json index 5f5b938e6..55bf81962 100644 --- a/examples/react/projects/src/db/out/meta/_journal.json +++ b/examples/react/projects/src/db/out/meta/_journal.json @@ -10,4 +10,4 @@ "breakpoints": true } ] -} \ No newline at end of file +} diff --git a/examples/react/projects/src/db/schema.ts b/examples/react/projects/src/db/schema.ts index 34df19e6a..cdd205c0a 100644 --- a/examples/react/projects/src/db/schema.ts +++ b/examples/react/projects/src/db/schema.ts @@ -5,11 +5,11 @@ import { timestamp, varchar, text, -} from "drizzle-orm/pg-core" -import { createSchemaFactory } from "drizzle-zod" -import { z } from "zod" -export * from "./auth-schema" -import { users } from "./auth-schema" +} from 'drizzle-orm/pg-core' +import { createSchemaFactory } from 'drizzle-zod' +import { z } from 'zod' +export * from './auth-schema' +import { users } from './auth-schema' const { createInsertSchema, createSelectSchema, createUpdateSchema } = createSchemaFactory({ zodInstance: z }) @@ -18,11 +18,11 @@ export const projectsTable = pgTable(`projects`, { id: integer().primaryKey().generatedAlwaysAsIdentity(), name: varchar({ length: 255 }).notNull(), description: text(), - shared_user_ids: text("shared_user_ids").array().notNull().default([]), + shared_user_ids: text('shared_user_ids').array().notNull().default([]), created_at: timestamp({ withTimezone: true }).notNull().defaultNow(), - owner_id: text("owner_id") + owner_id: text('owner_id') .notNull() - .references(() => users.id, { onDelete: "cascade" }), + .references(() => users.id, { onDelete: 'cascade' }), }) export const todosTable = pgTable(`todos`, { @@ -30,13 +30,13 @@ export const todosTable = pgTable(`todos`, { text: varchar({ length: 500 }).notNull(), completed: boolean().notNull().default(false), created_at: timestamp({ withTimezone: true }).notNull().defaultNow(), - user_id: text("user_id") + user_id: text('user_id') .notNull() - .references(() => users.id, { onDelete: "cascade" }), - project_id: integer("project_id") + .references(() => users.id, { onDelete: 'cascade' }), + project_id: integer('project_id') .notNull() - .references(() => projectsTable.id, { onDelete: "cascade" }), - user_ids: text("user_ids").array().notNull().default([]), + .references(() => projectsTable.id, { onDelete: 'cascade' }), + user_ids: text('user_ids').array().notNull().default([]), }) export const selectProjectSchema = createSelectSchema(projectsTable) diff --git a/examples/react/projects/src/lib/auth-client.ts b/examples/react/projects/src/lib/auth-client.ts index 8665c3b11..939114361 100644 --- a/examples/react/projects/src/lib/auth-client.ts +++ b/examples/react/projects/src/lib/auth-client.ts @@ -1,2 +1,2 @@ -import { createAuthClient } from "better-auth/react" +import { createAuthClient } from 'better-auth/react' export const authClient = createAuthClient() diff --git a/examples/react/projects/src/lib/auth.ts b/examples/react/projects/src/lib/auth.ts index f423c5fdc..22426df53 100644 --- a/examples/react/projects/src/lib/auth.ts +++ b/examples/react/projects/src/lib/auth.ts @@ -1,11 +1,11 @@ -import { betterAuth } from "better-auth" -import { drizzleAdapter } from "better-auth/adapters/drizzle" -import { db } from "@/db/connection" // your drizzle instance -import * as schema from "@/db/auth-schema" +import { betterAuth } from 'better-auth' +import { drizzleAdapter } from 'better-auth/adapters/drizzle' +import { db } from '@/db/connection' // your drizzle instance +import * as schema from '@/db/auth-schema' export const auth = betterAuth({ database: drizzleAdapter(db, { - provider: "pg", + provider: 'pg', usePlural: true, schema, // debugLogs: true, @@ -13,10 +13,10 @@ export const auth = betterAuth({ emailAndPassword: { enabled: true, // Disable signup in production, allow in dev - disableSignUp: process.env.NODE_ENV === "production", - minPasswordLength: process.env.NODE_ENV === "production" ? 8 : 1, + disableSignUp: process.env.NODE_ENV === 'production', + minPasswordLength: process.env.NODE_ENV === 'production' ? 8 : 1, }, trustedOrigins: [ - "http://localhost:5173", // Vite dev server + 'http://localhost:5173', // Vite dev server ], }) diff --git a/examples/react/projects/src/lib/collections.ts b/examples/react/projects/src/lib/collections.ts index 336466dbe..235969dd2 100644 --- a/examples/react/projects/src/lib/collections.ts +++ b/examples/react/projects/src/lib/collections.ts @@ -1,20 +1,20 @@ -import { createCollection } from "@tanstack/react-db" -import { queryCollectionOptions } from "@tanstack/query-db-collection" -import { QueryClient } from "@tanstack/query-core" +import { createCollection } from '@tanstack/react-db' +import { queryCollectionOptions } from '@tanstack/query-db-collection' +import { QueryClient } from '@tanstack/query-core' import { selectTodoSchema, selectProjectSchema, selectUsersSchema, -} from "@/db/schema" -import { trpc } from "@/lib/trpc-client" +} from '@/db/schema' +import { trpc } from '@/lib/trpc-client' // Create a query client for query collections const queryClient = new QueryClient() export const usersCollection = createCollection( queryCollectionOptions({ - id: "users", - queryKey: ["users"], + id: 'users', + queryKey: ['users'], // Poll for updates every 5 seconds refetchInterval: 5000, queryFn: async () => { @@ -32,8 +32,8 @@ export const usersCollection = createCollection( ) export const projectCollection = createCollection( queryCollectionOptions({ - id: "projects", - queryKey: ["projects"], + id: 'projects', + queryKey: ['projects'], // Poll for updates every 5 seconds refetchInterval: 5000, queryFn: async () => { @@ -78,8 +78,8 @@ export const projectCollection = createCollection( export const todoCollection = createCollection( queryCollectionOptions({ - id: "todos", - queryKey: ["todos"], + id: 'todos', + queryKey: ['todos'], // Poll for updates every 5 seconds refetchInterval: 5000, queryFn: async () => { diff --git a/examples/react/projects/src/lib/trpc-client.ts b/examples/react/projects/src/lib/trpc-client.ts index d03bf6922..11b29a321 100644 --- a/examples/react/projects/src/lib/trpc-client.ts +++ b/examples/react/projects/src/lib/trpc-client.ts @@ -1,13 +1,13 @@ -import { createTRPCProxyClient, httpBatchLink } from "@trpc/client" -import type { AppRouter } from "@/routes/api/trpc/$" +import { createTRPCProxyClient, httpBatchLink } from '@trpc/client' +import type { AppRouter } from '@/routes/api/trpc/$' export const trpc = createTRPCProxyClient({ links: [ httpBatchLink({ - url: "/api/trpc", + url: '/api/trpc', async headers() { return { - cookie: typeof document !== "undefined" ? document.cookie : "", + cookie: typeof document !== 'undefined' ? document.cookie : '', } }, }), diff --git a/examples/react/projects/src/lib/trpc.ts b/examples/react/projects/src/lib/trpc.ts index 8843140d1..98e498464 100644 --- a/examples/react/projects/src/lib/trpc.ts +++ b/examples/react/projects/src/lib/trpc.ts @@ -1,6 +1,6 @@ -import { initTRPC, TRPCError } from "@trpc/server" -import { auth } from "@/lib/auth" -import { db } from "@/db/connection" +import { initTRPC, TRPCError } from '@trpc/server' +import { auth } from '@/lib/auth' +import { db } from '@/db/connection' export type Context = { session: Awaited> @@ -15,7 +15,7 @@ export const middleware = t.middleware export const isAuthed = middleware(async ({ ctx, next }) => { if (!ctx.session?.user) { - throw new TRPCError({ code: "UNAUTHORIZED" }) + throw new TRPCError({ code: 'UNAUTHORIZED' }) } return next({ ctx: { diff --git a/examples/react/projects/src/lib/trpc/projects.ts b/examples/react/projects/src/lib/trpc/projects.ts index fd9de7132..dcf6e7a45 100644 --- a/examples/react/projects/src/lib/trpc/projects.ts +++ b/examples/react/projects/src/lib/trpc/projects.ts @@ -1,12 +1,12 @@ -import { router, authedProcedure } from "@/lib/trpc" -import { z } from "zod" -import { TRPCError } from "@trpc/server" -import { eq, and, sql } from "drizzle-orm" +import { router, authedProcedure } from '@/lib/trpc' +import { z } from 'zod' +import { TRPCError } from '@trpc/server' +import { eq, and, sql } from 'drizzle-orm' import { projectsTable, createProjectSchema, updateProjectSchema, -} from "@/db/schema" +} from '@/db/schema' export const projectsRouter = router({ getAll: authedProcedure.query(async ({ ctx }) => { @@ -24,8 +24,8 @@ export const projectsRouter = router({ .mutation(async ({ ctx, input }) => { if (input.owner_id !== ctx.session.user.id) { throw new TRPCError({ - code: "FORBIDDEN", - message: "You can only create projects you own", + code: 'FORBIDDEN', + message: 'You can only create projects you own', }) } @@ -58,9 +58,9 @@ export const projectsRouter = router({ if (!updatedItem) { throw new TRPCError({ - code: "NOT_FOUND", + code: 'NOT_FOUND', message: - "Project not found or you do not have permission to update it", + 'Project not found or you do not have permission to update it', }) } @@ -82,9 +82,9 @@ export const projectsRouter = router({ if (!deletedItem) { throw new TRPCError({ - code: "NOT_FOUND", + code: 'NOT_FOUND', message: - "Project not found or you do not have permission to delete it", + 'Project not found or you do not have permission to delete it', }) } diff --git a/examples/react/projects/src/lib/trpc/todos.ts b/examples/react/projects/src/lib/trpc/todos.ts index 127d36cca..d6825804e 100644 --- a/examples/react/projects/src/lib/trpc/todos.ts +++ b/examples/react/projects/src/lib/trpc/todos.ts @@ -1,8 +1,8 @@ -import { router, authedProcedure } from "@/lib/trpc" -import { z } from "zod" -import { TRPCError } from "@trpc/server" -import { eq, and, arrayContains } from "drizzle-orm" -import { todosTable, createTodoSchema, updateTodoSchema } from "@/db/schema" +import { router, authedProcedure } from '@/lib/trpc' +import { z } from 'zod' +import { TRPCError } from '@trpc/server' +import { eq, and, arrayContains } from 'drizzle-orm' +import { todosTable, createTodoSchema, updateTodoSchema } from '@/db/schema' export const todosRouter = router({ getAll: authedProcedure.query(async ({ ctx }) => { @@ -44,8 +44,8 @@ export const todosRouter = router({ if (!updatedItem) { throw new TRPCError({ - code: "NOT_FOUND", - message: "Todo not found or you do not have permission to update it", + code: 'NOT_FOUND', + message: 'Todo not found or you do not have permission to update it', }) } @@ -67,8 +67,8 @@ export const todosRouter = router({ if (!deletedItem) { throw new TRPCError({ - code: "NOT_FOUND", - message: "Todo not found or you do not have permission to delete it", + code: 'NOT_FOUND', + message: 'Todo not found or you do not have permission to delete it', }) } diff --git a/examples/react/projects/src/lib/trpc/users.ts b/examples/react/projects/src/lib/trpc/users.ts index 86f887753..13c730bdd 100644 --- a/examples/react/projects/src/lib/trpc/users.ts +++ b/examples/react/projects/src/lib/trpc/users.ts @@ -1,7 +1,7 @@ -import { router, authedProcedure } from "@/lib/trpc" -import { z } from "zod" -import { TRPCError } from "@trpc/server" -import { users } from "@/db/schema" +import { router, authedProcedure } from '@/lib/trpc' +import { z } from 'zod' +import { TRPCError } from '@trpc/server' +import { users } from '@/db/schema' export const usersRouter = router({ getAll: authedProcedure.query(async ({ ctx }) => { @@ -11,7 +11,7 @@ export const usersRouter = router({ create: authedProcedure.input(z.any()).mutation(async () => { throw new TRPCError({ - code: "FORBIDDEN", + code: 'FORBIDDEN', message: "Can't create new users through API", }) }), @@ -20,7 +20,7 @@ export const usersRouter = router({ .input(z.object({ id: z.string(), data: z.any() })) .mutation(async () => { throw new TRPCError({ - code: "FORBIDDEN", + code: 'FORBIDDEN', message: "Can't edit users through API", }) }), @@ -29,7 +29,7 @@ export const usersRouter = router({ .input(z.object({ id: z.string() })) .mutation(async () => { throw new TRPCError({ - code: "FORBIDDEN", + code: 'FORBIDDEN', message: "Can't delete users through API", }) }), diff --git a/examples/react/projects/src/router.tsx b/examples/react/projects/src/router.tsx index e025c0f7f..50504c678 100644 --- a/examples/react/projects/src/router.tsx +++ b/examples/react/projects/src/router.tsx @@ -1,9 +1,9 @@ -import { createRouter as createTanstackRouter } from "@tanstack/react-router" +import { createRouter as createTanstackRouter } from '@tanstack/react-router' // Import the generated route tree -import { routeTree } from "./routeTree.gen" +import { routeTree } from './routeTree.gen' -import "./styles.css" +import './styles.css' // Create a new router instance export function getRouter() { diff --git a/examples/react/projects/src/routes/__root.tsx b/examples/react/projects/src/routes/__root.tsx index bb4aa1c89..477a34019 100644 --- a/examples/react/projects/src/routes/__root.tsx +++ b/examples/react/projects/src/routes/__root.tsx @@ -1,13 +1,13 @@ -import * as React from "react" +import * as React from 'react' import { HeadContent, Outlet, Scripts, createRootRoute, -} from "@tanstack/react-router" -import { TanStackRouterDevtools } from "@tanstack/react-router-devtools" +} from '@tanstack/react-router' +import { TanStackRouterDevtools } from '@tanstack/react-router-devtools' -import appCss from "../styles.css?url" +import appCss from '../styles.css?url' export const Route = createRootRoute({ head: () => ({ diff --git a/examples/react/projects/src/routes/_authenticated.tsx b/examples/react/projects/src/routes/_authenticated.tsx index 749668ea4..c119ed40c 100644 --- a/examples/react/projects/src/routes/_authenticated.tsx +++ b/examples/react/projects/src/routes/_authenticated.tsx @@ -1,13 +1,13 @@ -import { useEffect, useState } from "react" +import { useEffect, useState } from 'react' import { Link, Outlet, createFileRoute, useNavigate, -} from "@tanstack/react-router" -import { useLiveQuery } from "@tanstack/react-db" -import { authClient } from "@/lib/auth-client" -import { projectCollection } from "@/lib/collections" +} from '@tanstack/react-router' +import { useLiveQuery } from '@tanstack/react-db' +import { authClient } from '@/lib/auth-client' +import { projectCollection } from '@/lib/collections' export const Route = createFileRoute(`/_authenticated`)({ component: AuthenticatedLayout, diff --git a/examples/react/projects/src/routes/_authenticated/index.tsx b/examples/react/projects/src/routes/_authenticated/index.tsx index bc3990cd2..a8f8cb9ab 100644 --- a/examples/react/projects/src/routes/_authenticated/index.tsx +++ b/examples/react/projects/src/routes/_authenticated/index.tsx @@ -1,8 +1,8 @@ -import { useEffect } from "react" -import { createFileRoute, redirect, useNavigate } from "@tanstack/react-router" -import { useLiveQuery } from "@tanstack/react-db" -import { projectCollection, todoCollection } from "@/lib/collections" -import { authClient } from "@/lib/auth-client" +import { useEffect } from 'react' +import { createFileRoute, redirect, useNavigate } from '@tanstack/react-router' +import { useLiveQuery } from '@tanstack/react-db' +import { projectCollection, todoCollection } from '@/lib/collections' +import { authClient } from '@/lib/auth-client' export const Route = createFileRoute(`/_authenticated/`)({ component: IndexRedirect, diff --git a/examples/react/projects/src/routes/_authenticated/project/$projectId.tsx b/examples/react/projects/src/routes/_authenticated/project/$projectId.tsx index 3a648964f..7c3084f23 100644 --- a/examples/react/projects/src/routes/_authenticated/project/$projectId.tsx +++ b/examples/react/projects/src/routes/_authenticated/project/$projectId.tsx @@ -1,13 +1,13 @@ -import { createFileRoute } from "@tanstack/react-router" -import { eq, useLiveQuery } from "@tanstack/react-db" -import { useState } from "react" -import type { Todo } from "@/db/schema" -import { authClient } from "@/lib/auth-client" +import { createFileRoute } from '@tanstack/react-router' +import { eq, useLiveQuery } from '@tanstack/react-db' +import { useState } from 'react' +import type { Todo } from '@/db/schema' +import { authClient } from '@/lib/auth-client' import { projectCollection, todoCollection, usersCollection, -} from "@/lib/collections" +} from '@/lib/collections' export const Route = createFileRoute(`/_authenticated/project/$projectId`)({ component: ProjectPage, diff --git a/examples/react/projects/src/routes/api/auth.ts b/examples/react/projects/src/routes/api/auth.ts index c8d288f8b..4b3b9bfbf 100644 --- a/examples/react/projects/src/routes/api/auth.ts +++ b/examples/react/projects/src/routes/api/auth.ts @@ -1,5 +1,5 @@ -import { createFileRoute } from "@tanstack/react-router" -import { auth } from "@/lib/auth" +import { createFileRoute } from '@tanstack/react-router' +import { auth } from '@/lib/auth' const serve = ({ request }: { request: Request }) => { return auth.handler(request) diff --git a/examples/react/projects/src/routes/api/trpc/$.ts b/examples/react/projects/src/routes/api/trpc/$.ts index e7438e56b..eb6071a4a 100644 --- a/examples/react/projects/src/routes/api/trpc/$.ts +++ b/examples/react/projects/src/routes/api/trpc/$.ts @@ -1,11 +1,11 @@ -import { createFileRoute } from "@tanstack/react-router" -import { fetchRequestHandler } from "@trpc/server/adapters/fetch" -import { router } from "@/lib/trpc" -import { projectsRouter } from "@/lib/trpc/projects" -import { todosRouter } from "@/lib/trpc/todos" -import { usersRouter } from "@/lib/trpc/users" -import { db } from "@/db/connection" -import { auth } from "@/lib/auth" +import { createFileRoute } from '@tanstack/react-router' +import { fetchRequestHandler } from '@trpc/server/adapters/fetch' +import { router } from '@/lib/trpc' +import { projectsRouter } from '@/lib/trpc/projects' +import { todosRouter } from '@/lib/trpc/todos' +import { usersRouter } from '@/lib/trpc/users' +import { db } from '@/db/connection' +import { auth } from '@/lib/auth' export const appRouter = router({ projects: projectsRouter, diff --git a/examples/react/projects/src/routes/login.tsx b/examples/react/projects/src/routes/login.tsx index 09512463c..1f2a039c1 100644 --- a/examples/react/projects/src/routes/login.tsx +++ b/examples/react/projects/src/routes/login.tsx @@ -1,7 +1,7 @@ -import { useState } from "react" -import { createFileRoute } from "@tanstack/react-router" -import type { FormEvent } from "react" -import { authClient } from "@/lib/auth-client" +import { useState } from 'react' +import { createFileRoute } from '@tanstack/react-router' +import type { FormEvent } from 'react' +import { authClient } from '@/lib/auth-client' export const Route = createFileRoute(`/login`)({ component: Layout, diff --git a/examples/react/projects/src/start.tsx b/examples/react/projects/src/start.tsx index de7b170ed..9e8694bab 100644 --- a/examples/react/projects/src/start.tsx +++ b/examples/react/projects/src/start.tsx @@ -1,4 +1,4 @@ -import { createStart } from "@tanstack/react-start" +import { createStart } from '@tanstack/react-start' export const startInstance = createStart(() => { return { diff --git a/examples/react/projects/src/styles.css b/examples/react/projects/src/styles.css index 80cb92ada..06f1bca4b 100644 --- a/examples/react/projects/src/styles.css +++ b/examples/react/projects/src/styles.css @@ -1,15 +1,15 @@ -@import "tailwindcss"; +@import 'tailwindcss'; body { @apply m-0; font-family: - -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", - "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; + -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', + 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } code { font-family: - source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace; + source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; } diff --git a/examples/react/projects/vite.config.ts b/examples/react/projects/vite.config.ts index 6708900ed..7307fb0e8 100644 --- a/examples/react/projects/vite.config.ts +++ b/examples/react/projects/vite.config.ts @@ -1,8 +1,8 @@ -import { defineConfig } from "vite" -import { tanstackStart } from "@tanstack/react-start/plugin/vite" -import viteTsConfigPaths from "vite-tsconfig-paths" -import tailwindcss from "@tailwindcss/vite" -import react from "@vitejs/plugin-react" +import { defineConfig } from 'vite' +import { tanstackStart } from '@tanstack/react-start/plugin/vite' +import viteTsConfigPaths from 'vite-tsconfig-paths' +import tailwindcss from '@tailwindcss/vite' +import react from '@vitejs/plugin-react' const config = defineConfig({ plugins: [ diff --git a/examples/react/todo/docker-compose.yml b/examples/react/todo/docker-compose.yml index 9b6ddcffe..cb03bb1b3 100644 --- a/examples/react/todo/docker-compose.yml +++ b/examples/react/todo/docker-compose.yml @@ -1,4 +1,4 @@ -version: "3.8" +version: '3.8' services: postgres: image: postgres:17-alpine @@ -7,7 +7,7 @@ services: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres ports: - - "54322:5432" + - '54322:5432' volumes: - ./postgres.conf:/etc/postgresql/postgresql.conf:ro tmpfs: @@ -18,7 +18,7 @@ services: - -c - config_file=/etc/postgresql/postgresql.conf healthcheck: - test: ["CMD-SHELL", "pg_isready -U postgres"] + test: ['CMD-SHELL', 'pg_isready -U postgres'] interval: 5s timeout: 5s retries: 5 @@ -37,11 +37,11 @@ services: trailbase: image: trailbase/trailbase:latest ports: - - "${PORT:-4000}:4000" + - '${PORT:-4000}:4000' restart: unless-stopped volumes: - ./traildepot:/app/traildepot - command: "/app/trail --data-dir /app/traildepot run --address 0.0.0.0:4000 --dev" + command: '/app/trail --data-dir /app/traildepot run --address 0.0.0.0:4000 --dev' volumes: postgres_data: diff --git a/examples/react/todo/drizzle.config.ts b/examples/react/todo/drizzle.config.ts index 550633431..486be88c9 100644 --- a/examples/react/todo/drizzle.config.ts +++ b/examples/react/todo/drizzle.config.ts @@ -1,4 +1,4 @@ -import type { Config } from "drizzle-kit" +import type { Config } from 'drizzle-kit' export default { schema: `./src/db/schema.ts`, diff --git a/examples/react/todo/package.json b/examples/react/todo/package.json index c7710f3d9..b40917598 100644 --- a/examples/react/todo/package.json +++ b/examples/react/todo/package.json @@ -3,20 +3,20 @@ "private": true, "version": "0.1.24", "dependencies": { - "@tanstack/electric-db-collection": ">=0.2.0", - "@tanstack/query-core": "^5.90.11", - "@tanstack/query-db-collection": ">=1.0.0", - "@tanstack/react-db": ">=0.1.44", - "@tanstack/react-router": "^1.139.12", - "@tanstack/react-start": "^1.139.12", - "@tanstack/trailbase-db-collection": ">=0.1.44", + "@tanstack/electric-db-collection": "^0.2.12", + "@tanstack/query-core": "^5.90.12", + "@tanstack/query-db-collection": "^1.0.11", + "@tanstack/react-db": "^0.1.59", + "@tanstack/react-router": "^1.140.0", + "@tanstack/react-start": "^1.140.0", + "@tanstack/trailbase-db-collection": "^0.1.55", "cors": "^2.8.5", - "drizzle-orm": "^0.44.7", + "drizzle-orm": "^0.45.0", "drizzle-zod": "^0.8.3", - "express": "^4.21.2", + "express": "^4.22.1", "postgres": "^3.4.7", - "react": "^19.2.0", - "react-dom": "^19.2.0", + "react": "^19.2.1", + "react-dom": "^19.2.1", "tailwindcss": "^4.1.17", "trailbase": "^0.8.0", "vite-tsconfig-paths": "^5.1.4", @@ -27,23 +27,23 @@ "@tailwindcss/vite": "^4.1.17", "@types/cors": "^2.8.19", "@types/express": "^4.17.25", - "@types/node": "^24.5.2", + "@types/node": "^24.6.2", "@types/pg": "^8.15.6", "@types/react": "^19.2.7", "@types/react-dom": "^19.2.3", - "@typescript-eslint/eslint-plugin": "^8.48.0", - "@typescript-eslint/parser": "^8.48.0", - "@vitejs/plugin-react": "^5.0.3", + "@typescript-eslint/eslint-plugin": "^8.48.1", + "@typescript-eslint/parser": "^8.48.1", + "@vitejs/plugin-react": "^5.1.1", "concurrently": "^9.2.1", - "dotenv": "^17.2.2", - "drizzle-kit": "^0.31.7", + "dotenv": "^17.2.3", + "drizzle-kit": "^0.31.8", "eslint": "^9.39.1", "eslint-plugin-react-hooks": "^5.2.0", "eslint-plugin-react-refresh": "^0.4.24", "pg": "^8.16.3", "tsx": "^4.21.0", "typescript": "^5.9.2", - "vite": "^6.1.1" + "vite": "^7.2.6" }, "scripts": { "build": "vite build", diff --git a/examples/react/todo/scripts/migrate.ts b/examples/react/todo/scripts/migrate.ts index ee0089f38..d58ebc44e 100644 --- a/examples/react/todo/scripts/migrate.ts +++ b/examples/react/todo/scripts/migrate.ts @@ -1,7 +1,7 @@ -import { drizzle } from "drizzle-orm/node-postgres" -import { migrate } from "drizzle-orm/node-postgres/migrator" -import pkg from "pg" -import * as dotenv from "dotenv" +import { drizzle } from 'drizzle-orm/node-postgres' +import { migrate } from 'drizzle-orm/node-postgres/migrator' +import pkg from 'pg' +import * as dotenv from 'dotenv' dotenv.config() diff --git a/examples/react/todo/src/api/server.ts b/examples/react/todo/src/api/server.ts index 4aa55431d..948d2442e 100644 --- a/examples/react/todo/src/api/server.ts +++ b/examples/react/todo/src/api/server.ts @@ -1,14 +1,14 @@ -import express from "express" -import cors from "cors" -import { sql } from "../db/postgres" +import express from 'express' +import cors from 'cors' +import { sql } from '../db/postgres' import { validateInsertConfig, validateInsertTodo, validateUpdateConfig, validateUpdateTodo, -} from "../db/validation" -import type { Express } from "express" -import type { Txid } from "@tanstack/electric-db-collection" +} from '../db/validation' +import type { Express } from 'express' +import type { Txid } from '@tanstack/electric-db-collection' // Create Express app const app: Express = express() diff --git a/examples/react/todo/src/components/NotFound.tsx b/examples/react/todo/src/components/NotFound.tsx index 2e892fafd..60caed4d7 100644 --- a/examples/react/todo/src/components/NotFound.tsx +++ b/examples/react/todo/src/components/NotFound.tsx @@ -1,4 +1,4 @@ -import { Link } from "@tanstack/react-router" +import { Link } from '@tanstack/react-router' export function NotFound() { return ( diff --git a/examples/react/todo/src/components/TodoApp.tsx b/examples/react/todo/src/components/TodoApp.tsx index 0fbcb65ed..9a0225436 100644 --- a/examples/react/todo/src/components/TodoApp.tsx +++ b/examples/react/todo/src/components/TodoApp.tsx @@ -1,11 +1,11 @@ -import React, { useState } from "react" -import { Link } from "@tanstack/react-router" -import { debounceStrategy, usePacedMutations } from "@tanstack/react-db" -import type { FormEvent } from "react" -import type { Collection, Transaction } from "@tanstack/react-db" +import React, { useState } from 'react' +import { Link } from '@tanstack/react-router' +import { debounceStrategy, usePacedMutations } from '@tanstack/react-db' +import type { FormEvent } from 'react' +import type { Collection, Transaction } from '@tanstack/react-db' -import type { SelectConfig, SelectTodo } from "@/db/validation" -import { getComplementaryColor } from "@/lib/color" +import type { SelectConfig, SelectTodo } from '@/db/validation' +import { getComplementaryColor } from '@/lib/color' interface TodoAppProps { todos: Array @@ -165,8 +165,8 @@ export function TodoApp({ todosToToggle.map((todo) => todo.id), (drafts) => drafts.forEach( - (draft) => (draft.completed = !draft.completed) - ) + (draft) => (draft.completed = !draft.completed), + ), ) }} > diff --git a/examples/react/todo/src/db/index.ts b/examples/react/todo/src/db/index.ts index 5a856e693..fbd0af99d 100644 --- a/examples/react/todo/src/db/index.ts +++ b/examples/react/todo/src/db/index.ts @@ -1,6 +1,6 @@ -import { drizzle } from "drizzle-orm/node-postgres" -import { Pool } from "pg" -import * as schema from "./schema" +import { drizzle } from 'drizzle-orm/node-postgres' +import { Pool } from 'pg' +import * as schema from './schema' // Create a PostgreSQL pool const pool = new Pool({ diff --git a/examples/react/todo/src/db/postgres.ts b/examples/react/todo/src/db/postgres.ts index 674348433..9a0c0437c 100644 --- a/examples/react/todo/src/db/postgres.ts +++ b/examples/react/todo/src/db/postgres.ts @@ -1,4 +1,4 @@ -import postgres from "postgres" +import postgres from 'postgres' // Create a postgres instance export const sql = postgres({ diff --git a/examples/react/todo/src/db/schema.ts b/examples/react/todo/src/db/schema.ts index 4bf9e0d0a..bed8f98a8 100644 --- a/examples/react/todo/src/db/schema.ts +++ b/examples/react/todo/src/db/schema.ts @@ -1,4 +1,4 @@ -import { boolean, pgTable, serial, text, timestamp } from "drizzle-orm/pg-core" +import { boolean, pgTable, serial, text, timestamp } from 'drizzle-orm/pg-core' export const todos = pgTable(`todos`, { id: serial(`id`).primaryKey(), diff --git a/examples/react/todo/src/db/validation.ts b/examples/react/todo/src/db/validation.ts index 404afd0d4..2fa8408af 100644 --- a/examples/react/todo/src/db/validation.ts +++ b/examples/react/todo/src/db/validation.ts @@ -1,6 +1,6 @@ -import { createInsertSchema, createSelectSchema } from "drizzle-zod" -import { config, todos } from "./schema" -import type { z } from "zod" +import { createInsertSchema, createSelectSchema } from 'drizzle-zod' +import { config, todos } from './schema' +import type { z } from 'zod' // Auto-generated schemas from Drizzle schema (omit auto-generated fields) export const insertTodoSchema = createInsertSchema(todos).omit({ diff --git a/examples/react/todo/src/index.css b/examples/react/todo/src/index.css index 5211a0414..6dafed23c 100644 --- a/examples/react/todo/src/index.css +++ b/examples/react/todo/src/index.css @@ -1,4 +1,4 @@ -@import "tailwindcss"; +@import 'tailwindcss'; html, body { @@ -21,7 +21,7 @@ button { body { font: - 14px "Helvetica Neue", + 14px 'Helvetica Neue', Helvetica, Arial, sans-serif; diff --git a/examples/react/todo/src/lib/api.ts b/examples/react/todo/src/lib/api.ts index c6e070b31..e066cdbe6 100644 --- a/examples/react/todo/src/lib/api.ts +++ b/examples/react/todo/src/lib/api.ts @@ -1,4 +1,4 @@ -import type { SelectConfig, SelectTodo } from "../db/validation" +import type { SelectConfig, SelectTodo } from '../db/validation' // API helper for todos and config const API_BASE_URL = `/api` @@ -19,11 +19,11 @@ export const api = { return response.json() }, create: async ( - todo: Partial + todo: Partial, ): Promise<{ todo: SelectTodo; txid: number }> => { const response = await fetch(`${API_BASE_URL}/todos`, { method: `POST`, - headers: { "Content-Type": `application/json` }, + headers: { 'Content-Type': `application/json` }, body: JSON.stringify(todo), }) if (!response.ok) @@ -32,11 +32,11 @@ export const api = { }, update: async ( id: unknown, - changes: Partial + changes: Partial, ): Promise<{ todo: SelectTodo; txid: number }> => { const response = await fetch(`${API_BASE_URL}/todos/${id}`, { method: `PUT`, - headers: { "Content-Type": `application/json` }, + headers: { 'Content-Type': `application/json` }, body: JSON.stringify(changes), }) if (!response.ok) @@ -44,7 +44,7 @@ export const api = { return response.json() }, delete: async ( - id: unknown + id: unknown, ): Promise<{ success: boolean; txid: number }> => { const response = await fetch(`${API_BASE_URL}/todos/${id}`, { method: `DELETE`, @@ -70,11 +70,11 @@ export const api = { return response.json() }, create: async ( - config: Partial + config: Partial, ): Promise<{ config: SelectConfig; txid: number }> => { const response = await fetch(`${API_BASE_URL}/config`, { method: `POST`, - headers: { "Content-Type": `application/json` }, + headers: { 'Content-Type': `application/json` }, body: JSON.stringify(config), }) if (!response.ok) @@ -83,11 +83,11 @@ export const api = { }, update: async ( id: number, - changes: Partial + changes: Partial, ): Promise<{ config: SelectConfig; txid: number }> => { const response = await fetch(`${API_BASE_URL}/config/${id}`, { method: `PUT`, - headers: { "Content-Type": `application/json` }, + headers: { 'Content-Type': `application/json` }, body: JSON.stringify(changes), }) if (!response.ok) diff --git a/examples/react/todo/src/lib/collections.ts b/examples/react/todo/src/lib/collections.ts index 5e41bac92..689372b80 100644 --- a/examples/react/todo/src/lib/collections.ts +++ b/examples/react/todo/src/lib/collections.ts @@ -1,12 +1,12 @@ -import { createCollection } from "@tanstack/react-db" -import { electricCollectionOptions } from "@tanstack/electric-db-collection" -import { queryCollectionOptions } from "@tanstack/query-db-collection" -import { trailBaseCollectionOptions } from "@tanstack/trailbase-db-collection" -import { QueryClient } from "@tanstack/query-core" -import { initClient } from "trailbase" -import { selectConfigSchema, selectTodoSchema } from "../db/validation" -import { api } from "./api" -import type { SelectConfig, SelectTodo } from "../db/validation" +import { createCollection } from '@tanstack/react-db' +import { electricCollectionOptions } from '@tanstack/electric-db-collection' +import { queryCollectionOptions } from '@tanstack/query-db-collection' +import { trailBaseCollectionOptions } from '@tanstack/trailbase-db-collection' +import { QueryClient } from '@tanstack/query-core' +import { initClient } from 'trailbase' +import { selectConfigSchema, selectTodoSchema } from '../db/validation' +import { api } from './api' +import type { SelectConfig, SelectTodo } from '../db/validation' // Create a query client for query collections const queryClient = new QueryClient() @@ -48,7 +48,7 @@ export const electricTodoCollection = createCollection( } const response = await api.todos.update(original.id, changes) return response.txid - }) + }), ) return { txid: txids } }, @@ -61,11 +61,11 @@ export const electricTodoCollection = createCollection( } const response = await api.todos.delete(original.id) return response.txid - }) + }), ) return { txid: txids } }, - }) + }), ) // Query Todo Collection @@ -102,7 +102,7 @@ export const queryTodoCollection = createCollection( throw new Error(`Original todo not found for update`) } return await api.todos.update(original.id, changes) - }) + }), ) }, onDelete: async ({ transaction }) => { @@ -113,10 +113,10 @@ export const queryTodoCollection = createCollection( throw new Error(`Original todo not found for delete`) } await api.todos.delete(original.id) - }) + }), ) }, - }) + }), ) type Todo = { @@ -143,7 +143,7 @@ export const trailBaseTodoCollection = createCollection( created_at: (date) => Math.floor(date.valueOf() / 1000), updated_at: (date) => Math.floor(date.valueOf() / 1000), }, - }) + }), ) // Electric Config Collection @@ -175,11 +175,11 @@ export const electricConfigCollection = createCollection( } const response = await api.config.update(original.id, changes) return response.txid - }) + }), ) return { txid: txids } }, - }) + }), ) // Query Config Collection @@ -213,11 +213,11 @@ export const queryConfigCollection = createCollection( } const response = await api.config.update(original.id, changes) return response.txid - }) + }), ) return { txid: txids } }, - }) + }), ) type Config = { @@ -244,5 +244,5 @@ export const trailBaseConfigCollection = createCollection( created_at: (date) => Math.floor(date.valueOf() / 1000), updated_at: (date) => Math.floor(date.valueOf() / 1000), }, - }) + }), ) diff --git a/examples/react/todo/src/main.tsx b/examples/react/todo/src/main.tsx index 0218796d3..5368d1602 100644 --- a/examples/react/todo/src/main.tsx +++ b/examples/react/todo/src/main.tsx @@ -1,13 +1,13 @@ -import { StrictMode } from "react" -import { createRoot } from "react-dom/client" -import { RouterProvider } from "@tanstack/react-router" -import { getRouter } from "./router" -import "./index.css" +import { StrictMode } from 'react' +import { createRoot } from 'react-dom/client' +import { RouterProvider } from '@tanstack/react-router' +import { getRouter } from './router' +import './index.css' const router = getRouter() createRoot(document.getElementById(`root`)!).render( - + , ) diff --git a/examples/react/todo/src/router.tsx b/examples/react/todo/src/router.tsx index 75e151354..e4dfe3766 100644 --- a/examples/react/todo/src/router.tsx +++ b/examples/react/todo/src/router.tsx @@ -1,10 +1,10 @@ -import { createRouter as createTanstackRouter } from "@tanstack/react-router" +import { createRouter as createTanstackRouter } from '@tanstack/react-router' // Import the generated route tree -import { routeTree } from "./routeTree.gen" -import { NotFound } from "./components/NotFound" +import { routeTree } from './routeTree.gen' +import { NotFound } from './components/NotFound' -import "./styles.css" +import './styles.css' // Create a new router instance export function getRouter() { diff --git a/examples/react/todo/src/routes/__root.tsx b/examples/react/todo/src/routes/__root.tsx index 94dd0b516..e57101152 100644 --- a/examples/react/todo/src/routes/__root.tsx +++ b/examples/react/todo/src/routes/__root.tsx @@ -1,12 +1,12 @@ -import * as React from "react" +import * as React from 'react' import { HeadContent, Outlet, Scripts, createRootRoute, -} from "@tanstack/react-router" +} from '@tanstack/react-router' -import appCss from "../styles.css?url" +import appCss from '../styles.css?url' export const Route = createRootRoute({ head: () => ({ diff --git a/examples/react/todo/src/routes/api/config.$id.ts b/examples/react/todo/src/routes/api/config.$id.ts index 9acfec234..f60ef9a64 100644 --- a/examples/react/todo/src/routes/api/config.$id.ts +++ b/examples/react/todo/src/routes/api/config.$id.ts @@ -1,8 +1,8 @@ -import { createFileRoute } from "@tanstack/react-router" -import { json } from "@tanstack/react-start" -import { sql } from "../../db/postgres" -import { validateUpdateConfig } from "../../db/validation" -import type { Txid } from "@tanstack/electric-db-collection" +import { createFileRoute } from '@tanstack/react-router' +import { json } from '@tanstack/react-start' +import { sql } from '../../db/postgres' +import { validateUpdateConfig } from '../../db/validation' +import type { Txid } from '@tanstack/electric-db-collection' // Generate a transaction ID async function generateTxId(tx: any): Promise { @@ -36,7 +36,7 @@ export const Route = createFileRoute(`/api/config/$id`)({ error: `Failed to fetch config`, details: error instanceof Error ? error.message : String(error), }, - { status: 500 } + { status: 500 }, ) } }, @@ -76,7 +76,7 @@ export const Route = createFileRoute(`/api/config/$id`)({ error: `Failed to update config`, details: error instanceof Error ? error.message : String(error), }, - { status: 500 } + { status: 500 }, ) } }, @@ -111,7 +111,7 @@ export const Route = createFileRoute(`/api/config/$id`)({ error: `Failed to delete config`, details: error instanceof Error ? error.message : String(error), }, - { status: 500 } + { status: 500 }, ) } }, diff --git a/examples/react/todo/src/routes/api/config.ts b/examples/react/todo/src/routes/api/config.ts index 2224720c2..c4ae48cc1 100644 --- a/examples/react/todo/src/routes/api/config.ts +++ b/examples/react/todo/src/routes/api/config.ts @@ -1,8 +1,8 @@ -import { createFileRoute } from "@tanstack/react-router" -import { json } from "@tanstack/react-start" -import { sql } from "../../db/postgres" -import { validateInsertConfig } from "../../db/validation" -import type { Txid } from "@tanstack/electric-db-collection" +import { createFileRoute } from '@tanstack/react-router' +import { json } from '@tanstack/react-start' +import { sql } from '../../db/postgres' +import { validateInsertConfig } from '../../db/validation' +import type { Txid } from '@tanstack/electric-db-collection' // Generate a transaction ID async function generateTxId(tx: any): Promise { @@ -30,7 +30,7 @@ export const Route = createFileRoute(`/api/config`)({ error: `Failed to fetch config`, details: error instanceof Error ? error.message : String(error), }, - { status: 500 } + { status: 500 }, ) } }, @@ -59,7 +59,7 @@ export const Route = createFileRoute(`/api/config`)({ error: `Failed to create config`, details: error instanceof Error ? error.message : String(error), }, - { status: 500 } + { status: 500 }, ) } }, diff --git a/examples/react/todo/src/routes/api/todos.$id.ts b/examples/react/todo/src/routes/api/todos.$id.ts index 12b4cf9e2..5f57126cd 100644 --- a/examples/react/todo/src/routes/api/todos.$id.ts +++ b/examples/react/todo/src/routes/api/todos.$id.ts @@ -1,8 +1,8 @@ -import { createFileRoute } from "@tanstack/react-router" -import { json } from "@tanstack/react-start" -import { sql } from "../../db/postgres" -import { validateUpdateTodo } from "../../db/validation" -import type { Txid } from "@tanstack/electric-db-collection" +import { createFileRoute } from '@tanstack/react-router' +import { json } from '@tanstack/react-start' +import { sql } from '../../db/postgres' +import { validateUpdateTodo } from '../../db/validation' +import type { Txid } from '@tanstack/electric-db-collection' // Generate a transaction ID async function generateTxId(tx: any): Promise { @@ -36,7 +36,7 @@ export const Route = createFileRoute(`/api/todos/$id`)({ error: `Failed to fetch todo`, details: error instanceof Error ? error.message : String(error), }, - { status: 500 } + { status: 500 }, ) } }, @@ -76,7 +76,7 @@ export const Route = createFileRoute(`/api/todos/$id`)({ error: `Failed to update todo`, details: error instanceof Error ? error.message : String(error), }, - { status: 500 } + { status: 500 }, ) } }, @@ -111,7 +111,7 @@ export const Route = createFileRoute(`/api/todos/$id`)({ error: `Failed to delete todo`, details: error instanceof Error ? error.message : String(error), }, - { status: 500 } + { status: 500 }, ) } }, diff --git a/examples/react/todo/src/routes/api/todos.ts b/examples/react/todo/src/routes/api/todos.ts index 72b45f3e8..22fe77953 100644 --- a/examples/react/todo/src/routes/api/todos.ts +++ b/examples/react/todo/src/routes/api/todos.ts @@ -1,8 +1,8 @@ -import { createFileRoute } from "@tanstack/react-router" -import { json } from "@tanstack/react-start" -import { sql } from "../../db/postgres" -import { validateInsertTodo } from "../../db/validation" -import type { Txid } from "@tanstack/electric-db-collection" +import { createFileRoute } from '@tanstack/react-router' +import { json } from '@tanstack/react-start' +import { sql } from '../../db/postgres' +import { validateInsertTodo } from '../../db/validation' +import type { Txid } from '@tanstack/electric-db-collection' // Generate a transaction ID async function generateTxId(tx: any): Promise { @@ -34,7 +34,7 @@ export const Route = createFileRoute(`/api/todos`)({ error: `Failed to fetch todos`, details: error instanceof Error ? error.message : String(error), }, - { status: 500 } + { status: 500 }, ) } }, @@ -62,7 +62,7 @@ export const Route = createFileRoute(`/api/todos`)({ error: `Failed to create todo`, details: error instanceof Error ? error.message : String(error), }, - { status: 500 } + { status: 500 }, ) } }, diff --git a/examples/react/todo/src/routes/electric.tsx b/examples/react/todo/src/routes/electric.tsx index 461af9ecb..61629b81f 100644 --- a/examples/react/todo/src/routes/electric.tsx +++ b/examples/react/todo/src/routes/electric.tsx @@ -1,13 +1,13 @@ -import * as React from "react" -import { createFileRoute } from "@tanstack/react-router" -import { useLiveQuery } from "@tanstack/react-db" +import * as React from 'react' +import { createFileRoute } from '@tanstack/react-router' +import { useLiveQuery } from '@tanstack/react-db' import { electricConfigCollection, electricTodoCollection, -} from "../lib/collections" -import { TodoApp } from "../components/TodoApp" -import { api } from "../lib/api" -import type { Transaction } from "@tanstack/react-db" +} from '../lib/collections' +import { TodoApp } from '../components/TodoApp' +import { api } from '../lib/api' +import type { Transaction } from '@tanstack/react-db' export const Route = createFileRoute(`/electric`)({ component: ElectricPage, @@ -27,11 +27,11 @@ function ElectricPage() { const { data: todos } = useLiveQuery((q) => q .from({ todo: electricTodoCollection }) - .orderBy(({ todo }) => todo.created_at, `asc`) + .orderBy(({ todo }) => todo.created_at, `asc`), ) const { data: configData } = useLiveQuery((q) => - q.from({ config: electricConfigCollection }) + q.from({ config: electricConfigCollection }), ) // Electric collections use txid to track sync @@ -57,14 +57,14 @@ function ElectricPage() { } const response = await api.config.update( mutation.original.id, - mutation.changes + mutation.changes, ) txids.push(response.txid) } // Wait for all txids to sync back to the collection await Promise.all( - txids.map((txid) => electricConfigCollection.utils.awaitTxid(txid)) + txids.map((txid) => electricConfigCollection.utils.awaitTxid(txid)), ) } diff --git a/examples/react/todo/src/routes/index.tsx b/examples/react/todo/src/routes/index.tsx index 0986beb69..34e259689 100644 --- a/examples/react/todo/src/routes/index.tsx +++ b/examples/react/todo/src/routes/index.tsx @@ -1,5 +1,5 @@ -import * as React from "react" -import { Link, createFileRoute } from "@tanstack/react-router" +import * as React from 'react' +import { Link, createFileRoute } from '@tanstack/react-router' export const Route = createFileRoute(`/`)({ component: HomePage, diff --git a/examples/react/todo/src/routes/query.tsx b/examples/react/todo/src/routes/query.tsx index f6a620296..62c0ad37d 100644 --- a/examples/react/todo/src/routes/query.tsx +++ b/examples/react/todo/src/routes/query.tsx @@ -1,10 +1,10 @@ -import * as React from "react" -import { createFileRoute } from "@tanstack/react-router" -import { useLiveQuery } from "@tanstack/react-db" -import { queryConfigCollection, queryTodoCollection } from "../lib/collections" -import { TodoApp } from "../components/TodoApp" -import { api } from "../lib/api" -import type { Transaction } from "@tanstack/react-db" +import * as React from 'react' +import { createFileRoute } from '@tanstack/react-router' +import { useLiveQuery } from '@tanstack/react-db' +import { queryConfigCollection, queryTodoCollection } from '../lib/collections' +import { TodoApp } from '../components/TodoApp' +import { api } from '../lib/api' +import type { Transaction } from '@tanstack/react-db' export const Route = createFileRoute(`/query`)({ component: QueryPage, @@ -24,11 +24,11 @@ function QueryPage() { const { data: todos } = useLiveQuery((q) => q .from({ todo: queryTodoCollection }) - .orderBy(({ todo }) => todo.created_at, `asc`) + .orderBy(({ todo }) => todo.created_at, `asc`), ) const { data: configData } = useLiveQuery((q) => - q.from({ config: queryConfigCollection }) + q.from({ config: queryConfigCollection }), ) // Query collections automatically refetch after handler completes @@ -42,7 +42,7 @@ function QueryPage() { await Promise.all( inserts.map(async (mutation) => { await api.config.create(mutation.modified) - }) + }), ) // Handle updates @@ -53,7 +53,7 @@ function QueryPage() { throw new Error(`Original config not found for update`) } await api.config.update(mutation.original.id, mutation.changes) - }) + }), ) // Trigger refetch to get confirmed server state diff --git a/examples/react/todo/src/routes/trailbase.tsx b/examples/react/todo/src/routes/trailbase.tsx index 4c4370eba..96e05e11a 100644 --- a/examples/react/todo/src/routes/trailbase.tsx +++ b/examples/react/todo/src/routes/trailbase.tsx @@ -1,11 +1,11 @@ -import * as React from "react" -import { createFileRoute } from "@tanstack/react-router" -import { useLiveQuery } from "@tanstack/react-db" +import * as React from 'react' +import { createFileRoute } from '@tanstack/react-router' +import { useLiveQuery } from '@tanstack/react-db' import { trailBaseConfigCollection, trailBaseTodoCollection, -} from "../lib/collections" -import { TodoApp } from "../components/TodoApp" +} from '../lib/collections' +import { TodoApp } from '../components/TodoApp' export const Route = createFileRoute(`/trailbase`)({ component: TrailBasePage, @@ -25,11 +25,11 @@ function TrailBasePage() { const { data: todos } = useLiveQuery((q) => q .from({ todo: trailBaseTodoCollection }) - .orderBy(({ todo }) => todo.created_at, `asc`) + .orderBy(({ todo }) => todo.created_at, `asc`), ) const { data: configData } = useLiveQuery((q) => - q.from({ config: trailBaseConfigCollection }) + q.from({ config: trailBaseConfigCollection }), ) // Note: TrailBase collections use recordApi internally, which is not exposed diff --git a/examples/react/todo/src/server.ts b/examples/react/todo/src/server.ts index 1f8997f3e..130fbb5a9 100644 --- a/examples/react/todo/src/server.ts +++ b/examples/react/todo/src/server.ts @@ -1,4 +1,4 @@ -import handler from "@tanstack/react-start/server-entry" +import handler from '@tanstack/react-start/server-entry' export default { fetch(request: Request) { diff --git a/examples/react/todo/src/start.tsx b/examples/react/todo/src/start.tsx index de7b170ed..9e8694bab 100644 --- a/examples/react/todo/src/start.tsx +++ b/examples/react/todo/src/start.tsx @@ -1,4 +1,4 @@ -import { createStart } from "@tanstack/react-start" +import { createStart } from '@tanstack/react-start' export const startInstance = createStart(() => { return { diff --git a/examples/react/todo/src/styles.css b/examples/react/todo/src/styles.css index 80cb92ada..06f1bca4b 100644 --- a/examples/react/todo/src/styles.css +++ b/examples/react/todo/src/styles.css @@ -1,15 +1,15 @@ -@import "tailwindcss"; +@import 'tailwindcss'; body { @apply m-0; font-family: - -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", - "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; + -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', + 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } code { font-family: - source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace; + source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; } diff --git a/examples/react/todo/vite.config.ts b/examples/react/todo/vite.config.ts index ab0b541fd..3bf6a06e3 100644 --- a/examples/react/todo/vite.config.ts +++ b/examples/react/todo/vite.config.ts @@ -1,8 +1,8 @@ -import { defineConfig } from "vite" -import react from "@vitejs/plugin-react" -import tailwindcss from "@tailwindcss/vite" -import { tanstackStart } from "@tanstack/react-start/plugin/vite" -import viteTsConfigPaths from "vite-tsconfig-paths" +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' +import tailwindcss from '@tailwindcss/vite' +import { tanstackStart } from '@tanstack/react-start/plugin/vite' +import viteTsConfigPaths from 'vite-tsconfig-paths' // https://vitejs.dev/config/ export default defineConfig({ diff --git a/examples/solid/todo/docker-compose.yml b/examples/solid/todo/docker-compose.yml index 9b6ddcffe..cb03bb1b3 100644 --- a/examples/solid/todo/docker-compose.yml +++ b/examples/solid/todo/docker-compose.yml @@ -1,4 +1,4 @@ -version: "3.8" +version: '3.8' services: postgres: image: postgres:17-alpine @@ -7,7 +7,7 @@ services: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres ports: - - "54322:5432" + - '54322:5432' volumes: - ./postgres.conf:/etc/postgresql/postgresql.conf:ro tmpfs: @@ -18,7 +18,7 @@ services: - -c - config_file=/etc/postgresql/postgresql.conf healthcheck: - test: ["CMD-SHELL", "pg_isready -U postgres"] + test: ['CMD-SHELL', 'pg_isready -U postgres'] interval: 5s timeout: 5s retries: 5 @@ -37,11 +37,11 @@ services: trailbase: image: trailbase/trailbase:latest ports: - - "${PORT:-4000}:4000" + - '${PORT:-4000}:4000' restart: unless-stopped volumes: - ./traildepot:/app/traildepot - command: "/app/trail --data-dir /app/traildepot run --address 0.0.0.0:4000 --dev" + command: '/app/trail --data-dir /app/traildepot run --address 0.0.0.0:4000 --dev' volumes: postgres_data: diff --git a/examples/solid/todo/drizzle.config.ts b/examples/solid/todo/drizzle.config.ts index 550633431..486be88c9 100644 --- a/examples/solid/todo/drizzle.config.ts +++ b/examples/solid/todo/drizzle.config.ts @@ -1,4 +1,4 @@ -import type { Config } from "drizzle-kit" +import type { Config } from 'drizzle-kit' export default { schema: `./src/db/schema.ts`, diff --git a/examples/solid/todo/package.json b/examples/solid/todo/package.json index 7b0a7ffdc..9c2dd369b 100644 --- a/examples/solid/todo/package.json +++ b/examples/solid/todo/package.json @@ -3,17 +3,17 @@ "private": true, "version": "0.0.33", "dependencies": { - "@tanstack/electric-db-collection": "^0.2.10", - "@tanstack/query-core": "^5.90.11", - "@tanstack/query-db-collection": ">=0.0.0 <1.0.0", - "@tanstack/solid-db": "^0.1.52", - "@tanstack/solid-router": "^1.139.12", - "@tanstack/solid-start": "^1.139.12", - "@tanstack/trailbase-db-collection": "^0.1.53", + "@tanstack/electric-db-collection": "^0.2.12", + "@tanstack/query-core": "^5.90.12", + "@tanstack/query-db-collection": "^1.0.11", + "@tanstack/solid-db": "^0.1.54", + "@tanstack/solid-router": "^1.140.0", + "@tanstack/solid-start": "^1.140.0", + "@tanstack/trailbase-db-collection": "^0.1.55", "cors": "^2.8.5", - "drizzle-orm": "^0.44.7", + "drizzle-orm": "^0.45.0", "drizzle-zod": "^0.8.3", - "express": "^4.21.2", + "express": "^4.22.1", "postgres": "^3.4.7", "solid-js": "^1.9.10", "tailwindcss": "^4.1.17", @@ -25,19 +25,19 @@ "@tailwindcss/vite": "^4.1.17", "@types/cors": "^2.8.19", "@types/express": "^4.17.25", - "@types/node": "^22.18.1", + "@types/node": "^24.6.2", "@types/pg": "^8.15.6", - "@typescript-eslint/eslint-plugin": "^8.48.0", - "@typescript-eslint/parser": "^8.48.0", + "@typescript-eslint/eslint-plugin": "^8.48.1", + "@typescript-eslint/parser": "^8.48.1", "concurrently": "^9.2.1", - "dotenv": "^16.6.1", - "drizzle-kit": "^0.31.7", + "dotenv": "^17.2.3", + "drizzle-kit": "^0.31.8", "eslint": "^9.39.1", "eslint-plugin-solid": "^0.14.5", "pg": "^8.16.3", "tsx": "^4.21.0", "typescript": "^5.9.2", - "vite": "^7.1.7", + "vite": "^7.2.6", "vite-plugin-solid": "^2.11.10" }, "scripts": { diff --git a/examples/solid/todo/scripts/migrate.ts b/examples/solid/todo/scripts/migrate.ts index ee0089f38..d58ebc44e 100644 --- a/examples/solid/todo/scripts/migrate.ts +++ b/examples/solid/todo/scripts/migrate.ts @@ -1,7 +1,7 @@ -import { drizzle } from "drizzle-orm/node-postgres" -import { migrate } from "drizzle-orm/node-postgres/migrator" -import pkg from "pg" -import * as dotenv from "dotenv" +import { drizzle } from 'drizzle-orm/node-postgres' +import { migrate } from 'drizzle-orm/node-postgres/migrator' +import pkg from 'pg' +import * as dotenv from 'dotenv' dotenv.config() diff --git a/examples/solid/todo/src/api/server.ts b/examples/solid/todo/src/api/server.ts index 4aa55431d..948d2442e 100644 --- a/examples/solid/todo/src/api/server.ts +++ b/examples/solid/todo/src/api/server.ts @@ -1,14 +1,14 @@ -import express from "express" -import cors from "cors" -import { sql } from "../db/postgres" +import express from 'express' +import cors from 'cors' +import { sql } from '../db/postgres' import { validateInsertConfig, validateInsertTodo, validateUpdateConfig, validateUpdateTodo, -} from "../db/validation" -import type { Express } from "express" -import type { Txid } from "@tanstack/electric-db-collection" +} from '../db/validation' +import type { Express } from 'express' +import type { Txid } from '@tanstack/electric-db-collection' // Create Express app const app: Express = express() diff --git a/examples/solid/todo/src/components/NotFound.tsx b/examples/solid/todo/src/components/NotFound.tsx index 04619d4e8..3304c4195 100644 --- a/examples/solid/todo/src/components/NotFound.tsx +++ b/examples/solid/todo/src/components/NotFound.tsx @@ -1,4 +1,4 @@ -import { Link } from "@tanstack/solid-router" +import { Link } from '@tanstack/solid-router' export function NotFound() { return ( diff --git a/examples/solid/todo/src/components/TodoApp.tsx b/examples/solid/todo/src/components/TodoApp.tsx index 1e69d592c..c8cc0df58 100644 --- a/examples/solid/todo/src/components/TodoApp.tsx +++ b/examples/solid/todo/src/components/TodoApp.tsx @@ -1,8 +1,8 @@ -import { Link } from "@tanstack/solid-router" -import { For, Show, createSignal } from "solid-js" -import type { JSX } from "solid-js" -import type { Collection } from "@tanstack/solid-db" -import type { SelectConfig, SelectTodo } from "../db/validation" +import { Link } from '@tanstack/solid-router' +import { For, Show, createSignal } from 'solid-js' +import type { JSX } from 'solid-js' +import type { Collection } from '@tanstack/solid-db' +import type { SelectConfig, SelectTodo } from '../db/validation' interface TodoAppProps { todos: Array @@ -121,7 +121,7 @@ export function TodoApp(props: TodoAppProps) { return (
    @@ -193,9 +193,9 @@ export function TodoApp(props: TodoAppProps) { todosToToggle.map((todo) => todo.id), (drafts) => { drafts.forEach( - (draft) => (draft.completed = !allCompleted) + (draft) => (draft.completed = !allCompleted), ) - } + }, ) }} > @@ -262,7 +262,7 @@ export function TodoApp(props: TodoAppProps) {