DbQueryOr - do-/node-doix-db GitHub Wiki

DbQueryOr is a class representing SQL search condition:

<boolean term> [OR <boolean term> OR <boolean term> OR...]


Name Type Description
filters Array list of {sql, params} objects, such as DbQueryTableColumnComparison instances
sql String The SQL fragment to be interpolated in the query: all filters' sql concatenated with OR
params Array The list of parameters corresponding to all ? placeholders in sql: all filters' params merged together

Static methods


For a given filters list, removes all null entries from it and then:

  • if not one entry is left, returns null;
  • if a single filter is left, returns it;
  • otherwise, constructs and returns the corresponding DbQueryOr instance.