Skip to content

Issue 48298: Align API Filter Operators #60

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 10 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## version 5.3.0-SNAPSHOT
*Released*: TBD
* Update to Gradle 8.2.1 and adjust away from deprecated syntax
* Add Ontology and Lineage filter type operators

## version 5.2.0
*Released*: 3 May 2023
Expand Down
22 changes: 19 additions & 3 deletions src/org/labkey/remoteapi/query/Filter.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ public enum Operator
// WARNING: Keep in sync and in order with all other client apis and docs:
// - server: CompareType.java
// - java: Filter.java
// - js: Filter.js
// - js: Types.ts
// - R: makeFilter.R, makeFilter.Rd
// - Python & Perl don't have a filter operator enum
// - Python: query.py
// - Perl doesn't have a filter operator enum

//
// These operators require a data value
Expand Down Expand Up @@ -90,7 +91,22 @@ public enum Operator
//

Q("Search", "q", "Q", true),
WHERE("Where", "where", "WHERE", true)
WHERE("Where", "where", "WHERE", true),

//
// Ontology operators
//

ONTOLOGY_IN_SUBTREE("Is In Subtree", "concept:insubtree", "ONTOLOGY_IN_SUBTREE", true),
ONTOLOGY_NOT_IN_SUBTREE("Is Not In Subtree", "concept:notinsubtree", "ONTOLOGY_NOT_IN_SUBTREE", true),

//
// Lineage operators
//

EXP_CHILD_OF("Is Child Of", "exp:childof", "EXP_CHILD_OF", true),
EXP_PARENT_OF("Is Parent Of", "exp:parentof", "EXP_PARENT_OF", true),
EXP_LINEAGE_OF("In The Lineage Of", "exp:lineageof", "EXP_LINEAGE_OF", true)
;

private static final Map<String, Operator> _programmaticNameToOperator = Arrays.stream(Operator.values())
Expand Down