Package | com.tuarua.firebase.firestore |
Class | public class CollectionReference |
Inheritance | CollectionReference ![]() ![]() |
Property | Defined By | ||
---|---|---|---|
id : String [read-only] | CollectionReference | ||
parent : DocumentReference [read-only]
For subcollections, parent returns the containing DocumentReference. | CollectionReference | ||
path : String [read-only] | CollectionReference |
Method | Defined 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 | ||
![]() |
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 |
id | property |
id:String
[read-only] public function get id():String
parent | property |
parent:DocumentReference
[read-only]
For subcollections, parent
returns the containing DocumentReference
. For root
collections, null is returned.
public function get parent():DocumentReference
path | property |
path:String
[read-only] public function get path():String
CollectionReference | () | Constructor |
public function CollectionReference(path:String)
Gets a CollectionReference
referring to the collection at the specified path within the
database.
path:String |
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 { } |
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 )
|
DocumentReference — A DocumentReference pointing to the document at the specified path or if documentPath is null a
new document with an auto-generated ID.
|