Plugin : Item table
Author:Rex.Rainbow
- Items table indexed by (itemID, key), supports writing an item or reading items back.
Download
Properties
Class name
- Class name for storing leaderboard structure.
Lines
Primary keys
- Primary keys, separated by ","
Actions
Filter - 1. new
Action:1. New
- Create a new item filter.
Filter - 2. itemID
Action:2. itemID include
- Add an itemID including.
- ItemID ( string ) : Object ID of item.
Filter - 2. key
Action:2. all values
- Add all values for this key.
- Key ( string ) : The name of the key.
Action:2. value compare
- Add a value compared for this key.
- Key ( string ) : The name of the key.
- Conditions ( Combo ) : Condition type.
- Options : ["equal to","not equal to","greater than","less than","greater than or equal to","less than or equal to"]
- Value ( number or string ) : The value to comparsion, could be number or string.
Action:2. timestamp constraint
- Add a timestamp constraint into filter. They will be jointed by AND operation.
- When ( Combo ) : Before or after the timestamp.
- Options : ["Before","After"]
- Timestamp ( number ) : Timestamp in milliseconds.
- Include ( Combo ) : Include compared timestamp or excluded.
- Options : ["Excluded","Included"]
- Type ( Combo ) : Type of compared timestamp.
- Options : ["Created","Updated"]
Action:2. string value start with
- Add string start with for this key.
- Key ( string ) : The name of the key.
- Start ( string ) : Start with string.
Action:2. key exist
- Add existing for this key.
- Key ( string ) : The name of the key.
- Exist ( Combo ) : Key exists or not.
- Options : ["does not exist","exist"]
Action:2. boolean value compare
- Add a boolean value compared for this key.
- Key ( string ) : The name of the key.
- Compared value ( Combo ) : Compared value.
- Options : ["false","true"]
Action:2. value include
- Add a value including/not including of this key.
- Key ( string ) : The name of the key.
- Include ( Combo ) : Include or not.
- Options : ["does not include","include"]
- Value ( number or string ) : The value to set, could be number or string.
Filter - 3. order
Action:3. order
- Order items.
- Key ( string ) : The name of the key.
- Order ( Combo ) : Order of items.
- Options : ["Descending","Ascending"]
Filter - 4. fetching fields
Action:4. add all keys
- Add all keys into fetching fields.
Action:4. add a key
- Add a key into fetching fields.
- Key ( string ) : The name of the key.
Action:4. Get linked object
- Get linked object at this key.
- Key ( string ) : The name of the key.
Load
Action:Load in a range
- Load in a range.
- Start ( number ) : Start index, 0-based.
- Lines ( number ) : Count of lines
Load - all
Action:Load all queried items
Load - itemID
Action:Load by itemID
- Load item by itemID.
- ID ( string ) : ID of item.
Load - page
Action:Turn to page
- Turn to page.
- Index ( number ) : Page index, 0-based.
Action:Update current page
Action:Turn to next page
Action:Turn to previous page
Load - random
Action:Load random queried items
- Load random queried items.
- Count ( number ) : Count of picked item.
Primary keys
Action:Set primary keys
- Set primary keys.
- Keys ( string ) : Primary keys, separated by ","
Queried items count
Action:Get items count
- Get queried items count. Maximum of 160 requests per minute.
Remove
Action:Remove by itemID
- Remove item by itemID.
- ID ( string ) : ID of item.
Remove - queried items
Action:Remove queried items
Save
Action:Save
- Save prepared item into server.
Save - prepare item
Action:Set value
- Set value into current item.
- Key ( string ) : The name of the key.
- Value ( number or string ) : The value to set, could be number or string.
- Key type ( Combo ) : Key type.
- Options : ["","Primary "]
Action:Set boolean value
- Set boolean value into current item.
- Key ( string ) : The name of the key.
- Boolean ( Combo ) : Boolean value.
- Options : ["False","True"]
- Key type ( Combo ) : Key type.
- Options : ["","Primary "]
Action:Remove key
- Remove key of current item.
- Key ( string ) : The name of the key.
Action:Increase value
- Increase value at key into current item.
- Key ( string ) : The name of the key.
- Value ( number or string ) : The value to set, could be number or string.
Action:Link to object
- Link to object at key into current item.
- Key ( string ) : The name of the key.
- Class name ( string ) : Class name of linked object.
- Object ID ( string ) : Object ID of linked object.
Action:Set itemID
- Set itemID of current item.
- ID ( string ) : ID of item.
Save - save-all queue
Action:Add to queue
- Add current prepared item into save-all queue.
Action:Save all
Save prepare item - array
Action:Add item
- Add item at key of current item.
- Key ( string ) : The name of the key.
- Append mode ( Combo ) : Append mode.
- Options : ["Append","Add unique"]
- Value ( number or string ) : The value to set, could be number or string.
Action:Remove all items
- Remove all items at key of current item.
- Key ( string ) : The name of the key.
Expressions
Error
Expression:ErrorCode
Expression:ErrorMessage
Load
Expression:ItemsToJSON
- Get all read items in JSON string.
Load - for each
Expression:CurItemID
- Get the current itemID in a For Each loop.
Expression:CurItemContent
- Get current item content in JSON string in a For Each loop. Add 1st parameter to get value at the specific key. Add 2nd parameter for default value if this key is not existed.
Expression:CurSentAt
- Get the current sent unix timestamp (number of milliseconds since the epoch) in a For Each loop.
Load - for each - index
Expression:CurItemIndex
- Get the current item index in a For Each loop.
Expression:CurStartIndex
- Get start index in current received page.
Expression:LoopIndex
- Get loop index in current received page.
Load - index
Expression:Index2ItemID
- Get itemID by global index.
- Index ( number ) : Global index, 0-based.
Expression:Index2ItemContent
- Get item content in JSON string by global index. Add 2nd parameter to get value at the specific key. Add 3rd parameter for default value if this key is not existed.
- Index ( number ) : Global index, 0-based.
Expression:Index2SentAt
- Get sent unix timestamp (number of milliseconds since the epoch) by global index.
- Index ( number ) : Global index, 0-based.
Load by itemID
Expression:LastFetchedItemID
Expression:LastFetchedItemContent
- Get last fetched item content in JSON string. Add 1st parameter to get value at the specific key. Add 2nd parameter for default value if this key is not existed.
Expression:LastFetchedSentAt
- Get last fetched item's sent unix timestamp (number of milliseconds since the epoch).
Prepare item
Expression:PreparedItemContent
- Get prepared item content in JSON string. Add 1st parameter to get value at the specific key. Add 2nd parameter for default value if this key is not existed.
Queried items count
Expression:LastItemsCount
- Get last queried items count under "Condition: On get items count complete".
Received
Expression:ReceivedItemsCount
- Get received items count in current received page.
Remove
Expression:LastRemovedItemID
- Get last removed itemID under "Condition:On remove by itemID complete".
Save
Expression:LastSavedItemID
Conditions
Load
Condition:On receive items
- Triggered when receive items complete.
Condition:On receive items error
- Triggered when receive items error.
Condition:Last page
- Return true if current page is the last page.
Load - for each
Condition:For each itemID
- Repeat the event for each itemID of load result.
Condition:For each item in a range
- Repeat the event for each item in a range.
- Start ( number ) : Start from message index (0-based).
- End ( number ) : End to message index (0-based). This value should larger than Start.
Load - itemID
Condition:On load by itemID
- Triggered when load by itemID item complete.
Condition:On load by itemID error
- Triggered when load by itemID item error.
Queried items count
Condition:On get items count complete
- Triggered when get items count.
Condition:On get items count error
- Triggered when get items count error.
Remove by itemID
Condition:On remove by itemID complete
- Triggered when remove by itemID complete.
Condition:On remove by itemID error
- Triggered when remove by itemID error.
Remove by queried items
Condition:On remove queried items complete
- Triggered when remove complete.
Condition:On remove queried items error
- Triggered when remove error.
Save
Condition:On save complete
- Triggered when save current item complete.
Condition:On save error
- Triggered when save current item error.
Save all
Condition:On save all complete
- Triggered when save all items complete.
Condition:On save all error
- Triggered when save all items error.