API reference / @evolu/common / local-first / Query

Type Alias: Query<R>

type Query<R> = string & Brand<"Query"> & object;

Defined in: packages/common/src/local-first/Query.ts:38

A type-safe SQL query.

Example

const allTodos = evolu.createQuery((db) => db.selectFrom("todo").selectAll());
type AllTodosRow = typeof allTodos.Row;

Type Declaration

NameTypeDescriptionDefined in
RowRA shorthand for InferRow. ### Example const allTodos = evolu.createQuery((db) => db.selectFrom("todo").selectAll(), ); type AllTodosRow = typeof allTodos.Row;packages/common/src/local-first/Query.ts:52

Type Parameters

Type ParameterDefault type
R extends RowRow

Was this page helpful?