Skip to content

Commit 78eb63c

Browse files
authored
Merge pull request #237 from HarperDB/update/search-condition-properties
Update search conditions properties to new preferred values
2 parents ff88a01 + 2055ca6 commit 78eb63c

File tree

2 files changed

+36
-30
lines changed

2 files changed

+36
-30
lines changed

docs/developers/operations-api/nosql-operations.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,12 @@ Returns data from a table for one or more matching conditions. This supports gro
266266
- `next` _(optional)_ - This can define the next sort object that will be used to break ties for sorting when there are multiple records with the same value for the first attribute (follows the same structure as `sort`).
267267
- `get_attributes` _(required)_ - define which attributes you want returned. Use `['*']` to return all attributes
268268
- `conditions` _(required)_ - the array of conditions objects, specified below, to filter by. Must include one or more object in the array that are a condition or a grouped set of conditions. A condition has the following properties:
269-
- `search_attribute` _(required)_ - the attribute you wish to search, can be any attribute
270-
- `search_type` _(required)_ - the type of search to perform - `equals`, `contains`, `starts_with`, `ends_with`, `greater_than`, `greater_than_equal`, `less_than`, `less_than_equal`, `between`
271-
- `search_value` _(required)_ - case-sensitive value you wish to search. If the `search_type` is `between` then use an array of two values to search between
269+
- `attribute` _(required)_ - the attribute you wish to search, can be any attribute
270+
- `search_attribute` - deprecated in favor of `attribute`
271+
- `comparator` _(required)_ - the type of search to perform - `equals`, `contains`, `starts_with`, `ends_with`, `greater_than`, `greater_than_equal`, `less_than`, `less_than_equal`, `between`
272+
- `search_type` - deprecated in favor of `comparator`
273+
- `value` _(required)_ - case-sensitive value you wish to search. If the `comparator` is `between` then use an array of two values to search between
274+
- `search_value` - deprecated in favor of `value`
272275
Or a set of grouped conditions has the following properties:
273276
- `operator` _(optional)_ - the operator used between each condition - `and`, `or`. The default is `and`
274277
- `conditions` _(required)_ - the array of conditions objects as described above.
@@ -293,27 +296,27 @@ Returns data from a table for one or more matching conditions. This supports gro
293296
"get_attributes": ["*"],
294297
"conditions": [
295298
{
296-
"search_attribute": "age",
297-
"search_type": "between",
298-
"search_value": [5, 8]
299+
"attribute": "age",
300+
"comparator": "between",
301+
"value": [5, 8]
299302
},
300303
{
301-
"search_attribute": "weight_lbs",
302-
"search_type": "greater_than",
303-
"search_value": 40
304+
"attribute": "weight_lbs",
305+
"comparator": "greater_than",
306+
"value": 40
304307
},
305308
{
306309
"operator": "or",
307310
"conditions": [
308311
{
309-
"search_attribute": "adorable",
310-
"search_type": "equals",
311-
"search_value": true
312+
"attribute": "adorable",
313+
"comparator": "equals",
314+
"value": true
312315
},
313316
{
314-
"search_attribute": "lovable",
315-
"search_type": "equals",
316-
"search_value": true
317+
"attribute": "lovable",
318+
"comparator": "equals",
319+
"value": true
317320
}
318321
]
319322
}

site/versioned_docs/version-4.6/developers/operations-api/nosql-operations.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,12 @@ Returns data from a table for one or more matching conditions. This supports gro
266266
- `next` _(optional)_ - This can define the next sort object that will be used to break ties for sorting when there are multiple records with the same value for the first attribute (follows the same structure as `sort`).
267267
- `get_attributes` _(required)_ - define which attributes you want returned. Use `['*']` to return all attributes
268268
- `conditions` _(required)_ - the array of conditions objects, specified below, to filter by. Must include one or more object in the array that are a condition or a grouped set of conditions. A condition has the following properties:
269-
- `search_attribute` _(required)_ - the attribute you wish to search, can be any attribute
270-
- `search_type` _(required)_ - the type of search to perform - `equals`, `contains`, `starts_with`, `ends_with`, `greater_than`, `greater_than_equal`, `less_than`, `less_than_equal`, `between`
271-
- `search_value` _(required)_ - case-sensitive value you wish to search. If the `search_type` is `between` then use an array of two values to search between
269+
- `attribute` _(required)_ - the attribute you wish to search, can be any attribute.
270+
- `search_attribute` - deprecated in favor of `attribute`
271+
- `comparator` _(required)_ - the type of search to perform - `equals`, `contains`, `starts_with`, `ends_with`, `greater_than`, `greater_than_equal`, `less_than`, `less_than_equal`, `between`
272+
- `search_type` - deprecated in favor of `comparator`
273+
- `value` _(required)_ - case-sensitive value you wish to search. If the `comparator` is `between` then use an array of two values to search between
274+
- `search_value` - deprecated in favor of `value`
272275
Or a set of grouped conditions has the following properties:
273276
- `operator` _(optional)_ - the operator used between each condition - `and`, `or`. The default is `and`
274277
- `conditions` _(required)_ - the array of conditions objects as described above.
@@ -293,27 +296,27 @@ Returns data from a table for one or more matching conditions. This supports gro
293296
"get_attributes": ["*"],
294297
"conditions": [
295298
{
296-
"search_attribute": "age",
297-
"search_type": "between",
298-
"search_value": [5, 8]
299+
"attribute": "age",
300+
"comparator": "between",
301+
"value": [5, 8]
299302
},
300303
{
301-
"search_attribute": "weight_lbs",
302-
"search_type": "greater_than",
303-
"search_value": 40
304+
"attribute": "weight_lbs",
305+
"comparator": "greater_than",
306+
"value": 40
304307
},
305308
{
306309
"operator": "or",
307310
"conditions": [
308311
{
309-
"search_attribute": "adorable",
310-
"search_type": "equals",
311-
"search_value": true
312+
"attribute": "adorable",
313+
"comparator": "equals",
314+
"value": true
312315
},
313316
{
314-
"search_attribute": "lovable",
315-
"search_type": "equals",
316-
"search_value": true
317+
"attribute": "lovable",
318+
"comparator": "equals",
319+
"value": true
317320
}
318321
]
319322
}

0 commit comments

Comments
 (0)