Skip to content

Does anyone have a storing in the database example? #71

Answered by fenix-hub
Rysm asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Rysm ,
We will add something more detailed in the wiki for sure in the future.
Here's some snippets on how to use Firebase Database.

# Get a database reference, specifing the path. @some_filters can be an empty Dictionary {}
var database_reference : FirebaseDatabaseReference = Firebase.Database.get_database_reference("path/to/db/json", some_filters)

# Push a json to the database specified path, using a Dictionary
database_reference.push({'user_name':'username', 'message':'Hello world!'})

# Update a json to the database, knowing the resource name/path
database_reference.update(resource.key, {'message':new_data}) # @resource is a FirebaseResource returned from a signal

# Connect some…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@MeBadDev
Comment options

@fenix-hub
Comment options

Answer selected by BearDooks
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants