Skip to content

Commit 926da4e

Browse files
committed
doc (api) fix js docs for PersistenceItem
1 parent 5fa31a0 commit 926da4e

File tree

1 file changed

+13
-21
lines changed

1 file changed

+13
-21
lines changed

lib/server-code/api/persistence-item.js

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -52,38 +52,30 @@ class PersistenceItem {
5252
return promisify(this.dataStore.remove, this.dataStore)(this);
5353
}
5454

55-
loadRelations() {
56-
const promisified = promisify(this.dataStore.remove, this.dataStore)(this);
57-
58-
return promisified.apply(null, [this].concat(Array.prototype.slice.call(arguments)));
55+
/**
56+
* @param {String[]=} options A list of relations to retrieve
57+
* @returns {Promise}
58+
*/
59+
loadRelations(options) {
60+
return promisify(this.dataStore.remove, this.dataStore)(this, options);
5961
}
6062

63+
/**
64+
* @private
65+
*/
6166
get dataStore() {
6267
return Backendless.Data.of(this.___class);
6368
}
6469

70+
/**
71+
* @private
72+
*/
6573
static get dataStore() {
6674
return Backendless.Data.of(this.name);
6775
}
6876

6977
/**
70-
* @typedef {Object} DataQueryOptions
71-
* @property {Number} pageSize
72-
* @property {Number} offset
73-
* @property {String} sortBy
74-
* @property {Number} relationsDepth
75-
* @property {String[]} relations
76-
*/
77-
78-
/**
79-
* @typedef {Object} DataQuery
80-
* @property {String[]} properties
81-
* @property {String} condition WHERE clause condition
82-
* @property {DataQueryOptions} options
83-
*/
84-
85-
/**
86-
* @param {DataQuery} dataQuery
78+
* @param {Backendless.DataQuery} dataQuery
8779
* @returns {Promise}
8880
*/
8981
static find(dataQuery) {

0 commit comments

Comments
 (0)