filterArg: Filter argument

View source: R/commonArguments.R

filterArgR Documentation

Filter argument

Description

Filter argument

Usage

filterArg(filter)

Arguments

filter

Filtering can be done on any* property of a supported type or nested property that the ExpressionExperiment class has ( and is mapped by hibernate ). E.g: 'curationDetails' or 'curationDetails.lastTroubledEvent.date' Currently supported types are:

  • String - property of String type, required value can be any String.

  • Number - any Number implementation. Required value must be a string parseable to the specific Number type.

  • Boolean - required value will be parsed to true only if the string matches 'true', ignoring case.

Accepted operator keywords are:

  • '=' - equality

  • '!=' - non-equality

  • '<' - smaller than

  • '=>' - larger or equal

  • 'like' similar string, effectively means 'contains', translates to the sql 'LIKE' operator (given value will be surrounded by

Multiple filters can be chained using 'AND' or 'OR' keywords.

Leave space between the keywords and the previous/next word!

E.g: ?filter=property1 < value1 AND property2 like value2

If chained filters are mixed conjunctions and disjunctions, the query must be in conjunctive normal form (CNF). Parentheses are not necessary - every AND keyword separates blocks of disjunctions. Example:

?filter=p1 = v1 OR p1 != v2 AND p2 <= v2 AND p3 > v3 OR p3 < v4

Above query will translate to:

(p1 = v1 OR p1 != v2) AND (p2 <= v2) AND (p3 > v3 OR p3 < v4;)

Breaking the CNF results in an error.

Filter "curationDetails.troubled" will be ignored if user is not an administrator.


oganm/gemmaAPI documentation built on July 23, 2022, 8:26 p.m.