return_object_IDs_from_query_like#

return_object_IDs_from_query_like(domain, querylike, bypass_checks=False, interpret_no_query_as_all_nontemp_objects=False)#

Wrapper function to ensure that tuple-like queries are converted into a query before being passed to interpret_query.

Converts a query or query-container into a list of object IDs which match the query. Filter the ‘values_array’ element of the query using the ‘relation’ operation to compare against the value in ‘comparison_value’. Return the filtered object_indices which match the query.

Parameters:
domaindomain

A muspan domain

querylikequery_like

Either a muspan query object, a query_container, a tuple form query, or a list/array of object IDs.

bypass_checksbool, optional

If True, standard checks on whether this query can be interpreted are bypassed. May generate unexpected crashes if objects that can’t be interpreted as a query are passed in, but generates a substantial speed increase for large datasets when we’re confident the query is formatted correctly. Defaults to False.

interpret_no_query_as_all_nontemp_objectsbool, optional

If True, if querylike is None then it will instead be interpreted as a request for all objects in the domain that don’t belong to any collections whose name begins ‘__temp’. If False, then passing None will result in an error. Defaults to False.

Returns:
object_IDsndarray

The object IDs that match the query.