# Class QueryService

Service for executing data queries.

# Constructors

# constructor

new QueryService(sisenseContextService): QueryService

# Parameters

Parameter Type
sisenseContextService SisenseContextService

# Returns

QueryService

# Methods

# executeQuery

executeQuery(params): Promise< { data: QueryResultData; } >

Executes a data query. If you want to display the query results, you can use them to populate Compose SDK UI elements or third party UI elements.

To learn how to populate third party UI elements with query results, see the External Charts Guide

# Parameters

Parameter Type Description
params ExecuteQueryParams Query parameters

# Returns

Promise< { data: QueryResultData; } >

Query result


# executeQueryByWidgetId

executeQueryByWidgetId(params): Promise< { data: QueryResultData; } & QueryByWidgetIdQueryParams >

Executes a data query extracted from an existing widget in the Sisense instance.

# Parameters

Parameter Type Description
params ExecuteQueryByWidgetIdParams Parameters to identify the target widget

# Returns

Promise< { data: QueryResultData; } & QueryByWidgetIdQueryParams >

Query result