Allows to export rules as a SQL WHERE statement as well as populating the builder from an SQL query.
Parameters Name Type Attributes Descriptionoptions
object <optional>
boolean_as_integer
boolean <optional>
true
to convert boolean values to integer in the SQL output
Convert a SQL query to rules
Returns Fires Throws DetailsReturns rules as a SQL query
Parameters Name Type Attributes Default Descriptionstmt
boolean | string <optional>
use prepared statements: false, 'question_mark', 'numbered', 'numbered(@)', 'named', 'named(@)'
nl
boolean <optional>
output with new lines
data
object <optional>
current rules by default
Returns Fires Throws DetailsSets the builder's rules from a SQL query
Detailssql
string params
object
Details
Modifies the SQL field used by a rule
Parameters Name Type Descriptionfield
string rule
Rule
Returns
Details
Returns a filter identifier from the SQL field
Parameters Name Type Descriptionfield
string value
*
Returns
Details
Modifies the SQL generated for a group
Parameters Name Type Descriptionexpression
string group
Group
Returns
Details
Custom parsing of an AST node generated by SQLParser, you can return a sub-part of the tree, or a well formed group or rule JSON
Parameters Name Type DescriptionAST
object
node
Returns DetailsModifies the SQL generated for a rule
Parameters Name Type Descriptionexpression
string rule
Rule value
* valueWrapper
function
function that takes the value and adds the operator
Returns DetailsGiven an existing group and an AST node, determines if a sub-group must be created
Parameters Name Type Descriptioncreate
boolean
true by default if the group condition is different
group
object AST
object current
int
group level
Returns DetailsModifies the group generated from the SQL expression (this is called before the group is filled with rules)
Parameters Name Type Descriptiongroup
object AST
object
Returns
Details
Modifies the rule generated from the SQL expression
Parameters Name Type Descriptionrule
object AST
object
Returns
Details
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4