(context: SourceClauseContext, type: string)
| 392 | |
| 393 | export 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 | |
| 412 | export class JoinConditionMustBeEqualityError extends QueryBuilderError { |
nothing calls this directly
no outgoing calls
no test coverage detected