MCPcopy Create free account
hub / github.com/TanStack/db / constructor

Method constructor

packages/db/src/errors.ts:394–409  ·  view source on GitHub ↗
(context: SourceClauseContext, type: string)

Source from the content-addressed store, hash-verified

392
393export class InvalidSourceTypeError extends QueryBuilderError {
394 constructor(context: SourceClauseContext, type: string) {
395 const expected =
396 context === `unionAll clause`
397 ? `an object with one or more key-value pairs like { alias: collection }`
398 : `an object with a single key-value pair like { alias: collection }`
399 const example =
400 context === `unionAll clause`
401 ? `.unionAll({ todos: todosCollection, events: eventsCollection })`
402 : context === `join clause`
403 ? `.join({ todos: todosCollection }, ({ todo, todos }) => eq(todo.id, todos.id))`
404 : `.from({ todos: todosCollection })`
405 super(
406 `Invalid source for ${context}: Expected ${expected}. ` +
407 `For example: ${example}. Got: ${type}`,
408 )
409 }
410}
411
412export class JoinConditionMustBeEqualityError extends QueryBuilderError {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected