Skip to content

Interface

ArcGISQueriableDataSource is created from a single ArcGIS queriable layer, such as feature layer, imagery layer and subtype group layer.

Inheritance: ArcGISQueriableDataSourceQueriableDataSource

Properties

Hide inherited properties
PropertyTypeNotes
DataSource

The data source which this data source derives from.

count
inherited
number

The total records count depends on the current query

DataSourceManager

The data source manager, which is used to manage the data source, including create/get/destroy the data source instance.

dataViewId
inherited
string

The data view ID configured in JSON.

id
inherited
string

The data source ID.

isDataView
inherited
boolean

True means the data source is a data view. For local data source, this is false even the local data source is created from a data view.

isLocal
inherited
boolean

True means the data source is a local data source.

boolean

Whether the data source is case-sensitive when doing query by SQL clauses.

layerArcGISQueriableLayerTypes

1 How to use ArcGIS Maps SDK for JavaScript layer 1.1 a data source may have a layer, the layer is the source of the data source ( isDataInDataSourceInstance should be false) and is used to save source data and communicate with Maps SDK for JavaScript (get popupTemplate, symbol and so on), if want to query features, should use data source instance, not the layer. 1.2 main data source and all other data views/local data source share the same layer. 1.3 selection view create a new layer when do query, but doesn't save the layer. 1.4 if widget needs an ArcGIS Maps SDK for JavaScript layer, call dataSource.createJSAPILayerByDataSource() to create a new layer, do not use the layer in data source instance directly, to listen data source changes and apply the changes to the new layer, see 2.2.

localId
inherited
string

The local ID of the data source.

order
inherited
number

Order in the parent data source.

DataSource & SetDataSourceMixin

The parent data source of this data source, mull means it's a root data source.

type
inherited
string

The type of the data source.

urlstring

The data source URL

belongToDataSource

optionalinheritedinherited
Interface Property
belongToDataSource: DataSource

The data source which this data source derives from.

count

optionalinheritedinherited
Interface Property
count: number

The total records count depends on the current query

dataSourceManager

inheritedinherited
Interface Property
dataSourceManager: DataSourceManager

The data source manager, which is used to manage the data source, including create/get/destroy the data source instance.

dataViewId

optionalinheritedinherited
Interface Property
dataViewId: string

The data view ID configured in JSON.

id

inheritedinherited
Interface Property
id: string

The data source ID.

Inherited from QueriableDataSource.id

isDataView

inheritedinherited
Interface Property
isDataView: boolean

True means the data source is a data view. For local data source, this is false even the local data source is created from a data view.

isLocal

inheritedinherited
Interface Property
isLocal: boolean

True means the data source is a local data source.

isSqlCaseSensitive

inheritedinherited
Interface Property
isSqlCaseSensitive: boolean

Whether the data source is case-sensitive when doing query by SQL clauses.

layer

optional
Interface Property
layer: ArcGISQueriableLayerTypes

1 How to use ArcGIS Maps SDK for JavaScript layer 1.1 a data source may have a layer, the layer is the source of the data source ( isDataInDataSourceInstance should be false) and is used to save source data and communicate with Maps SDK for JavaScript (get popupTemplate, symbol and so on), if want to query features, should use data source instance, not the layer. 1.2 main data source and all other data views/local data source share the same layer. 1.3 selection view create a new layer when do query, but doesn't save the layer. 1.4 if widget needs an ArcGIS Maps SDK for JavaScript layer, call dataSource.createJSAPILayerByDataSource() to create a new layer, do not use the layer in data source instance directly, to listen data source changes and apply the changes to the new layer, see 2.2.

2 How to listen data source changes via DataSourceComponent 2.1 if widget loads records, use onDataSourceInfoChange to listen selected records change, query params change and loaded records change. 2.2 if widget doesn't load records (use a Maps SDK for JavaScript widget and needs an ArcGIS Maps SDK for JavaScript layer), use onQueryRequired to listen query params change, use onSelectionChange to listen selected records change.

