class Query
implements QueryRequestGenerator
Re-export
import { Query } from "https://deno.land/x/google_datastore@0.2.1/mod.ts";
A class which abstracts the native Google Datastore Query interface and provides a fluent interface for building a query.
Methods
filter(property: string, value: unknown): this
Filter the results where the supplied property equals the value.
To filter by ancestors see Query.hasAncestor
.
filter(): this
property: string,
op: Operator,
value: unknown,
Filter the results where the supplied property matches the operator.
The operators "="
, "<"
, ">"
, "<="
, and ">="
are supported. To
filter by ancestors see Query.hasAncestor
.
order(property: string, descending?: boolean): this
Sort the results by a property name in ascending or descending order.
By default, the results will be in ascending order. Set descending
to
true
to sort in descending order.
select(fieldNames: string | string[]): this
Retrieve only select properties from the matched entities.