Packagecom.tuarua.firebase.firestore
Classpublic class CollectionReference
InheritanceCollectionReference Inheritance Query Inheritance Object



Public Properties
 PropertyDefined By
  id : String
[read-only]
CollectionReference
  parent : DocumentReference
[read-only] For subcollections, parent returns the containing DocumentReference.
CollectionReference
  path : String
[read-only]
CollectionReference
Public Methods
 MethodDefined By
  
CollectionReference(path:String)
Gets a CollectionReference referring to the collection at the specified path within the database.
CollectionReference
  
addDocument(data:*, listener:Function = null):DocumentReference
Add a new document to this collection with the specified data, assigning it a document ID automatically.
CollectionReference
  
document(documentPath:String = null):DocumentReference
CollectionReference
 Inherited
endAt(... args):Query
Creates a new query where the results end at the provided document (inclusive).
Query
 Inherited
endBefore(... args):Query
Creates a new query where the results end before the provided document (exclusive).
Query
 Inherited
getDocuments(listener:Function):void
Executes the query and returns the results as a QuerySnapshot
Query
 Inherited
limit(to:int):Query
Creates a new query where the results are limited to the specified number of documents.
Query
 Inherited
map(to:Class):void
Converts the Document into an as3 Class with properties mapped to the Document's fields.
Query
 Inherited
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
 Inherited
startAfter(... args):Query
Creates a new query where the results start after the provided document (exclusive).
Query
 Inherited
startAt(... args):Query
Creates a new query where the results start at the provided document (inclusive).
Query
 Inherited
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
Property Detail
idproperty
id:String  [read-only]


Implementation
    public function get id():String
parentproperty 
parent:DocumentReference  [read-only]

For subcollections, parent returns the containing DocumentReference. For root collections, null is returned.


Implementation
    public function get parent():DocumentReference
pathproperty 
path:String  [read-only]


Implementation
    public function get path():String
Constructor Detail
CollectionReference()Constructor
public function CollectionReference(path:String)

Gets a CollectionReference referring to the collection at the specified path within the database.

Parameters
path:String
Method Detail
addDocument()method
public function addDocument(data:*, listener:Function = null):DocumentReference

Add a new document to this collection with the specified data, assigning it a document ID automatically.

Parameters

data:*
 
listener:Function (default = null) — Optional Function to be called on completion. The function is expected to have the following signature:
     function callback(path:String, error:FirestoreError):void {
     
     }
     

Returns
DocumentReference — A DocumentReference pointing to a new document with an auto-generated ID.
document()method 
public function document(documentPath:String = null):DocumentReference

Parameters

documentPath:String (default = null)

Returns
DocumentReference — A DocumentReference pointing to the document at the specified path or if documentPath is null a new document with an auto-generated ID.