3 Relation between output data source and origin data source 3.1 if schema is not changed (e.g. query output) and only has one origin data source, will use origin data source's layerDefinition , popupInfo and Maps SDK for JavaScript layer . 3.2 if schema is changed (e.g. chart output), need widget to set layerDefinition , popupInfo and Maps SDK for JavaScript layer to data source instance.

localId

optionalinheritedinherited
Interface Property
localId: string

The local ID of the data source.

order

optionalinheritedinherited
Interface Property
order: number

Order in the parent data source.

parentDataSource

inheritedinherited
Interface Property
parentDataSource: DataSource & SetDataSourceMixin

The parent data source of this data source, mull means it's a root data source.

type

inheritedinherited
Interface Property
type: string

The type of the data source.

url

optional
Interface Property
url: string

The data source URL

Methods

Hide inherited methods
MethodReturnsNotes
addSourceVersion()
inherited
void

When current data source is created from an array of records, it will be saved in sourceRecords . Add the version of sourceRecords . setSourceRecords will add the version by default.

addVersion()
inherited
void

Update data source version.

buildRecord(feature)FeatureDataRecord

Builds a data record only -- does not add the record into data source.

changeGDBVersion(gdbVersion)void

Change the layer GDB version.

clearRecords()
inherited
void

This function will clear the loaded records and won't clear the sourceRecords. Once the loaded records are cleared, the version in the data source info will be updated.

void

Clear both sourceRecords and loaded records. Both source version and version in data source info will be updated.

createJSAPILayerByDataSource(dataSource?, useDataSourceQueryParams?, throwError?)
inherited
Promise<Layer | ArcGISSubLayer>

Default dataSource is the current data source. Default useDataSourceQueryParams is true, that is to say apply the data source's query params to the created ArcGIS Maps SDK for JavaScript layer by default. Default throwError is false, that is to say the method won't throw error and will return undefined if the creation fail.

destroy()
inherited
void

Destroy the data source.

fetchSchema()Promise<IMDataSourceSchema>

Fetch the data schema from an actual data source. If it's a statistic data source, the schema will not be fetched.

DataSource[]

Return the derived data views and local data sources.

getAllLoadedRecords()FeatureDataRecord[]

Get records of all the loaded pages.

number

If the return value > 0, auto refresh is enabled.

getConfigQueryParams()ArcGISQueryParams

Get the user config query parameters.

getCountStatus()
inherited
DataSourceStatus

Return data source count status.

string

Get the current loaded record id, which is used in loadById method.

getCurrentQueryParams(options?)ArcGISQueryParams

Get the current query parameters. The current query parameters contain all applied queries.

IMDataSourceJson

The data source JSON object in app config.

IMDataViewJson

Return the config of the current data source.

getDataViews()ArcGISQueriableDataSource[]

Override parent interface to get correct type.

getGDBVersion()string

Return the current GDB version.

getIdField()string

Return the data source ID field.

getInfo()
inherited
IMDataSourceInfo

Return the data source info in redux store.

getLabel()
inherited
string

Return data source label.

boolean

Return whether listen selection.

getLocalDataSource(localId)
inherited
DataSource

Get local data source by local ID.

DataSource[]

Return all local data sources created from a main data source or data view.

number

Null means there is no record count limit, and will return all records from the service.

getRealQueryPages(pageSize, page)
inherited
number[]

Get real query page depends on the widget's request page.

getRealQueryParams(query, flag, options?)ArcGISQueryParams

When do query/load, we do not fire the query request directly. Instead, we'll consider the data source's config/current query parameter.

getRecordById(id)FeatureDataRecord

Get record by ID

getRecords()FeatureDataRecord[]

Get records of the loaded continuous pages. If the loaded pages are 1, 2, and 10, will only return records on the page 1 and 2.

getRecordsByPage(page, pageSize)FeatureDataRecord[]

The page size here defines the records this method returns, which are not the actual query pageSize. Will use a fixed pageSize to query and cache data.

getRecordsByPageWithSelection(page, pageSize)FeatureDataRecord[]

If selected records are not loaded in the current data source, will concat them to the end of records array. See getRecordsWithSelection for details.

getRecordsWithSelection()FeatureDataRecord[]

