Return the schema for the query.
This functionality is experimental.
Parameters: | query (str) – The query string for which to extract the schema |
---|---|
Return type: | splparser.schema.Schema |
Return the template for the query.
Parameters: | query (str) – The query string for which to extract the template |
---|---|
Return type: | splparser.parsetree.ParseTreeNode |
Extract the list of commands from the query.
Parameters: | querystring (str) – The query to extract commands from |
---|---|
Return type: | list |
Parse the given query if possible.
This function is a small wrapper for splparser’s parse function that handles unicode issues and logs errors and returns None in the case of an error rather than raising an exception.
Parameters: | query (str) – The query to parse |
---|---|
Return type: | splparser.parsetree.ParseTreeNode |
Split the query into stages.
This takes a query string and returns a list of strings that represent the query stages. This is trickier than just calling split(‘|’) because the pipe character is a valid argument to commands if quoted.
Parameters: | query (str) – The query to split |
---|---|
Return type: | list |
Tokenize the given query if possible.
This function is a wrapper for splparser’s tokenizer that handles unicode issues and logs errors and returns None in the case of an error rather than raising an exception.
Parameters: | query (str) – The query to tokenize |
---|---|
Return type: | list |