Get Time Series Names
-
Use
advanced.getTimeSeriesFor
to get the names of all time series for the specified entity. -
In this page:
getTimeSeriesFor
usage
Flow:
- Open a session.
- Load an entity to the session either using session.load
or by querying for the document via session.query.
In both cases, the resulting entity will be tracked by the session. - Call
advanced.getTimeSeriesFor
, pass the tracked entity.
Note:
- If the entity is Not tracked by the session, an
ArgumentException
exception is thrown.
Example
// Open a session
const session = documentStore.openSession();
// Load a document entity to the session
const user = await session.load("users/john");
// Call getTimeSeriesFor, pass the entity
const tsNames = session.advanced.getTimeSeriesFor(user);
// Results will include the names of all time series associated with document 'users/john'
Syntax
getTimeSeriesFor(instance);
Parameter | Type | Description |
---|---|---|
instance | object |
The entity whose time series names you want to get. |
Return value | |
---|---|
string[] |
A list of names of all the time series associated with the entity, sorted alphabetically by the name. |