Plugin : Item table

Author:Rex.Rainbow

Download

Properties

Domain

  • The root location of the Firebase data.

Sub domain

  • Sub domain for this function.

Actions

Domain

Action:Set domain

  • Set domain ref.
    • Domain ( string ) : The root location of the Firebase data.
    • Sub domain ( string ) : Sub domain for this function.

ItemID

Action:Generate

  • Generate a new itemID. Get it by "Expression:LastGeneratedKey". Or use "Expression:GenerateKey" directly.

Load

Action:Add itemID

  • Add load-request itemID.
    • ID ( string ) : ID of item.

Action:Load

  • Load items.
    • Tag ( string ) : A tag, to distinguish between different save requests.

Action:Load all

  • Load all items.
    • Tag ( string ) : A tag, to distinguish between different save requests.

On disconnected

Action:Cancel disconnected handler

  • Cancel all disconnected handlers.

Action:Auto remove

  • Auto remov item when disconnected.
    • ID ( string ) : ID of item.

Prepare

Action:Set value

  • Set value into current item.
    • Key ( number or string ) : The name of the key.
    • Value ( number or string ) : The value to set, could be number or (JSON) string.

Action:Set boolean value

  • Set boolean value into current item.
    • Key ( number or string ) : The name of the key.
    • Boolean ( Combo ) : Boolean value.
      • Options : ["False","True"]

Action:Remove key

  • Remove key in firebase server.
    • Key ( number or string ) : The name of the key.

Action:Set to timestamp

  • Set server timestamp value into current item.
    • Key ( number or string ) : The name of the key.

Prepare - position

Action:Set to position

  • Set position value into current item.
    • X ( number ) : The X position.
    • Y ( number ) : The Y position.

Remove

Action:Remove

  • Remove item from server.
    • ID ( string ) : ID of item.
    • Tag ( string ) : A tag, to distinguish between different save requests.

Action:Remove all

  • Remove all items.

Save

Action:Save

  • Save current item into server. Push item if ID is equal to "".
    • ID ( string ) : ID of item.
    • Set mode ( Combo ) : Update, or clean then set item values
      • Options : ["Update","Set"]
    • Tag ( string ) : A tag, to distinguish between different save requests.

Action:Push

  • Push current item into server. Get itemID by "expression:LastItemID".
    • Tag ( string ) : A tag, to distinguish between different save requests.

Expressions

For Each

Expression:CurItemID

  • Get current itemID in a For Each loop, in last load result. Or in save/remove callback.

Expression:CurKey

  • Get current key in a For Each loop, in last load result.

Expression:CurValue

  • Get current value in a For Each loop, in last load result.

Expression:CurItemContent

  • Get current content in JSON stringin in a For Each loop, in last load result. Add 2nd parameter for specific key, 3rd parameter for default value if this key is not existed.

ItemID

Expression:LastItemID

  • Get last itemID.

Expression:GenerateKey

  • Generate new key from push action.

Expression:LastGeneratedKey

  • Get last generate a key from push action.

Load item

Expression:ItemsCount

  • Get loaded items count.

Load items

Expression:LoadResultToJSON

  • Get load reslt in JSON string.

Reference

Expression:Ref

  • Get renerence in table, optional parameters are (itemID, key).

Table

Expression:At

  • Get value by itemId and key in last load result. Add 3rd parameter for default value if this key is not existed.
    • ID ( string ) : ID of item.
    • Key ( number or string ) : The name of the key.

Conditions

Load

Condition:On load complete

  • Triggered when load current item complete.
    • Tag ( string ) : A tag, to distinguish between different save requests.

Condition:For each itemID

  • Repeat the event for each itemID of load result.
    • Order ( Combo ) : Order of itemID.
      • Options : ["Small to large","Large to small"]

Condition:For each key

  • Repeat the event for each key of a item of load result.
    • ID ( string ) : ID of item.

Remove

Condition:On remove complete

  • Triggered when remove current item complete.
    • Tag ( string ) : A tag, to distinguish between different save requests.

Condition:On remove error

  • Triggered when remove current item error.
    • Tag ( string ) : A tag, to distinguish between different save requests.

Condition:On remove all complete

  • Triggered when remove all items complete.

Condition:On remove all error

  • Triggered when remove all items error.

Save

Condition:On save complete

  • Triggered when save current item complete.
    • Tag ( string ) : A tag, to distinguish between different save requests.

Condition:On save error

  • Triggered when save current item error.
    • Tag ( string ) : A tag, to distinguish between different save requests.