Firebase Connection methods

The Firebase connection object represent a connection instance to a configured Firebase cloud database. The following methods are exposed by the connection object to interact with remote data.

Connect

Returns a virtual Firebase database instance that can be further used to manipulate remote data.

var connection = conversation.Connect( accountjson, projectid, databasename );

Create

This method will insert a new object in the specified collection. The collection must exist. The object can be expressed in standard notation like { a = "hello" }. Xenioo will translate it to the correct Firebase document format.

database.Create( collection, object );

Delete

Deletes a document with the specified Id from the specified collection.

database.Delete( collection, documentid );

Update

Updates a document with a specific Id with the new object instance. The remote object will be completely replaced by the new instance. Remote object properties that are not in the current object instance will be removed by the update.

database.Update( collection, documentid, object );

List

This method will return a list of all the objects that are currently stored in the specified collection.

var arrlist = database.List( collection );

Get

This method will return a single object instance from the database corresponding to the id specified in documentid.

var obj = database.Get( collection, documentid );

Last updated