Package | com.distriqt.extension.firebase.firestore |
Interface | public interface CollectionReference extends Query, flash.events.IEventDispatcher |
Method | Defined By | ||
---|---|---|---|
add(pojo:Object):CollectionReference
Adds a new document to this collection with the specified POJO as contents,
assigning it a document ID automatically. | CollectionReference | ||
addOnFailureListener(handler:Function):CollectionReference
Use this function to add a failure handler callback for the add() method. | CollectionReference | ||
![]() | addOnQueryFailureListener(handler:Function):Query
Use this function to add a failure handler callback for the query() method. | Query | |
![]() | addOnQuerySuccessHandler(handler:Function):Query
Use this function to add a success handler callback for the query() method. | Query | |
addOnSuccessListener(handler:Function):CollectionReference
Use this function to add a success handler callback for the add() method. | CollectionReference | ||
![]() | addSnapshotListener(listener:Function, metadataChanges:int):void
Starts listening to this query. | Query | |
document(documentPath:String = null):DocumentReference
Gets a DocumentReference instance that refers to the document at the specified
path within this collection. | CollectionReference | ||
![]() |
Creates and returns a new Query that ends at the provided fields relative to
the order of the query. | Query | |
![]() |
Creates and returns a new Query that ends at the provided document (inclusive). | Query | |
![]() |
Creates and returns a new Query that ends before the provided fields relative
to the order of the query. | Query | |
![]() |
Creates and returns a new Query that ends before the provided document (exclusive). | Query | |
getId():String
The ID of the collection
| CollectionReference | ||
Gets a DocumentReference to the document that contains this collection. | CollectionReference | ||
getPath():String
Gets the path of this collection (relative to the root of the database)
as a slash-separated string. | CollectionReference | ||
![]() |
Creates and returns a Query that's additionally limited to only return up to the
specified number of documents. | Query | |
![]() |
Creates and returns a new Query that's additionally sorted by the specified field. | Query | |
![]() |
Perform a query to retrieve the documents in this collection. | Query | |
![]() | removeSnapshotListener(listener:Function):void
Stops listening to this query. | Query | |
![]() | startAfter(... fieldValues):Query
Creates and returns a new Query that starts after the provided fields relative
to the order of the query. | Query | |
![]() |
Creates and returns a new Query that starts after the provided document (exclusive). | Query | |
![]() |
Creates and returns a new Query that starts at the provided fields relative
to the order of the query. | Query | |
![]() |
Creates and returns a new Query that starts at the provided document (inclusive). | Query | |
![]() |
Creates and returns a new Query with the additional filter. | Query | |
![]() | whereEqualTo(field:String, value:Object):Query
Creates and returns a new Query with the additional filter that documents
must contain the specified field and the value should be equal to the specified value. | Query | |
![]() | whereGreaterThan(field:String, value:Object):Query
Creates and returns a new Query with the additional filter that documents
must contain the specified field and the value should be greater than the
specified value. | Query | |
![]() | whereGreaterThanOrEqualTo(field:String, value:Object):Query
Creates and returns a new Query with the additional filter that documents
must contain the specified field and the value should be greater than or
equal to the specified value. | Query | |
![]() | whereLessThan(field:String, value:Object):Query
Creates and returns a new Query with the additional filter that documents
must contain the specified field and the value should be less than the
specified value. | Query | |
![]() | whereLessThanOrEqualTo(field:String, value:Object):Query
Creates and returns a new Query with the additional filter that documents
must contain the specified field and the value should be less than or equal
to the specified value. | Query |
Event | Summary | Defined By | ||
---|---|---|---|---|
CollectionReference | ||||
CollectionReference |
add | () | method |
public function add(pojo:Object):CollectionReference
Adds a new document to this collection with the specified POJO as contents, assigning it a document ID automatically.
Parameters
pojo:Object — The POJO that will be used to populate the contents of the document
|
CollectionReference |
addOnFailureListener | () | method |
public function addOnFailureListener(handler:Function):CollectionReference
Use this function to add a failure handler callback for the add()
method.
The handler function will be called if the add
call was unsuccessful and will contain the error message as the first parameter.
Parameters
handler:Function — The handler function called when an error occurs, should take one String parameter which will be the error message
|
CollectionReference — The CollectionReference instance for chaining calls
|
addOnSuccessListener | () | method |
public function addOnSuccessListener(handler:Function):CollectionReference
Use this function to add a success handler callback for the add()
method.
The handler function will be called if the add
call was successful and will contain the document reference created as the first parameter.
Parameters
handler:Function — The handler function called when an success occurs, should take one DocumentReference parameter
|
CollectionReference — The CollectionReference instance for chaining calls
|
document | () | method |
public function document(documentPath:String = null):DocumentReference
Gets a DocumentReference instance that refers to the document at the specified path within this collection.
If no path is provided (null
) this will return a DocumentReference
pointing to a new document with an auto-generated ID within this collection.
Parameters
documentPath:String (default = null ) — A slash-separated relative path to a document. If null a document with an automatically generated id will be returned.
|
DocumentReference — The _DocumentReference instance
|
getId | () | method |
public function getId():String
The ID of the collection
ReturnsString — The ID of the collection
|
getParent | () | method |
public function getParent():DocumentReference
Gets a DocumentReference to the document that contains this collection. Only subcollections are contained in a document. For root collections, returns null.
ReturnsDocumentReference — The parent DocumentReference or null if this is a root collection
|
getPath | () | method |
public function getPath():String
Gets the path of this collection (relative to the root of the database) as a slash-separated string.
ReturnsString — The path of this collection
|
add:error | Event |
com.distriqt.extension.firebase.firestore.events.CollectionReferenceEvent
com.distriqt.extension.firebase.firestore.events.CollectionReferenceEvent.ADD_ERROR
add:success | Event |
com.distriqt.extension.firebase.firestore.events.CollectionReferenceEvent
com.distriqt.extension.firebase.firestore.events.CollectionReferenceEvent.ADD_SUCCESS