If selected records are not loaded in the current data source, they will be concatenated to the end of records array. For example, record 1 is selected in data view 1 and it is not loaded in data view 2 (record 1 actually matches query params of data view 2), dataView2.getRecordsWithSelection() will return all loaded records in data view 2 and record 1.

QueryParams

Get the query parameters configured in remote (not in exb).

DataSource

Return the root data source.

getRuntimeQueryParams(excludeWidgetId?)
inherited
QueryParams

Get the queries applied in runtime. If the excludeWidgetId is passed in, the queries of this widget will be excluded.

getSchema()
inherited
IMDataSourceSchema

The schema returned here is the merged result of the configured schema and the fetched schema. The configured schema is the user's changes, such as a new data source name. The fetched schema is the original schema from AGOL/portal item or a remote database, such as the service name, the fields and the filters.

string[]

Get selected record IDs

number[]

Get selected record indexes

getSelectedRecords()FeatureDataRecord[]

Get selected records

DataSource

Get selection data view

getSourceRecords()FeatureDataRecord[]

Return the source records

getSourceVersion()
inherited
number

When current data source is created from an array of records, it will be saved in sourceRecords . Return the version of sourceRecords .

getStatus()
inherited
DataSourceStatus

Return data source status.

getVersion()
inherited
number

Return data source version.

isDataSourceSet()
inherited
thisisDataSource & SetDataSourceMixin

Whether a data source contains child data sources. A set data source won't create all its child data sources when ready is resolved. To make sure all child data sources are created, please use childDataSourcesReady .

isInAppConfig()
inherited
boolean

Return whether the data source is added in builder and is saved in app config.

isSelectionView()
inherited
boolean

Determine whether the data source is a selection view.

load(query, options?)Promise<FeatureDataRecord[]>

Execute the query against the service and update the internal data records, pagination is supported. When call this method, the real query is returned by getRealQueryParams .

loadAll(query, signal?, progressCallback?, options?)Promise<FeatureDataRecord[]>

Load all records, there is no limit to the number of the records returned in the records array response. You can abort the progress by a abort signal and can use progressCallback to get the progress and the current results.

loadById(id, refresh?)Promise<FeatureDataRecord>

Load record by ID, do not consider other queries.

loadCount(query, options?)Promise<number>

Load the records count.

mergeQueryParams(queries)ArcGISQueryParams

Merge queries by using AND , and return the merged result. If any query is undefined/null, it will be ignored.

query(query, options?)Promise<QueryResult>

Execute query against the service only, do NOT update the internal data records. The actual query parameters are generated by getRealQueryParams .

queryAll(query, signal?, progressCallback?, options?)
inherited
Promise<QueryResult>

Query all records, there is no limit to the number of the records returned in the records array response. You can abort the progress by a abort signal and can use progressCallback to get the progress and the current results.

queryById(id, fields?)Promise<FeatureDataRecord>

Query record by ID. Will return all fields if not pass in the fields .

queryCount(query, options?)Promise<QueryResult>

Query count

queryIds(query, options?)Promise<QueryResult>

Query record IDs, there is no limit to the number of the IDs returned in the ids array response.

ready()
inherited
Promise<any>

Ready is resolved means the data source instance is ready for use. Please note that can not make sure all child data sources are created if a set data source is ready. To make sure all child data sources are created, please use childDataSourcesReady .

void

Select all loaded records.

selectRecordById(id, record?)void

Select a record by ID. When select record by ID, we can pass in the record. So when the selected record is not loaded, we can add it in.

selectRecordsByIds(ids, records?)void

Select records by IDs. When select records by IDs, we can pass in the records. So when the selected records are not loaded, we can add them in.

setCountStatus(status)
inherited
void

Update data source count status.

setDataSourceJson(dsJson)
inherited
void

Update data source JSON in data source instance

setListenSelection(listen)
inherited
void

Whether listen selected records from other data sources which are derived from the same main data source. If true, will update selected record IDs of current data source info when selecting records via other derived data sources. Will also update selected record IDs when selecting records via current data source itself. If false, won't change selected record IDs when selecting records via other derived data sources. Will update selected record IDs only when selecting records via current data source itself.

