simdb.query module

class simdb.query.QueryType(value)[source]

Bases: Enum

SimDB query comparator options.

AGE = 11
AGT = 10
ALE = 13
ALT = 12
EQ = 2
EXIST = 14
GE = 7
GT = 6
IN = 4
LE = 9
LT = 8
NE = 3
NI = 5
NONE = 1
simdb.query.parse_query_arg(value: str) tuple[str, QueryType][source]

Parse the second half of a SimDB query argument and return the comparator type and value to be compared.

The strings being parsed will be of the form:

value comparator:value

If no comparator is given then QueryType.EQ is returned as a default.

Parameters:
value: str

The query string to parse.

Returns:

The extracted value and comparator.