Skip to content

Commit 604cd15

Browse files
authoredAug 17, 2023
Issue 48298: Align API Filter Operators (#61)
1 parent 4f2827e commit 604cd15

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed
 

‎CHANGE.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
LabKey Python Client API News
33
+++++++++++
44

5+
What's New in the LabKey 2.6.0 package
6+
==============================
7+
8+
*Release date: 08/17/2023*
9+
- Query API - add lineage-related filter types
10+
511
What's New in the LabKey 2.5.0 package
612
==============================
713

‎labkey/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
# limitations under the License.
1515
#
1616
__title__ = "labkey"
17-
__version__ = "2.5.1"
17+
__version__ = "2.6.0"
1818
__author__ = "LabKey"
1919
__license__ = "Apache License 2.0"

‎labkey/query.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ class Types:
7777
Enumeration of acceptable filter types
7878
"""
7979

80-
HAS_ANY_VALUE = ""
81-
80+
# These operators require a data value
8281
EQUAL = "eq"
8382
DATE_EQUAL = "dateeq"
8483

@@ -124,13 +123,28 @@ class Types:
124123
BETWEEN = "between"
125124
NOT_BETWEEN = "notbetween"
126125

126+
MEMBER_OF = "memberof"
127+
128+
# These are the "no data value" operators
129+
HAS_ANY_VALUE = ""
130+
127131
IS_BLANK = "isblank"
128132
IS_NOT_BLANK = "isnonblank"
129133

134+
HAS_MISSING_VALUE = "hasmvvalue"
135+
DOES_NOT_HAVE_MISSING_VALUE = "nomvvalue"
136+
137+
# Table/Query-wise operators
138+
Q = "q"
139+
140+
# Ontology operators
130141
ONTOLOGY_IN_SUBTREE = "concept:insubtree"
131142
ONTOLOGY_NOT_IN_SUBTREE = "concept:notinsubtree"
132143

133-
MEMBER_OF = "memberof"
144+
# Lineage operators
145+
EXP_CHILD_OF = "exp:childof"
146+
EXP_PARENT_OF = "exp:parentof"
147+
EXP_LINEAGE_OF = "exp:lineageof"
134148

135149
def __init__(self, column, value, filter_type=Types.EQUAL):
136150
self.column_name = column

0 commit comments

Comments
 (0)
Please sign in to comment.