Plugin : Nedb

Author:Rex.Rainbow

Download

Properties

Database name

  • Database reference. Sets "" to be a private in-memory database.

Storage

  • Storage of this database.
    • Options : ["In memory","Disk"]

Unique index keys

  • Unique index keys, separated by ","

Index keys

  • Index keys to speed up querying, separated by ","

Actions

Filter - 1. new

Action:1. New

  • Create a new row filter.

Filter - 2. 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. 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 of this key.
    • Key ( string ) : The name of the key.
    • Value ( number or string ) : The value to set, could be number or string.

Filter - 3. order

Action:3. order

  • Order rows.
    • Key ( string ) : The name of the key.
    • Order ( Combo ) : Order of rows.
      • Options : ["descending","ascending"]

Index keys

Action:Set index keys

  • Set index keys.
    • Keys ( string ) : Unique index keys, separated by ","
    • Type ( Combo ) : Type of index keys.
      • Options : ["","Unique"]

Insert - CSV

Action:Insert CSV data

  • Insert data from CSV string.
    • CSV string ( string ) : The CSV string for inserting.
    • Eval ( Combo ) : Eval the string.
      • Options : ["No","Yes"]
    • Delimiter ( string ) : Delimiter for splitting rows.

Action:Define type

  • Define value type of a key.
    • Key ( string ) : The name of the key.
    • Type ( Combo ) : Type.
      • Options : ["string","number","any (eval)"]

Insert - JSON

Action:Insert JSON data

  • Insert data from JSON string.
    • JSON string ( string ) : The JSON string for inserting.

Load

Action:Load queried rows

  • Load queried rows.

Remove

Action:Remove all

  • Remove all rows.

Action:Remove queried rows

  • Remove queried rows.

Remove - row ID

Action:Remove by row ID

  • Remove row by row ID.
    • Row ID ( string ) : Row ID

Action:Remove by row index

  • Remove row by row index.
    • Index ( number ) : Index of queried rows.

Save

Action:Save

  • Save prepared item into server.

Action:Update queried rows

  • Update queried rows by prepared item.

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.
    • Condition ( Combo ) : Set value if new value is greater or less then old value.
      • Options : ["","if greater","if less"]

Action:Set boolean value

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

Action:Add to

  • Add value to key.
    • Key ( string ) : The name of the key.
    • Value ( number or string ) : The value to set, could be number or string.

Action:Set JSON

  • Set JSON value into current item.
    • Key ( string ) : The name of the key.
    • JSON ( string ) : The JSON value to set.

Save - row ID

Action:Set row ID

  • Set row ID.
    • Row ID ( string ) : Row ID

Action:Set row index

  • Convert index of queried rows to row ID for saving. Append row if row ID had not found.
    • Index ( number ) : Index of queried rows.

Save - save-all queue

Action:Add to queue

  • Add current prepared item into save-all queue.

Action:Save all

  • Save all rows in queue.

Expressions

Error

Expression:LastErrorMessage

  • Get last error message.

Key name

Expression:KeyRowID

  • Get key name of row ID.

Queried rows

Expression:QueriedRowsAsJSON

  • Get JSON string of queried rows.

Expression:QueriedRowsCount

  • Get current queried rows count.

Queried rows - For each row

Expression:CurRowContent

  • Get current row 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:CurRowIndex

  • Get index oif current row in a For Each loop.

Expression:CurRowID

  • Get current rowID in a For Each loop.

Queried rows - Index

Expression:Index2QueriedRowContent

  • Get queried rows content by index in JSON format. Add 2nd parameter to get value at the specific key. Add 3rd parameter for default value if this key is not existed.
    • Index ( number ) : Index of queried rows.

Expression:Index2QueriedRowID

  • Get rowID by Index of queried rows. Return "" if the specific row had not existed.
    • Index ( number ) : Index of queried rows.

Save

Expression:LastSavedRowID

  • Get last saved row ID.

Conditions

For each row

Condition:For each row

  • Repeat the event for each queried row.

Load

Condition:On load rows

  • Triggered when load rows complete.

Condition:On load rows error

  • Triggered when load rows error.

Remove

Condition:On remove rows

  • Triggered when remove complete.

Condition:On remove rows error

  • Triggered when remove error.

Save

Condition:On update

  • Triggered when update book complete.

Condition:On update error

  • Triggered when update book error.