setNeedRefresh(needRefresh)
inherited
void

When the auto refresh is turned on, and the data source needRefresh status is changed, this method will be invoked.

setRecords(records)void

Update the records in the data source object only, does not update the source data.

setSourceFeatures(features, others?)Promise<void>

When current data source is created from an array of features (__esri.Graphic), will save it in an ArcGIS Maps SDK for JavaScript feature layer. This method is used to update the source data. Please note, use this method only when isDataInDataSourceInstance is not true.

setSourceRecords(records)void

When current data source is created from an array of records ( FeatureDataRecord ), will save it in sourceRecords . These two methods are used to update or get the source data. Please note, use these two methods only when isDataInDataSourceInstance is true.

setStatus(status)
inherited
void

Update data source status.

supportReplica()Promise<boolean>

Whether supports to create replica. See https://developers.arcgis.com/rest/services-reference/enterprise/create-replica/.

updateQueryParams(query, widgetId)void

Update the data source query without executing the actual query.

updateSelectionInfo(options, triggerDataSource, forceCheck?)
inherited
void

Update selected records in data source info if the current data source listens selection change (see setListenSelection ) or the current data source is the trigger data source (that is to say, select via it).

addSourceVersion

inheritedinherited
Interface Method
addSourceVersion(): void

When current data source is created from an array of records, it will be saved in sourceRecords . Add the version of sourceRecords . setSourceRecords will add the version by default.

Returns 
void

addVersion

optionalinheritedinherited
Interface Method
addVersion(): void

Update data source version.

Returns 
void

buildRecord

Interface Method
buildRecord(featureIFeature | Graphic): FeatureDataRecord

Builds a data record only -- does not add the record into data source.

Parameters
ParameterType
featureIFeature | Graphic
Returns 
FeatureDataRecord

changeGDBVersion

Interface Method
changeGDBVersion(gdbVersionstring): void

Change the layer GDB version.

Parameters
ParameterType
gdbVersionstring
Returns 
void

clearRecords

optionalinheritedinherited
Interface Method
clearRecords(): void

This function will clear the loaded records and won't clear the sourceRecords. Once the loaded records are cleared, the version in the data source info will be updated.

Returns 
void

clearSourceRecords

inheritedinherited
Interface Method
clearSourceRecords(): void

Clear both sourceRecords and loaded records. Both source version and version in data source info will be updated.

Returns 
void

createJSAPILayerByDataSource

inheritedinherited
Interface Method
createJSAPILayerByDataSource(dataSource?DataSource, useDataSourceQueryParams?boolean, throwError?boolean): Promise<Layer | ArcGISSubLayer>

Default dataSource is the current data source. Default useDataSourceQueryParams is true, that is to say apply the data source's query params to the created ArcGIS Maps SDK for JavaScript layer by default. Default throwError is false, that is to say the method won't throw error and will return undefined if the creation fail.

Parameters
ParameterType
dataSourceDataSource
useDataSourceQueryParamsboolean
throwErrorboolean
Returns 
Promise<Layer | ArcGISSubLayer>

destroy

inheritedinherited
Interface Method
destroy(): void

Destroy the data source.

Returns 
void

fetchSchema

Interface Method
fetchSchema(): Promise<IMDataSourceSchema>

Fetch the data schema from an actual data source. If it's a statistic data source, the schema will not be fetched.

Returns 
Promise<IMDataSourceSchema>

getAllDerivedDataSources

inheritedinherited
Interface Method
getAllDerivedDataSources(): DataSource[]

Return the derived data views and local data sources.

Returns 
DataSource[]

getAllLoadedRecords

Interface Method
getAllLoadedRecords(): FeatureDataRecord[]

Get records of all the loaded pages.

Returns 
FeatureDataRecord[]

getAutoRefreshInterval

inheritedinherited
Interface Method
getAutoRefreshInterval(): number

If the return value > 0, auto refresh is enabled.

Returns 
number

getConfigQueryParams

Interface Method
getConfigQueryParams(): ArcGISQueryParams

