Packagecom.tuarua.firebase.firestore
Classpublic class Query
InheritanceQuery Inheritance Object
Subclasses CollectionReference



Public Methods
 MethodDefined By
  
Query
  
endAt(... args):Query
Creates a new query where the results end at the provided document (inclusive).
Query
  
endBefore(... args):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
  
limit(to:int):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
  
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.
Query
  
startAfter(... args):Query
Creates a new query where the results start after the provided document (exclusive).
Query
  
startAt(... args):Query
Creates a new query where the results start at the provided document (inclusive).
Query
  
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.
Query
Constructor Detail
Query()Constructor
public function Query()



Method Detail
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

Returns
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

Returns
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.

Returns
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

Returns
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

Returns
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

Returns
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.

Returns
Query