In-memory database for storing data.
Categories > Data structure > rex_taffydbIntroductionLinksDependenceUsageWriteInsert rows by CSVData typeInsert rows by JSONSave rowUpdate rowsRemoveRemove queried rowsReadRead all rowsRead by index keyQueryingBuild filterRead all queried rowsRetrieve queried rowsQueried result after database updatedDatabase referenceSave & loadDebug panel
None
Action:Insert CSV data
Property Eval mode
No : string
Action:Define type : define a column to be number type (Sample capx)Yes : parse value by eval function of javascrpt
10'hi'Math.random()For example,
AخAName,HP,MP'aaa',100,20'bbb',80,30will insert 2 rows.
Error message will display on console when eval failed.
Action:Insert JSON data
prepare row
Save data at a specific row, i.e. pick row then update it
Action:Set row ID, or Action:Set row index
Action:Set value , to set value of index key (Sample capx)
Index keys : a set of keys which the values are unique.
Index keys, or Action:Set index keys. ,, for example xxxxxxxxxxUID,VarNameOther keys
Action:Set value
if greater , if lessAction:Set boolean value
Action:Set JSON
Action:Add to
Action:Save
Expression:LastSavedRowID
Pick row by rowID
Else
Pick row by index keys
Update or append key of queried rows
Action:Update valueAction:Update boolean valueAction:Remove by row IDAction:Remove allAction:Remove queried rows, sample capxAction:Remove by row indexExpression:AllRowsAsJSON, all rows in JSON stringExpression:AllRowsCountExpression:At, pick row by index key, then get value
Expression:At( valueOfIndexKey0, valueOfIndexKey1, .... , dataKey )
pick row by (indexKey0 == valueOfIndexKey0) and (indexKey1 == valueOfIndexKey1)
Index keys, or Action:Set index keys. get value at dataKey
Expression:At( valueOfIndexKey0, valueOfIndexKey1, valueOfIndexKey2, .... , dataKey, defaultValue ), returns defaultValue if row or dataKey is not found.
For example, property Index keys is Name,
xxxxxxxxxxDB.At("aaa", "HP")to get row by Name is "aaa", then returns value of key "HP".
Create a new filter, or start from current filter (sample capx), if it does not create a new filter.
Action:1. New, orCondition:1. New Add conditions
Action:2. value compare, or Condition:2. value compareAction:2. boolean value compare, or Condition:2. boolean value compareAction:2. regex matched, or Condition:2. regex matchedsort
Action:3. order, or Condition:3. orderExpression:QueriedRowsAsJSON, all queried rows in JSON stringExpression:QueriedRowsCountExpression:QueriedSum( key )Expression:QueriedMin( key )Expression:QueriedMax( key )Condition:For each row
Expression:CurRowContent
Expression:CurRowContent, returns key-value pairs of current row in JSON stringExpression:CurRowContent( key ), returns the value of a specific key, or 0 if the key does not existExpression:CurRowContent( key, defaultValue ), returns the value of a specific key, or defaultValue if the key does not exist.Expression:CurRowIndex
Get queried row by index from 0 to Expression:QueriedRowsCount-1 (sample capx)
Expression:Index2QueriedRowContent( index ), returns key-value pairs of the specific row in JSON string
Expression:Index2QueriedRowContent( index, key ), returns the value of a specific key, or 0 if the key does not exist
Expression:Index2QueriedRowID( index ), returns rowID of the specific rowExpression:Index2QueriedRowContent( index, key, defaultValue ), returns the value of a specific key, or defaultValue if the key does not exist.
Sample capx Queried rows will be changed after database updated.
Property Database name
Empty string "" : private database, destroyed when instance had been destroyed
Not empty string : a global database indexed by this Database name property
It supports official saving & loading feature, queried result will also be saved.
All rows will be shown at debug panel in JSON format.