Get the user config query parameters.

Returns 
ArcGISQueryParams

getCountStatus

inheritedinherited
Interface Method
getCountStatus(): DataSourceStatus

Return data source count status.

Returns 
DataSourceStatus

getCurrentQueryId

inheritedinherited
Interface Method
getCurrentQueryId(): string

Get the current loaded record id, which is used in loadById method.

Returns 
string

getCurrentQueryParams

Interface Method
getCurrentQueryParams(options?GetCurrentQueryParamsOptions): ArcGISQueryParams

Get the current query parameters. The current query parameters contain all applied queries.

Parameters
ParameterType
optionsGetCurrentQueryParamsOptions
Returns 
ArcGISQueryParams

getDataSourceJson

inheritedinherited
Interface Method
getDataSourceJson(): IMDataSourceJson

The data source JSON object in app config.

Returns 
IMDataSourceJson

getDataViewConfig

inheritedinherited
Interface Method
getDataViewConfig(): IMDataViewJson

Return the config of the current data source.

Returns 
IMDataViewJson

getDataViews

Interface Method
getDataViews(): ArcGISQueriableDataSource[]

Override parent interface to get correct type.

Returns 
ArcGISQueriableDataSource[]

getGDBVersion

Interface Method
getGDBVersion(): string

Return the current GDB version.

Returns 
string

getIdField

Interface Method
getIdField(): string

Return the data source ID field.

Returns 
string

getInfo

inheritedinherited
Interface Method
getInfo(): IMDataSourceInfo

Return the data source info in redux store.

Returns 
IMDataSourceInfo

getLabel

inheritedinherited
Interface Method
getLabel(): string

Return data source label.

Returns 
string

getListenSelection

inheritedinherited
Interface Method
getListenSelection(): boolean

Return whether listen selection.

Returns 
boolean

getLocalDataSource

inheritedinherited
Interface Method
getLocalDataSource(localIdstring): DataSource

Get local data source by local ID.

Parameters
ParameterType
localIdstring
Returns 
DataSource

getLocalDataSources

inheritedinherited
Interface Method
getLocalDataSources(): DataSource[]

Return all local data sources created from a main data source or data view.

Returns 
DataSource[]

getMaxRecordCount

inheritedinherited
Interface Method
getMaxRecordCount(): number

Null means there is no record count limit, and will return all records from the service.

Returns 
number

getRealQueryPages

inheritedinherited
Interface Method
getRealQueryPages(pageSizenumber, pagenumber): number[]

Get real query page depends on the widget's request page.

Parameters
ParameterType
pageSizenumber
pagenumber
Returns 
number[]

getRealQueryParams

Interface Method
getRealQueryParams(queryany, flag"load" | "query", options?QueryOptions): ArcGISQueryParams

When do query/load, we do not fire the query request directly. Instead, we'll consider the data source's config/current query parameter.

  • For load: we'll merge the configured query parameter if it has, and all widget applied queries.
  • For query, we'll merge the current query parameter and the configured query parameter it has.
Parameters
ParameterType
queryany
flag"load" | "query"
optionsQueryOptions
Returns 
ArcGISQueryParams

getRecordById

Interface Method
getRecordById(idstring): FeatureDataRecord

Get record by ID

Parameters
ParameterType
idstring
Returns 
FeatureDataRecord

getRecords

Interface Method
getRecords(): FeatureDataRecord[]

Get records of the loaded continuous pages. If the loaded pages are 1, 2, and 10, will only return records on the page 1 and 2.

Widgets can use different page sizes to query the data source, but the data source has a specific page size to query the service. The data source will save the loaded records by its own page size and split them when widgets doing queries (with different page and page sizes). The method returns continuous page records to make sure the order of the records is correct.

Returns 
FeatureDataRecord[]

getRecordsByPage

Interface Method
getRecordsByPage(pagenumber, pageSizenumber): FeatureDataRecord[]

The page size here defines the records this method returns, which are not the actual query pageSize. Will use a fixed pageSize to query and cache data.

Parameters
ParameterType
pagenumber
pageSizenumber
Returns 
FeatureDataRecord[]

