Skip to main content

ActivityDataSource

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)

Extends

Constructors

new ActivityDataSource()

new ActivityDataSource(s): ActivityDataSource

Parameters

ParameterType
sany

Returns

ActivityDataSource

Overrides

HttpDataSource . constructor

Source

src/dapi.ts:1180

Properties

PropertyTypeInherited from
clsNamestringHttpDataSource.clsName
dartanyHttpDataSource.dart

Methods

allPackageVersions()

allPackageVersions(): HttpDataSource <LogEvent>

Turns off package versions isolation. This DataSource will return all entities in all versions, not only the current one *

Returns

HttpDataSource <LogEvent>

Inherited from

HttpDataSource . allPackageVersions

Source

src/dapi.ts:344


by()

by(i): HttpDataSource <LogEvent>

Parameters

ParameterType
inumber

Returns

HttpDataSource <LogEvent>

Inherited from

HttpDataSource . by

Source

src/dapi.ts:349


count()

count(): Promise<number>

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

HttpDataSource . count

Source

src/dapi.ts:314


delete()

delete(e): Promise<void>

Deletes an entity.

Parameters

ParameterType
eEntity

Returns

Promise<void>

Inherited from

HttpDataSource . delete

Source

src/dapi.ts:339


filter()

filter(w): HttpDataSource <LogEvent>

Applies filter to current request. Also can be set with list method "options" parameter See example: https://public.datagrok.ai/js/samples/dapi/projects-list Smart filter: https://datagrok.ai/help/datagrok/navigation/views/browse#entity-search

Parameters

ParameterTypeDescription
wstring

Returns

HttpDataSource <LogEvent>

Inherited from

HttpDataSource . filter

Source

src/dapi.ts:375


find()

find(id): Promise <LogEvent>

Returns an entity with the specified id. Throws an exception if an entity does not exist, or is not accessible in the current context. Sample: https://public.datagrok.ai/js/samples/data-access/save-and-load-df

Parameters

ParameterTypeDescription
idstringGUID of the corresponding object

Returns

Promise <LogEvent>

{Promise<object>} - entity.

Inherited from

HttpDataSource . find

Source

src/dapi.ts:329


first()

first(): Promise <LogEvent>

Returns fist entity that satisfies the filtering criteria (see filter).

Returns

Promise <LogEvent>

Promise<object>

Inherited from

HttpDataSource . first

Source

src/dapi.ts:320


include()

include(include): HttpDataSource <LogEvent>

Includes entity in the result

Parameters

ParameterTypeDescription
includestring

Returns

HttpDataSource <LogEvent>

Inherited from

HttpDataSource . include

Source

src/dapi.ts:392


list()

list(options): Promise <LogEvent[]>

Returns all 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

Parameters

ParameterType
optionsobject
options.filter?string
options.order?string
options.pageNumber?number
options.pageSize?number

Returns

Promise <LogEvent[]>

Inherited from

HttpDataSource . list

Source

src/dapi.ts:299


nextPage()

nextPage(): HttpDataSource <LogEvent>

Returns next page of all entities that satisfy the filtering criteria (see filter). Works only if pageSize was set during previous list() call See examples: https://public.datagrok.ai/js/samples/dapi/projects-list

Returns

HttpDataSource <LogEvent>

Inherited from

HttpDataSource . nextPage

Source

src/dapi.ts:364


order()

order(fieldName, desc): HttpDataSource <LogEvent>

Instructs data source to return results in the specified order.

Parameters

ParameterTypeDefault valueDescription
fieldNamestringundefined
descbooleanfalse

Returns

HttpDataSource <LogEvent>

Inherited from

HttpDataSource . order

Source

src/dapi.ts:384


page()

page(i): HttpDataSource <LogEvent>

Restricts results to the specified page number. See also nextPage.

Parameters

ParameterType
inumber

Returns

HttpDataSource <LogEvent>

Inherited from

HttpDataSource . page

Source

src/dapi.ts:355


save()

save(e): Promise <LogEvent>

Saves an entity.

Parameters

ParameterType
eEntity

Returns

Promise <LogEvent>

Inherited from

HttpDataSource . save

Source

src/dapi.ts:334


where()

where(options?): ActivityDataSource

Parameters

ParameterType
options?object
options.end?Dayjs
options.start?Dayjs
options.userId?string

Returns

ActivityDataSource

Source

src/dapi.ts:1184