Skip to content

Interface

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

Inheritance: ArcGISQueriableDataSourceQueriableDataSourceJSAPILayerMixinItemMixin

Properties

Hide inherited properties
PropertyTypeNotes
() => 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.

DataSource

The data source which this data source derives from.

buildRecord(featureIFeature | Graphic) => FeatureDataRecord

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

changeGDBVersion(gdbVersionstring) => 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.

count
inherited
number

The total records count depends on the current query

(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.

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.

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.

() => DataRecord[]

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.

() => DataSourceStatus

Return data source count status.

() => string

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

getCurrentQueryParams(options?GetCurrentQueryParamsOptions) => 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.

(localIdstring) => 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.

(pageSizenumber, pagenumber) => number[]

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

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.

getRecord
inherited
(indexnumber) => DataRecord

Get record by index

getRecordById
inherited
(idstring) => DataRecord

Get record by ID

getRecords
inherited
() => DataRecord[]

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.

(pagenumber, pageSizenumber) => DataRecord[]

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.

(pagenumber, pageSizenumber) => DataRecord[]

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

() => DataRecord[]

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.

(excludeWidgetId?string) => 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

() => DataRecord[]

Get selected records

() => DataSource

Get selection data view

getSourceRecords() => DataRecord[]

Return the source records

() => 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.

id
inherited
string

The data source ID.

() => 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 .

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.

isInAppConfig
inherited
() => boolean

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

isLocal
inherited
boolean

True means the data source is a local data source.

() => boolean

Determine whether the data source is a selection view.

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.

load(queryArcGISQueryParams, options?QueryOptions) => Promise<DataRecord[]>

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
inherited
(queryQueryParams, signal?AbortSignal, progressCallback?QueryProgressCallback, options?QueryOptions) => Promise<DataRecord[]>

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
inherited
(idstring, refresh?boolean) => Promise<DataRecord>

Load record by ID, do not consider other queries.

loadCount(queryArcGISQueryParams, options?QueryOptions) => Promise<number>

Load the records count.

localId
inherited
string

The local ID of the data source.

mergeQueryParams(queriesArcGISQueryParams[]) => ArcGISQueryParams

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

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.

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 .

queryAll
inherited
(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.

queryById
inherited
(idstring, fields?string[]) => Promise<DataRecord>

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

queryCount(queryArcGISQueryParams, options?QueryOptions) => Promise<QueryResult>

Query count

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.

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(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.

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.

(statusDataSourceStatus) => void

Update data source count status.

(dsJsonIMDataSourceJson) => void

Update data source JSON in data source instance

(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.

(needRefreshboolean) => void

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

setRecords
inherited
(recordsDataRecord[]) => void

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

setSourceFeatures(featuresGraphic | GraphicProperties[], others?Omit<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.

setSourceRecords(recordsDataRecord[]) => void

When current data source is created from an array of records ( DataRecord ), 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
inherited
(statusDataSourceStatus) => void

Update data source status.

supportReplica() => Promise<boolean>

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

type
inherited
string

The type of the data source.

updateQueryParams(queryArcGISQueryParams, widgetIdstring) => void

Update the data source query without executing the actual query.

(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).

urlstring

The data source URL

addSourceVersion

inheritedinherited
Interface Property

addVersion

optionalinheritedinherited
Interface Property

belongToDataSource

optionalinheritedinherited
Interface Property

buildRecord

Interface Property

changeGDBVersion

Interface Property

clearRecords

optionalinheritedinherited
Interface Property

clearSourceRecords

inheritedinherited
Interface Property

count

optionalinheritedinherited
Interface Property

createJSAPILayerByDataSource

inheritedinherited
Interface Property

dataSourceManager

inheritedinherited
Interface Property

dataViewId

optionalinheritedinherited
Interface Property

destroy

inheritedinherited
Interface Property

fetchSchema

Interface Property

getAllDerivedDataSources

inheritedinherited
Interface Property

getAllLoadedRecords

inheritedinherited
Interface Property

getAutoRefreshInterval

inheritedinherited
Interface Property

getConfigQueryParams

Interface Property

getCountStatus

inheritedinherited
Interface Property

getCurrentQueryId

inheritedinherited
Interface Property

getCurrentQueryParams

Interface Property

getDataSourceJson

inheritedinherited
Interface Property

getDataViewConfig

inheritedinherited
Interface Property

getDataViews

Interface Property

getGDBVersion

Interface Property

getIdField

Interface Property

getInfo

inheritedinherited
Interface Property

getLabel

inheritedinherited
Interface Property

getListenSelection

inheritedinherited
Interface Property

getLocalDataSource

inheritedinherited
Interface Property

getLocalDataSources

inheritedinherited
Interface Property

getMaxRecordCount

inheritedinherited
Interface Property

getRealQueryPages

inheritedinherited
Interface Property

getRealQueryParams

Interface Property

getRecord

inheritedinherited
Interface Property

getRecordById

inheritedinherited
Interface Property

getRecords

inheritedinherited
Interface Property

getRecordsByPage

inheritedinherited
Interface Property

getRecordsByPageWithSelection

inheritedinherited
Interface Property

getRecordsWithSelection

inheritedinherited
Interface Property

getRemoteQueryParams

inheritedinherited
Interface Property

getRootDataSource

inheritedinherited
Interface Property

getRuntimeQueryParams

inheritedinherited
Interface Property

getSchema

inheritedinherited
Interface Property

getSelectedRecordIds

inheritedinherited
Interface Property

getSelectedRecordIndexes

inheritedinherited
Interface Property

getSelectedRecords

inheritedinherited
Interface Property

getSelectionDataView

inheritedinherited
Interface Property

getSourceRecords

Interface Property

getSourceVersion

inheritedinherited
Interface Property

getStatus

inheritedinherited
Interface Property

getVersion

inheritedinherited
Interface Property

id

inheritedinherited
Interface Property

isDataSourceSet

inheritedinherited
Interface Property

isDataView

inheritedinherited
Interface Property

isInAppConfig

inheritedinherited
Interface Property

isLocal

inheritedinherited
Interface Property

isSelectionView

inheritedinherited
Interface Property

isSqlCaseSensitive

inheritedinherited
Interface Property

layer

optional
Interface Property

load

Interface Property

loadAll

inheritedinherited
Interface Property

loadById

inheritedinherited
Interface Property

loadCount

Interface Property

localId

optionalinheritedinherited
Interface Property

mergeQueryParams

Interface Property

order

optionalinheritedinherited
Interface Property

parentDataSource

inheritedinherited
Interface Property

query

Interface Property

queryAll

inheritedinherited
Interface Property

queryById

inheritedinherited
Interface Property

queryCount

Interface Property

queryIds

Interface Property

ready

inheritedinherited
Interface Property

selectAllLoadedRecords

inheritedinherited
Interface Property

selectRecordById

Interface Property

selectRecordsByIds

Interface Property

setCountStatus

optionalinheritedinherited
Interface Property

setDataSourceJson

inheritedinherited
Interface Property

setListenSelection

inheritedinherited
Interface Property

setNeedRefresh

inheritedinherited
Interface Property

setRecords

inheritedinherited
Interface Property

setSourceFeatures

Interface Property

setSourceRecords

Interface Property

setStatus

optionalinheritedinherited
Interface Property

supportReplica

Interface Property

type

inheritedinherited
Interface Property

updateQueryParams

Interface Property

updateSelectionInfo

inheritedinherited
Interface Property

url

optional
Interface Property

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