You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
Its a nice to have feature, and should be implemented in following pattern later in some time.
/**
* Parse provided filters and generate valid SQL
*
* @param {string|Object|Array.<Object>} filters
* @param {Object} options
* @param {string} options.filterPrefix
* @return {string}
*
* @description
*
* * Filters can be provided as strings or object or array of objects and strings
* * Object type filters will always be combined with *AND* combinator
* * Array type filters will always be combined with *OR* combinator
* * String values type (AND, OR) can be added as array elements to and used a combinator
*
* @example
* Filters can provided in following format to generate these conditions
*
* {a: 1, b: 2} -> (a = 1 AND b = 2)
* [{a: 1, b: 2}, {c: 3}] -> (a = 1 AND b = 2) OR (c = 3)
* [[{a: 1}, {b: 2}], {c: 3}] -> (a = 1 OR b = 2) OR (c = 3)
* [[{a: 1}, {b: 2}], 'AND', {c: 3}] -> (a = 1 OR b = 2) AND (c = 3)
*/
Currently the filters generation support the following syntax.
We need to support following syntax as well:
or mix of both
The text was updated successfully, but these errors were encountered: