Methods
-
getMongo( [ data ] ) → {object}
-
Description
Returns rules as a MongoDB query
Parameters
Name Type Attributes Description data
object <optional> current rules by default
Returns
Fires
Throws
Details
-
getRulesFromMongo( query ) → {object}
-
Description
Converts a MongoDB query to rules
Parameters
Name Type Description query
object Returns
Fires
Throws
Details
-
setRulesFromMongo()
-
Description
Sets rules a from MongoDB query
Details
Events
-
changer:getMongoDBField
-
Description
Modifies the MongoDB field used by a rule
Parameters
Name Type Description field
string rule
Rule Returns
Details
-
changer:getMongoDBFieldID
-
Description
Returns a filter identifier from the MongoDB field
Parameters
Name Type Description field
string value
* Returns
Details
-
changer:groupToMongo
-
Description
Modifies the MongoDB expression generated for a group
Parameters
Name Type Description expression
object group
Group Returns
Details
-
changer:mongoToGroup
-
Description
Modifies the group generated from the MongoDB expression
Parameters
Name Type Description group
object expression
object Returns
Details
-
changer:mongoToRule
-
Description
Modifies the rule generated from the MongoDB expression
Parameters
Name Type Description rule
object expression
object Returns
Details
-
changer:parseMongoNode
-
Description
Custom parsing of a MongoDB expression, you can return a sub-part of the expression, or a well formed group or rule JSON
Parameters
Name Type Description expression
object Returns
Details
-
changer:ruleToMongo
-
Description
Modifies the MongoDB expression generated for a rul
Parameters
Name Type Description expression
object rule
Rule value
* valueWrapper
function function that takes the value and adds the operator
Returns
Details