class Query
implements QueryRequestGenerator
import { Query } from "https://deno.land/x/google_datastore@0.2.0/query.ts";
A class which abstracts the native Google Datastore Query interface and provides a fluent interface for building a query.
Constructors
new
Query(kind?: string | string[], partition?: PartitionId)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 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.