getRecordsByPageWithSelection

Interface Method
getRecordsByPageWithSelection(pagenumber, pageSizenumber): FeatureDataRecord[]

If selected records are not loaded in the current data source, will concat them to the end of records array. See getRecordsWithSelection for details.

Parameters
ParameterType
pagenumber
pageSizenumber
Returns 
FeatureDataRecord[]

getRecordsWithSelection

Interface Method
getRecordsWithSelection(): FeatureDataRecord[]

If selected records are not loaded in the current data source, they will be concatenated to the end of records array. For example, record 1 is selected in data view 1 and it is not loaded in data view 2 (record 1 actually matches query params of data view 2), dataView2.getRecordsWithSelection() will return all loaded records in data view 2 and record 1.

Returns 
FeatureDataRecord[]

getRemoteQueryParams

inheritedinherited
Interface Method
getRemoteQueryParams(): QueryParams

Get the query parameters configured in remote (not in exb).

Returns 
QueryParams

getRootDataSource

inheritedinherited
Interface Method
getRootDataSource(): DataSource

Return the root data source.

Returns 
DataSource

getRuntimeQueryParams

inheritedinherited
Interface Method
getRuntimeQueryParams(excludeWidgetId?string): QueryParams

Get the queries applied in runtime. If the excludeWidgetId is passed in, the queries of this widget will be excluded.

Parameters
ParameterType
excludeWidgetIdstring
Returns 
QueryParams

getSchema

inheritedinherited
Interface Method
getSchema(): IMDataSourceSchema

The schema returned here is the merged result of the configured schema and the fetched schema. The configured schema is the user's changes, such as a new data source name. The fetched schema is the original schema from AGOL/portal item or a remote database, such as the service name, the fields and the filters.

Returns 
IMDataSourceSchema

getSelectedRecordIds

inheritedinherited
Interface Method
getSelectedRecordIds(): string[]

Get selected record IDs

Returns 
string[]

getSelectedRecordIndexes

inheritedinherited
Interface Method
getSelectedRecordIndexes(): number[]

Get selected record indexes

Returns 
number[]

getSelectedRecords

Interface Method
getSelectedRecords(): FeatureDataRecord[]

Get selected records

Returns 
FeatureDataRecord[]

getSelectionDataView

inheritedinherited
Interface Method
getSelectionDataView(): DataSource

Get selection data view

Returns 
DataSource

getSourceRecords

Interface Method
getSourceRecords(): FeatureDataRecord[]

Return the source records

Returns 
FeatureDataRecord[]

getSourceVersion

inheritedinherited
Interface Method
getSourceVersion(): number

When current data source is created from an array of records, it will be saved in sourceRecords . Return the version of sourceRecords .

Returns 
number

getStatus

inheritedinherited
Interface Method
getStatus(): DataSourceStatus

Return data source status.

Returns 
DataSourceStatus

getVersion

inheritedinherited
Interface Method
getVersion(): number

Return data source version.

Returns 
number

isDataSourceSet

inheritedinherited
Interface Method
isDataSourceSet(): thisisDataSource & SetDataSourceMixin

Whether a data source contains child data sources. A set data source won't create all its child data sources when ready is resolved. To make sure all child data sources are created, please use childDataSourcesReady .

Returns 
thisisDataSource & SetDataSourceMixin

isInAppConfig

inheritedinherited
Interface Method
isInAppConfig(): boolean

Return whether the data source is added in builder and is saved in app config.

Returns 
boolean

isSelectionView

inheritedinherited
Interface Method
isSelectionView(): boolean

Determine whether the data source is a selection view.

Returns 
boolean

load

Interface Method
load(queryArcGISQueryParams, options?QueryOptions): Promise<FeatureDataRecord[]>

Execute the query against the service and update the internal data records, pagination is supported. When call this method, the real query is returned by getRealQueryParams .

Pagination: The pagination properties in the passed in query parameter may be not the same as the real query pagination that is sent to the service. The real query pagination is defined in the data source setting.

Parameters
ParameterType
queryArcGISQueryParams
optionsQueryOptions
Returns 
Promise<FeatureDataRecord[]>

