Xplain.Db.SessionData

Xplain.Db.SessionData()

Xplain.Db.SessionData is a singleton class that provides methods to set and get the resulting data currently used within the session, i.e. the data for all requests plus metadata.

findQueryData

findQueryData(id)

Returns the query data for a given query. The query is specified by the parameter id. Throws an exception if query with the given ID cannot be found. Otherwise, returns an instance of Xplain.Db.QueryData

Parameters

id (string) – ID of the query for which you would like to get query data.

Returns

{object} an instance of Xplain.Db.QueryData

getData

getData()

Returns the last data received from the backend. If no data has been received so far, this method will return false.

Returns

{PlainObject|boolean}

setData

setData(d)

Use this method to set the last data received

Parameters

d (object) – The data object returned from the backend

Returns

{Xplain.Db.SessionData}