rex_firebase_itembook

IntroductionItem tables to save and query items. Each value is indexed by (tableID, itemID, key).

Compare with rex_firebase_itemtable pluginThis plugin contains multiple tables and it can modify multiple items across these tables in an atomic write process. i.e. values will be changed at the same time.This plugin has querying function to pick items by a single condition.

Usage

Save itemsSample capxThere are two ways to build saved items, in enumeration or tree structure.

Tree structureAdd "Condition:Table node" to create a table node, then add "Condition:Item node" to create an item node. Then call these actions in "Prepare - Tree" category to add values.

Action:Set value

Action:Set boolean value

Action:Set server timesetamp

Action:Set JSON

Push itemGet a new itemID of "push" item by "Expression:GenerateKey", it will be saved in "Expression:LastGeneratedKey".

Set JSON by keySample capxKey string contains "." or "/" will be splitted into levels to create a JSON object above the root key. For example, set key "pos.x" to 10, will add {"x":10} at key "pos". And get 10 back by key "pos.x" directly in ""Expression:CurItemContent", or "Expression:At".User does not need to create or parse JSON by JSON plugin anymore.

Write to serverCall "Action:Update" to upload all items to firebase server. "Condition:On update complete" will be triggered while writing completed, otherwise "Condition:On update error" will be triggered.

Remove an itemCall "Action:Remove" to remove a item."Condition:On remove complete" will be triggered if save completed, otherwise "Condition:On remove error" will be triggered.

"Condition:On request complete" will be triggered while receiving items.

Table is emptyCheck if a table has no item by "Condition:Table is empty".

Retrieve itemsGet requested tableID by "Expression:LastTableID" under "Condition:On request complete".Then retrieve items in this table under "Condition:For each itemID" by "Expression:CurItemID", and "Expression:CurItemContent"."Expression:CurItemContent" has 3 types of output

Or add "Condition:Remove on disconnected" under a table node or an item node to remove a table or an item, or call "Action:Remove key" in "On disconnected - Tree" category to remove a key in an item.

Reference pathGet reference path by "Expression:Ref", it has 4 type of output.Expression:Ref : return the root of all tablesExpression:Ref( tableID ) : return the reference path of a tableExpression:Ref( tableID , itemID ) : return the reference path of an item.Expression:Ref( tableID , itemID , key ) : return the reference path of a key in an item.

Shuffle itemsSample capxSet a random string at a key to shuffle items after sorting by that key."Expression:RandomBase32( length )" can be used to get a random string, each character is picked from one of 32 character "0" - "9" , "a" - "z", excluded "a", "i", "l", "o".