loadAll

Interface Method
loadAll(queryArcGISQueryParams, signal?AbortSignal, progressCallback?QueryProgressCallback, options?QueryOptions): Promise<FeatureDataRecord[]>

Load all records, there is no limit to the number of the records returned in the records array response. You can abort the progress by a abort signal and can use progressCallback to get the progress and the current results.

Parameters
ParameterType
queryArcGISQueryParams
signalAbortSignal
progressCallbackQueryProgressCallback
optionsQueryOptions
Returns 
Promise<FeatureDataRecord[]>

loadById

Interface Method
loadById(idstring, refresh?boolean): Promise<FeatureDataRecord>

Load record by ID, do not consider other queries.

Parameters
ParameterType
idstring
refreshboolean
Returns 
Promise<FeatureDataRecord>

loadCount

Interface Method
loadCount(queryArcGISQueryParams, options?QueryOptions): Promise<number>

Load the records count.

Parameters
ParameterType
queryArcGISQueryParams
optionsQueryOptions
Returns 
Promise<number>

mergeQueryParams

Interface Method
mergeQueryParams(queriesArcGISQueryParams[]): ArcGISQueryParams

Merge queries by using AND , and return the merged result. If any query is undefined/null, it will be ignored.

Parameters
ParameterType
queriesArcGISQueryParams[]
Returns 
ArcGISQueryParams

query

Interface Method
query(queryArcGISQueryParams, options?QueryOptions): Promise<QueryResult>

Execute query against the service only, do NOT update the internal data records. The actual query parameters are generated by getRealQueryParams .

To query count, please use queryCount .

Parameters
ParameterType
queryArcGISQueryParams
optionsQueryOptions
Returns 
Promise<QueryResult>

queryAll

inheritedinherited
Interface Method
queryAll(queryQueryParams, signal?AbortSignal, progressCallback?QueryProgressCallback, options?QueryOptions): Promise<QueryResult>

Query all records, there is no limit to the number of the records returned in the records array response. You can abort the progress by a abort signal and can use progressCallback to get the progress and the current results.

Parameters
ParameterType
queryQueryParams
signalAbortSignal
progressCallbackQueryProgressCallback
optionsQueryOptions
Returns 
Promise<QueryResult>

queryById

Interface Method
queryById(idstring, fields?string[]): Promise<FeatureDataRecord>

Query record by ID. Will return all fields if not pass in the fields .

Parameters
ParameterType
idstring
fieldsstring[]
Returns 
Promise<FeatureDataRecord>

queryCount

Interface Method
queryCount(queryArcGISQueryParams, options?QueryOptions): Promise<QueryResult>

Query count

Parameters
ParameterType
queryArcGISQueryParams
optionsQueryOptions
Returns 
Promise<QueryResult>

queryIds

Interface Method
queryIds(queryArcGISQueryParams, options?QueryOptions): Promise<QueryResult>

Query record IDs, there is no limit to the number of the IDs returned in the ids array response.

Parameters
ParameterType
queryArcGISQueryParams
optionsQueryOptions
Returns 
Promise<QueryResult>

ready

inheritedinherited
Interface Method
ready(): Promise<any>

Ready is resolved means the data source instance is ready for use. Please note that can not make sure all child data sources are created if a set data source is ready. To make sure all child data sources are created, please use childDataSourcesReady .

Returns 
Promise<any>

selectAllLoadedRecords

inheritedinherited
Interface Method
selectAllLoadedRecords(): void

Select all loaded records.

Returns 
void

selectRecordById

Interface Method
selectRecordById(idstring, record?FeatureDataRecord): void

Select a record by ID. When select record by ID, we can pass in the record. So when the selected record is not loaded, we can add it in.

Parameters
ParameterTypeNotes
idstring

The ID to be selected. The selection will be cleared if the ID is null.

recordFeatureDataRecord
Returns 
void

selectRecordsByIds

Interface Method
selectRecordsByIds(idsstring[], records?FeatureDataRecord[]): void

