Package | com.tuarua.firebase.firestore |
Class | public class Query |
Inheritance | Query ![]() |
Subclasses | CollectionReference |
Method | Defined By | ||
---|---|---|---|
Query() | Query | ||
Creates a new query where the results end at the provided document (inclusive). | Query | ||
Creates a new query where the results end before the provided document (exclusive). | Query | ||
getDocuments(listener:Function):void
Executes the query and returns the results as a QuerySnapshot
| Query | ||
Creates a new query where the results are limited to the specified number of documents. | Query | ||
map(to:Class):void
Converts the Document into an as3 Class with properties mapped to the Document's fields. | Query | ||
Creates a new query where the results are sorted by the specified field, in descending or ascending order. | Query | ||
startAfter(... args):Query
Creates a new query where the results start after the provided document (exclusive). | Query | ||
Creates a new query where the results start at the provided document (inclusive). | Query | ||
Creates a new query that returns only documents that include the specified fields and where
the values satisfy the constraints provided. | Query |
Query | () | Constructor |
public function Query()
endAt | () | method |
public function endAt(... args):Query
Creates a new query where the results end at the provided document (inclusive). The end position is relative to the order of the query. The document must contain all of the fields provided in the orderBy of this query.
Parameters
... args |
Query |
endBefore | () | method |
public function endBefore(... args):Query
Creates a new query where the results end before the provided document (exclusive). The end position is relative to the order of the query. The document must contain all of the fields provided in the orderBy of this query.
Parameters
... args |
Query |
getDocuments | () | method |
public function getDocuments(listener:Function):void
Executes the query and returns the results as a QuerySnapshot
Parameters
listener:Function — Optional Function to be called on completion.
The function is expected to have the following signature:
function callback(snapshot:QuerySnapshot, error:FirestoreError):void { } |
limit | () | method |
public function limit(to:int):Query
Creates a new query where the results are limited to the specified number of documents.
Parameters
to:int — The maximum number of items to return.
|
Query |
map | () | method |
public function map(to:Class):void
Converts the Document into an as3 Class with properties mapped to the Document's fields.
Parameters
to:Class — AS3 class to map to
|
order | () | method |
public function order(by:String, descending:Boolean = false):Query
Creates a new query where the results are sorted by the specified field, in descending or ascending order.
Parameters
by:String — The field to sort by.
| |
descending:Boolean (default = false ) — direction to sort by
|
Query |
startAfter | () | method |
public function startAfter(... args):Query
Creates a new query where the results start after the provided document (exclusive). The starting position is relative to the order of the query. The document must contain all of the fields provided in the orderBy of this query.
Parameters
... args |
Query |
startAt | () | method |
public function startAt(... args):Query
Creates a new query where the results start at the provided document (inclusive). The starting position is relative to the order of the query. The document must contain all of the fields provided in the orderBy of the query.
Parameters
... args |
Query |
where | () | method |
public function where(fieldPath:String, operator:String, value:*):Query
Creates a new query that returns only documents that include the specified fields and where the values satisfy the constraints provided.
Parameters
fieldPath:String — The path to compare.
| |
operator:String — The operation string (e.g "<", "<=", "==", ">", ">=").
| |
value:* — The value for comparison.
|
Query |