Skip to content

Releases: TanStack/db

@tanstack/[email protected]

17 Jan 04:19
cdc33da

Choose a tag to compare

Patch Changes

  • Fix type of findOne queries in Vue such that they type to a singular result instead of an array of results. (#1134)

@tanstack/[email protected]

17 Jan 04:19
cdc33da

Choose a tag to compare

Patch Changes

  • Fix refetch such that it returns the query observer results instead of undefined. (#1132)

@tanstack/[email protected]

17 Jan 04:19
cdc33da

Choose a tag to compare

Patch Changes

  • Fix empty string values being incorrectly omitted from SQL query params. Queries like eq(column, '') now correctly include the empty string parameter instead of producing a malformed query with a missing $1 value. (#1146)

@tanstack/[email protected]

14 Jan 00:46
44b45f6

Choose a tag to compare

Patch Changes

@tanstack/[email protected]

14 Jan 00:46
44b45f6

Choose a tag to compare

Patch Changes

@tanstack/[email protected]

14 Jan 00:46
44b45f6

Choose a tag to compare

Patch Changes

@tanstack/[email protected]

14 Jan 00:46
44b45f6

Choose a tag to compare

Minor Changes

  • Update solid-db to enable suspense support. (#826)
    You can now run do

    // Use Suspense boundaries
    const todosQuery = useLiveQuery((q) => q.from({ todos: todoCollection }))
    
    return (
      <>
        {/* Status and other getters don't trigger Suspense */}
        <div>Status {todosQuery.status}</div>
        <div>Loading {todosQuery.isLoading ? 'yes' : 'no'}</div>
    
        <Suspense fallback={<div>Loading...</div>}>
          <For each={todosQuery()}>
            {(todo) => <li key={todo.id}>{todo.text}</li>}
          </For>
        </Suspense>
      </>
    )

    All values returned from useLiveQuery are now getters, so no longer need to be called as functions. This is a breaking change. This is to match how createResource works, and everything still stays reactive.

    const todos = useLiveQuery(() => existingCollection)
    
    const handleToggle = (id) => {
      // Can now access collection directly
      todos.collection.update(id, (draft) => {
        draft.completed = !draft.completed
      })
    }
    
    return (
      <>
        {/* Status and other getters don't trigger Suspense */}
        <div>Status {todos.status}</div>
        <div>Loading {todos.isLoading ? 'yes' : 'no'}</div>
        <div>Ready {todos.isReady ? 'yes' : 'no'}</div>
        <div>Idle {todos.isIdle ? 'yes' : 'no'}</div>
        <div>Error {todos.isError ? 'yes' : 'no'}</div>
      </>
    )

Patch Changes

@tanstack/[email protected]

14 Jan 00:46
44b45f6

Choose a tag to compare

Patch Changes

@tanstack/[email protected]

14 Jan 00:46
44b45f6

Choose a tag to compare

Patch Changes

@tanstack/[email protected]

14 Jan 00:46
44b45f6

Choose a tag to compare

Patch Changes