Skip to content

Commit 9652d05

Browse files
committed
Add some docs
1 parent 705f6f0 commit 9652d05

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/plugins/persistence/couch/CouchObjectProvider.js

+16
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,22 @@ class CouchObjectProvider {
443443
return response.ok;
444444
}
445445

446+
/**
447+
* @typedef GetObjectByViewOptions
448+
* @property {String} designDoc the name of the design document that the view belongs to
449+
* @property {String} viewName
450+
* @property {Array.<String>} [keysToSearch] a list of discrete view keys to search for. View keys are not object identifiers.
451+
* @property {String} [startKey] limit the search to a range of keys starting with the provided `startKey`. One of `keysToSearch` OR `startKey` AND `endKey` must be provided
452+
* @property {String} [endKey] limit the search to a range of keys ending with the provided `endKey`. One of `keysToSearch` OR `startKey` AND `endKey` must be provided
453+
* @property {Number} [limit] limit the number of results returned
454+
* @property {String} [objectIdField] The field (either key or value) to treat as an object key. If provided, include_docs will be set to false in the request, and the field will be used as an object identifier. A bulk request will be used to resolve objects from identifiers
455+
*/
456+
/**
457+
* Return objects based on a call to a view. See https://docs.couchdb.org/en/stable/api/ddoc/views.html.
458+
* @param {GetObjectByViewOptions} options
459+
* @param {AbortSignal} abortSignal
460+
* @returns {Promise<Array.<import('openmct.js').DomainObject>>}
461+
*/
446462
async getObjectsByView(
447463
{ designDoc, viewName, keysToSearch, startKey, endKey, limit, objectIdField },
448464
abortSignal

0 commit comments

Comments
 (0)