Skip to content

Commit

Permalink
Issue 48298: Align API Filter Operators (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
RosalineP authored Aug 17, 2023
1 parent 4f2827e commit 604cd15
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
LabKey Python Client API News
+++++++++++

What's New in the LabKey 2.6.0 package
==============================

*Release date: 08/17/2023*
- Query API - add lineage-related filter types

What's New in the LabKey 2.5.0 package
==============================

Expand Down
2 changes: 1 addition & 1 deletion labkey/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
# limitations under the License.
#
__title__ = "labkey"
__version__ = "2.5.1"
__version__ = "2.6.0"
__author__ = "LabKey"
__license__ = "Apache License 2.0"
20 changes: 17 additions & 3 deletions labkey/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ class Types:
Enumeration of acceptable filter types
"""

HAS_ANY_VALUE = ""

# These operators require a data value
EQUAL = "eq"
DATE_EQUAL = "dateeq"

Expand Down Expand Up @@ -124,13 +123,28 @@ class Types:
BETWEEN = "between"
NOT_BETWEEN = "notbetween"

MEMBER_OF = "memberof"

# These are the "no data value" operators
HAS_ANY_VALUE = ""

IS_BLANK = "isblank"
IS_NOT_BLANK = "isnonblank"

HAS_MISSING_VALUE = "hasmvvalue"
DOES_NOT_HAVE_MISSING_VALUE = "nomvvalue"

# Table/Query-wise operators
Q = "q"

# Ontology operators
ONTOLOGY_IN_SUBTREE = "concept:insubtree"
ONTOLOGY_NOT_IN_SUBTREE = "concept:notinsubtree"

MEMBER_OF = "memberof"
# Lineage operators
EXP_CHILD_OF = "exp:childof"
EXP_PARENT_OF = "exp:parentof"
EXP_LINEAGE_OF = "exp:lineageof"

def __init__(self, column, value, filter_type=Types.EQUAL):
self.column_name = column
Expand Down

0 comments on commit 604cd15

Please sign in to comment.