cleanup_datastore_key_range_query

Function cleanup_datastore_key_range_query 

Source
pub fn cleanup_datastore_key_range_query(
    prefix: &[u8],
    start_bound: Bound<Vec<u8>>,
    end_bound: Bound<Vec<u8>>,
    count: Option<u32>,
    max_datastore_key_length: u8,
    max_datastore_query_config: Option<u32>,
) -> Result<(Vec<u8>, Bound<Vec<u8>>, Bound<Vec<u8>>, Option<u32>), ModelsError>
Expand description

Checks and cleans up a datastore key range query Returns: (prefix, start_bound, end_bound, count) or error The returned count is the effective item count limit: it falls back to the configured maximum when the caller did not provide one, so that callers can forward it to the datastore scan instead of running an unbounded enumeration. Note: only useful to cleanup user-supplied requests (API/ABI)