Packagecom.myflashlab.air.extensions.firebase.firestore
Classpublic class Firestore
InheritanceFirestore Inheritance Object

Represents a Firestore Database and is the entry point for all Firestore operations



Public Properties
 PropertyDefined By
  firestoreSettings : FirestoreSettings
[static] [read-only] Returns the settings used by this FirebaseFirestore object.
Firestore
Public Methods
 MethodDefined By
  
[static] Creates a write batch, used for performing multiple writes as a single atomic operation.
Firestore
  
[static] Use this method to empty cache on query and document references.
Firestore
  
clearPersistence($callback:Function):void
[static] Clears the persistent storage, including pending writes and cached documents.
Firestore
  
collection($collectionPath:String):CollectionReference
[static] Gets a CollectionReference instance that refers to the collection at the specified path within the database.
Firestore
  
collectionGroup(collectionId:String):Query
[static] Creates and returns a new {
Firestore
  
[static] Created a new Transaction instance.
Firestore
  
disableNetwork($callback:Function):void
[static] Disables network access for this instance.
Firestore
  
document($documentPath:String):DocumentReference
[static] Gets a 'DocumentReference' instance that refers to the document at the specified path within the database.
Firestore
  
enableNetwork($callback:Function):void
[static] Re-enables network usage for this instance after a prior call to disableNetwork().
Firestore
  
init():void
[static] Call this method prior to any other Firestore methods.
Firestore
  
setServerTimestampBehavior($behavior:int):void
[static]
Firestore
Public Constants
 ConstantDefined By
  EXTENSION_ID : String = com.myflashlab.air.extensions.firebase.firestore
[static]
Firestore
  VERSION : String = 9.9.0
[static]
Firestore
Property Detail
firestoreSettingsproperty
firestoreSettings:FirestoreSettings  [read-only]

Returns the settings used by this FirebaseFirestore object.


Implementation
    public static function get firestoreSettings():FirestoreSettings
Method Detail
batch()method
public static function batch():WriteBatch

Creates a write batch, used for performing multiple writes as a single atomic operation.

Returns
WriteBatch — The created WriteBatch object.
cleanAllReferences()method 
public static function cleanAllReferences():void

Use this method to empty cache on query and document references. You must do this only when you do not have any listeners watching documents, collections or queries. After calling this method, you need to create new instances of collections, documents or queries and make sure you are no longer using the old instance.

clearPersistence()method 
public static function clearPersistence($callback:Function):void

Clears the persistent storage, including pending writes and cached documents.

Parameters

$callback:Function — Expects one param $error:Error

collection()method 
public static function collection($collectionPath:String):CollectionReference

Gets a CollectionReference instance that refers to the collection at the specified path within the database.

Parameters

$collectionPath:String — A slash-separated path to a collection.

Returns
CollectionReference — The CollectionReference instance.
collectionGroup()method 
public static function collectionGroup(collectionId:String):Query

Creates and returns a new {

Parameters

collectionId:String — Identifies the collections to query over. Every collection or subcollection with this ID as the last segment of its path will be included. Cannot contain a slash.

Returns
Query — The created Query.
createTransaction()method 
public static function createTransaction():Transaction

Created a new Transaction instance. To start the transaction, you must call execute() method on the returned Transaction instance.

Returns
Transaction — the newly created Transaction instance. If it returns null, it means that an older transaction is already in process. Every transaction must be finished by calling abort or keep

See also

disableNetwork()method 
public static function disableNetwork($callback:Function):void

Disables network access for this instance. While the network is disabled, any snapshot listeners or get() calls will return results from cache, and any write operations will be queued until network usage is re-enabled via a call to enableNetwork().

Parameters

$callback:Function — Expects one param $error:Error

document()method 
public static function document($documentPath:String):DocumentReference

Gets a 'DocumentReference' instance that refers to the document at the specified path within the database.

Parameters

$documentPath:String — A slash-separated path to a document.

Returns
DocumentReference — The DocumentReference instance.
enableNetwork()method 
public static function enableNetwork($callback:Function):void

Re-enables network usage for this instance after a prior call to disableNetwork().

Parameters

$callback:Function — Expects one param $error:Error

init()method 
public static function init():void

Call this method prior to any other Firestore methods.

setServerTimestampBehavior()method 
public static function setServerTimestampBehavior($behavior:int):void

Parameters

$behavior:int

Constant Detail
EXTENSION_IDConstant
public static const EXTENSION_ID:String = com.myflashlab.air.extensions.firebase.firestore

VERSIONConstant 
public static const VERSION:String = 9.9.0