Type alias GenerateQueryOptions<T>

GenerateQueryOptions<T>: {
    data?: Partial<T>;
    limit?: number;
    offset?: number;
    orderBy?: OrderBy<T> | OrderBy<T>[];
    upsertOnlyUpdateData?: Partial<T>;
    where?: Partial<T>;
}

Type Parameters

  • T extends object

    The type of the object to query. This is generally not needed to be specified, but can be useful if you're calling this yourself instead of through a Model.

Type declaration

  • Optional data?: Partial<T>
  • Optional limit?: number
  • Optional offset?: number
  • Optional orderBy?: OrderBy<T> | OrderBy<T>[]
  • Optional upsertOnlyUpdateData?: Partial<T>
  • Optional where?: Partial<T>

Param

where - The where clause for the query. This is an object with the column names as keys and the values as values.

limit - The limit for the query. This is the maximum number of rows to return.

offset - The offset for the query. This is the number of rows to skip before returning.

orderBy - The order by clause for the query. See OrderBy for more information.

data - The data to insert, or update with. This is an object with the column names as keys and the values as values. In the case of Upsert, upsertOnlyUpdateData is also required, and that will be the data to update with, if an ON CONFLICT clause is matched.

upsertOnlyUpdateData - The data to update with, if an ON CONFLICT clause is matched. This is an object with the column names as keys and the values as values.

Generated using TypeDoc