Select records by IDs. When select records by IDs, we can pass in the records. So when the selected records are not loaded, we can add them in.

Parameters
ParameterTypeNotes
idsstring[]

The IDs to be selected. The selection will be cleared if the IDs are null.

recordsFeatureDataRecord[]
Returns 
void

setCountStatus

optionalinheritedinherited
Interface Method
setCountStatus(statusDataSourceStatus): void

Update data source count status.

Parameters
ParameterType
statusDataSourceStatus
Returns 
void

setDataSourceJson

inheritedinherited
Interface Method
setDataSourceJson(dsJsonIMDataSourceJson): void

Update data source JSON in data source instance

Parameters
ParameterType
dsJsonIMDataSourceJson
Returns 
void

setListenSelection

inheritedinherited
Interface Method
setListenSelection(listenboolean): void

Whether listen selected records from other data sources which are derived from the same main data source. If true, will update selected record IDs of current data source info when selecting records via other derived data sources. Will also update selected record IDs when selecting records via current data source itself. If false, won't change selected record IDs when selecting records via other derived data sources. Will update selected record IDs only when selecting records via current data source itself.

Main data source and its data views will listen selected records by default, local data source does not listen selected records by default.

Parameters
ParameterType
listenboolean
Returns 
void

setNeedRefresh

inheritedinherited
Interface Method
setNeedRefresh(needRefreshboolean): void

When the auto refresh is turned on, and the data source needRefresh status is changed, this method will be invoked.

Parameters
ParameterType
needRefreshboolean
Returns 
void

setRecords

Interface Method
setRecords(recordsFeatureDataRecord[]): void

Update the records in the data source object only, does not update the source data.

Parameters
ParameterType
recordsFeatureDataRecord[]
Returns 
void

setSourceFeatures

Interface Method
setSourceFeatures(featuresGraphic | GraphicProperties[], others?Omit<__esri.FeatureLayerProperties"source" | "fields" | "objectIdField">): Promise<void>

When current data source is created from an array of features (__esri.Graphic), will save it in an ArcGIS Maps SDK for JavaScript feature layer. This method is used to update the source data. Please note, use this method only when isDataInDataSourceInstance is not true.

Parameters
ParameterType
featuresGraphic | GraphicProperties[]
othersOmit<__esri.FeatureLayerProperties"source" | "fields" | "objectIdField">
Returns 
Promise<void>

setSourceRecords

Interface Method
setSourceRecords(recordsFeatureDataRecord[]): void

When current data source is created from an array of records ( FeatureDataRecord ), will save it in sourceRecords . These two methods are used to update or get the source data. Please note, use these two methods only when isDataInDataSourceInstance is true.

Parameters
ParameterType
recordsFeatureDataRecord[]
Returns 
void

setStatus

optionalinheritedinherited
Interface Method
setStatus(statusDataSourceStatus): void

Update data source status.

Parameters
ParameterType
statusDataSourceStatus
Returns 
void

supportReplica

Interface Method
supportReplica(): Promise<boolean>

Whether supports to create replica. See https://developers.arcgis.com/rest/services-reference/enterprise/create-replica/.

Returns 
Promise<boolean>

updateQueryParams

Interface Method
updateQueryParams(queryArcGISQueryParams, widgetIdstring): void

Update the data source query without executing the actual query.

Parameters
ParameterType
queryArcGISQueryParams
widgetIdstring
Returns 
void

updateSelectionInfo

inheritedinherited
Interface Method
updateSelectionInfo(optionsSelectOptions, triggerDataSourceDataSource, forceCheck?boolean): void

Update selected records in data source info if the current data source listens selection change (see setListenSelection ) or the current data source is the trigger data source (that is to say, select via it).

Before update info, will check whether these selected records match filters of the current data source firstly, and then only set the matched selected records to info. Will skip the check in some cases to improve performance if the forceCheck is not passed in or is false. For example, if the current data source is main data source (we suppose that main data source contains all records, no need to check). But if the forceCheck is true, won't skip the check.

Parameters
ParameterType
optionsSelectOptions
triggerDataSourceDataSource
forceCheckboolean
Returns 
void

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.