cycquery.ops.OrΒΆ

class Or(*cond_ops)[source]ΒΆ

Bases: QueryOp

Combine multiple condition query ops using an OR.

Parameters:

cond_ops (Union[QueryOp, List[QueryOp]]) – Condition Query ops to combine.

Examples

>>> Or(ConditionLike("lab_name", "HbA1c"), ConditionIn("name", ["John", "Jane"]))
>>> Or([ConditionLike("lab_name", "HbA1c"), ConditionIn("name", ["John", "Jane"])])

Methods

__call__(table, return_cond=False)[source]ΒΆ

Process the table.

Parameters:
  • table (Union[Select, Subquery, Table, DBTable]) – Table on which to perform the operation.

  • return_cond (bool) – Return the condition instead of filtering.

Returns:

Processed table.

Return type:

sqlalchemy.sql.selectable.Subquery