UserReportsRulesDataSource
Defined in: js-api/src/dapi.ts:2464
Common functionality for handling collections of entities stored on the server. Works with Datagrok REST API, allows to get filtered and paginated lists of entities, Can be extended with specific methods. (i.e. UsersDataSource)
The fluent methods (filter, order, page, by, include, ...) are immutable: each returns a new source and leaves this one as it was, so a source can be kept in a variable and reused as a starting point.
Example
const projects = grok.dapi.projects.order('createdOn', true);
const recent = await projects.filter('createdOn > -1w').list({pageSize: 20});
const all = await projects.list(); // still unfiltered
Extends
Constructors
Constructor
new UserReportsRulesDataSource(
s):UserReportsRulesDataSource
Defined in: js-api/src/dapi.ts:2465
Parameters
| Parameter | Type |
|---|---|
s | any |
Returns
UserReportsRulesDataSource
Overrides
Properties
| Property | Type | Inherited from | Defined in |
|---|---|---|---|
clsName | string | HttpDataSource.clsName | js-api/src/dapi.ts:349 |
dart | any | HttpDataSource.dart | js-api/src/dapi.ts:348 |
Methods
_prepare()
_prepare(
q?):any
Defined in: js-api/src/dapi.ts:365
Parameters
| Parameter | Type |
|---|---|
q | DataSourceQuery |
Returns
any
Inherited from
allPackageVersions()
allPackageVersions():
this
Defined in: js-api/src/dapi.ts:430
A source without package version isolation: entities of all package versions, not only the current one.
Returns
this
Inherited from
HttpDataSource.allPackageVersions
by()
by(
i):this
Defined in: js-api/src/dapi.ts:435
A source that returns at most [i] entities per page. See also page.
Parameters
| Parameter | Type |
|---|---|
i | number |
Returns
this
Inherited from
count()
count():
Promise<number>
Defined in: js-api/src/dapi.ts:401
Counts entities that satisfy the filtering criteria (see filter). See examples: https://public.datagrok.ai/js/samples/dapi/projects-list Smart filter: https://datagrok.ai/help/datagrok/smart-search
Returns
Promise<number>
Inherited from
delete()
delete(
e):Promise<void>
Defined in: js-api/src/dapi.ts:425
Deletes an entity.
Parameters
| Parameter | Type |
|---|---|
e | DartObject |
Returns
Promise<void>