Skip to content

Issue 48298: Align API Filter Operators #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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