prepare¶
Prepare OPTIMADE queries.
get_query_params(query_parameters, database_id, filter_mapping)
async
¶
Construct the parsed URL query parameters
Source code in optimade_gateway/queries/prepare.py
84 85 86 87 88 89 90 91 92 93 94 95 |
|
prepare_query_filter(database_ids, filter_query)
async
¶
Update the query parameter filter
value to be database-specific
This is needed due to the served change of id
values.
If someone searches for a gateway-changed id
, it needs to be reverted to be
database-specific.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
database_ids
|
list[str]
|
List of the databases to create updated filter values for.
These values are part of the gateway-changed |
required |
filter_query
|
str | None
|
The submitted |
required |
Returns:
Type | Description |
---|---|
Mapping[str, str | None]
|
A mapping for database IDs to database-specific |
Source code in optimade_gateway/queries/prepare.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|