Skip to content

pql_parser

PQLParser

Class for parsing PQL queries.

convert_filter_to_expressions cached staticmethod

convert_filter_to_expressions(client, data_model_id, query)

Converts given filter to its condition expressions.

Parameters:

  • client (Client) –

    Client to call pql language API.

  • data_model_id (str) –

    Data model to run query on.

  • query (str) –

    Query to convert to conditions.

Returns:

  • List[str]

    List of condition expressions.

extract_sub_query staticmethod

extract_sub_query(query, start, end)

Returns sub query from given start and end.

Parameters:

  • query (str) –

    Query string.

  • start (Position) –

    Start position of sub query.

  • end (Position) –

    End position of sub query.

Returns:

  • str

    Subquery defined by start and end.