Skip to content

Query

Defines a saved Query in a [[Book]].

Queries can be saved on Books by users.

Extends

  • Resource<bkper.Query>

Constructors

Constructor

new Query(book, payload?): Query;

Parameters

ParameterType
bookBook
payload?Query

Returns

Query

Overrides

Resource<bkper.Query>.constructor

Properties

payload

payload: Query;

The underlying payload data for this resource

Inherited from

Resource.payload

Methods

create()

create(): Promise<Query>;

Perform create new Query.

Returns

Promise<Query>

This Query, for chaining


getId()

getId(): string | undefined;

Gets the Query universal identifier.

Returns

string | undefined

The Query universal identifier


getQuery()

getQuery(): string | undefined;

Gets the query string to be executed.

Returns

string | undefined

This Query string to be executed


getTitle()

getTitle(): string | undefined;

Gets the title of this saved Query.

Returns

string | undefined

The title of this saved Query


json()

json(): Query;

Gets an immutable copy of the JSON payload for this resource.

Returns

Query

An immutable copy of the json payload

Inherited from

Resource.json

remove()

remove(): Promise<Query>;

Perform delete Query.

Returns

Promise<Query>

This Query, for chaining


setQuery()

setQuery(query): Query;

Sets the query string associated with this saved Query.

Parameters

ParameterTypeDescription
querystringThe query string to be executed

Returns

Query

This Query, for chaining


setTitle()

setTitle(title): Query;

Sets the title of this saved Query.

Parameters

ParameterTypeDescription
titlestringThe title of this saved Query

Returns

Query

This Query, for chaining


update()

update(): Promise<Query>;

Perform update Query, applying pending changes.

Returns

Promise<Query>

This Query, for chaining