mars

Firebase DB

 

Firebase DB

Firebase DB is an online, real-time database used to store and read data.

Example

Creating and saving a post information on Firebase Database.

example



Blocks

add key value

Add data to Firebase Database with key-value format.

add key value

TYPEEXPLANATIONREQUIRED
Firebase DatabaseFirebase Database ComponentYes
StringKey of the value you are trying to saveYes
MapMap of valuesYes

push value

Push data to Firebase Database with a generated unique random key.

push value

TYPEEXPLANATIONREQUIRED
Firebase DatabaseFirebase Database ComponentYes
MapMap of valuesYes

push getKey

Generate a unique random key.

get key

TYPEEXPLANATIONREQUIRED
Firebase DatabaseFirebase Database ComponentYes

delete key

Delete the data from the Databse with the given key.

delete key

TYPEEXPLANATIONREQUIRED
Firebase DatabaseFirebase Database ComponentYes
StringKey of the value you are trying to deleteYes

get children to then

Retrieve the value to List Map, then perform additional action.

get children to then

TYPEEXPLANATIONREQUIRED
Firebase DatabaseFirebase Database ComponentYes
List MapList Map variableYes

start listening

Start listening to changes in the database. The component starts listening by default. Only used after stopping the listener.

start listening

TYPEEXPLANATIONREQUIRED
Firebase DatabaseFirebase Database ComponentYes

stop listening

Stop listening to the changes in the database.

stop listening

TYPEEXPLANATIONREQUIRED
Firebase DatabaseFirebase Database ComponentYes

Events

onChildAdded

Triggered when a new child value is added.

onChildChnaged

Triggered when any value in children has changed.

onChildRemoved

Triggered when a child is removed from reference.

onCancelled

Triggered when any read or write action is cancelled.

Post a Comment

0 Comments