Rex's plugins for Construct2
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About

rex_firebase_query

Plugin, ACE table, Discussion thread
Dependence: rex_firebase_apiV3

Introduction
Query in firebase.

Usage
Sample capx - database of this sample (read only)

Concept
A Query sorts and filters the data at a Firebase location so only a subset of the child data is included.

Follow these steps to create a query -
Step 0. Create query
Call "
Action:Create" to create a new query.
Step 1. Order current query (option)
There are three kind of methods to order the data of current query -
  • Action:Order by key
  • Action;Order by value
  • Action:Order by child. Add child name at parameter
  • Action:Order by priority
Each query only could have one order method. Default is order by key if not any priority is set, else is order by priority.
Step 2. Pick in a range (option)
Pick children which start from and/or end to a specific key -
  • Action:Start at
  • Action:End at
  • Action:In range
  • Action:Equal to
Step 3. Limit picking count (option)
Add one of these actions to limit picking count of current query
  • Action:Limit to first
  • Action:Limit to last
Picking all if no limit is set.

Step 4. add callback
Now the current query had be configured.
Call "
Action:Add callback" or "Action:Add callback once" under category of "Query" in rex_firebase object. The first parameter of these actions is current rex_firebase_query object.
Current query would be released after added callback.

Create a free web site with Weebly
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About