odata_query.exceptions module

exception odata_query.exceptions.ArgumentCountException(function_name: str, exp_min_args: int, exp_max_args: int, given_args: int)[source]

Bases: FunctionCallException

Thrown when the parser encounters a function called with a wrong number of arguments.

exception odata_query.exceptions.ArgumentTypeException(function_name: Optional[str] = None, expected_type: Optional[str] = None, actual_type: Optional[str] = None)[source]

Bases: FunctionCallException

Thrown when a function is called with argument of the wrong type.

exception odata_query.exceptions.FunctionCallException[source]

Bases: ODataException

Base class for errors in function calls.

exception odata_query.exceptions.InvalidFieldException(field_name: str)[source]

Bases: ODataException

Thrown when a field mentioned in a query does not exist.

exception odata_query.exceptions.ODataException[source]

Bases: Exception

Base class for all exceptions in this library.

exception odata_query.exceptions.ODataSyntaxError[source]

Bases: ODataException

Base class for syntax errors.

exception odata_query.exceptions.ParsingException(token: Optional[Token], eof: bool = False)[source]

Bases: ODataSyntaxError

Thrown when the parser cannot parse the query.

exception odata_query.exceptions.TokenizingException(token: Token)[source]

Bases: ODataSyntaxError

Thrown when the lexer cannot tokenize the query.

exception odata_query.exceptions.TypeException(operation: str, value: str)[source]

Bases: ODataException

Thrown when doing an invalid operation on a value. E.g. 10 gt null or ~date()

exception odata_query.exceptions.UnknownFunctionException(function_name: str)[source]

Bases: FunctionCallException

Thrown when the parser encounters an undefined function call.

exception odata_query.exceptions.UnsupportedFunctionException(function_name: str)[source]

Bases: FunctionCallException

Thrown when a function is used that is not implemented yet.

exception odata_query.exceptions.ValueException(value: Any)[source]

Bases: ODataException

Thrown when a value has an invalid value, such as an invalid datetime.