Interface
OrientedImageryLayerDataSource  is created from FeatureServer.
Properties
| Property | Type | Notes | 
|---|---|---|
| addSourceVersioninherited | () => void | When current data source is created from an array of records, it will be saved in   | 
| addVersioninherited | () => void | Update data source version. | 
| belongToDataSourceinherited | DataSource | The data source which this data source derives from. | 
| buildRecordinherited | (feature: IFeature | Graphic) => FeatureDataRecord | Builds a data record only -- does not add the record into data source. | 
| changeGDBVersioninherited | (gdbVersion: string) => void | Change the layer GDB version. | 
| clearRecordsinherited | () => 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. | 
| clearSourceRecordsinherited | () => void | Clear both sourceRecords and loaded records. Both source version and version in data source info will be updated. | 
| countinherited | number | The total records count depends on the current query | 
| createJSAPILayerByDataSourceinherited | (dataSource?: DataSource, useDataSourceQueryParams?: boolean, throwError?: boolean) => Promise<Layer | ArcGISSubLayer> | Default   | 
| dataSourceManagerinherited | DataSourceManager | The data source manager, which is used to manage the data source, including create/get/destroy the data source instance. | 
| dataViewIdinherited | string | The data view ID configured in JSON. | 
| destroyinherited | () => void | Destroy the data source. | 
| fetchSchemainherited | () => Promise<IMDataSourceSchema> | Fetch the data schema from an actual data source. If it's a statistic data source, the schema will not be fetched. | 
| getAllDerivedDataSourcesinherited | () => DataSource[] | Return the derived data views and local data sources. | 
| getAllLoadedRecordsinherited | () => DataRecord[] | Get records of all the loaded pages. | 
| getAutoRefreshIntervalinherited | () => number | If the return value > 0, auto refresh is enabled. | 
| getConfigQueryParamsinherited | () => ArcGISQueryParams | Get the user config query parameters. | 
| getCountStatusinherited | () => DataSourceStatus | Return data source count status. | 
| getCurrentQueryIdinherited | () => string | Get the current loaded record id, which is used in   | 
| getCurrentQueryParamsinherited | (options?: GetCurrentQueryParamsOptions) => ArcGISQueryParams | Get the current query parameters. The current query parameters contain all applied queries. | 
| getDataSourceJsoninherited | () => IMDataSourceJson | The data source JSON object in app config. | 
| getDataViewConfiginherited | () => IMDataViewJson | Return the config of the current data source. | 
| getDataViewsinherited | () => ArcGISQueriableDataSource[] | Override parent interface to get correct type. | 
| getGDBVersioninherited | () => string | Return the current GDB version. | 
| getIdFieldinherited | () => string | Return the data source ID field. | 
| getInfoinherited | () => IMDataSourceInfo | Return the data source info in redux store. | 
| getLabelinherited | () => string | Return data source label. | 
| getListenSelectioninherited | () => boolean | Return whether listen selection. | 
| getLocalDataSourceinherited | (localId: string) => DataSource | Get local data source by local ID. | 
| getLocalDataSourcesinherited | () => DataSource[] | Return all local data sources created from a main data source or data view. | 
| getMaxRecordCountinherited | () => number | Null means there is no record count limit, and will return all records from the service. | 
| getRealQueryPagesinherited | (pageSize: number, page: number) => number[] | Get real query page depends on the widget's request page. | 
| getRealQueryParamsinherited | (query: any, 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. | 
| getRecordinherited | (index: number) => DataRecord | Get record by index | 
| getRecordByIdinherited | (id: string) => DataRecord | Get record by ID | 
| getRecordsinherited | () => 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. | 
| getRecordsByPageinherited | (page: number, pageSize: number) => 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. | 
| getRecordsByPageWithSelectioninherited | (page: number, pageSize: number) => 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. | 
| getRecordsWithSelectioninherited | () => 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. | 
| getRemoteQueryParamsinherited | () => QueryParams | Get the query parameters configured in remote (not in exb). | 
| getRootDataSourceinherited | () => DataSource | Return the root data source. | 
| getRuntimeQueryParamsinherited | (excludeWidgetId?: string) => QueryParams | Get the queries applied in runtime. If the excludeWidgetId is passed in, the queries of this widget will be excluded. | 
| getSchemainherited | () => 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. | 
| getSelectedRecordIdsinherited | () => string[] | Get selected record IDs | 
| getSelectedRecordIndexesinherited | () => number[] | Get selected record indexes | 
| getSelectedRecordsinherited | () => DataRecord[] | Get selected records | 
| getSelectionDataViewinherited | () => DataSource | Get selection data view | 
| getSourceRecordsinherited | () => DataRecord[] | Return the source records | 
| getSourceVersioninherited | () => number | When current data source is created from an array of records, it will be saved in   | 
| getStatusinherited | () => DataSourceStatus | Return data source status. | 
| getVersioninherited | () => number | Return data source version. | 
| idinherited | string | The data source ID. | 
| isDataSourceSetinherited | () => thisisDataSource & SetDataSourceMixin | Whether a data source contains child data sources.
A set data source won't create all its child data sources when   | 
| isDataViewinherited | 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. | 
| isInAppConfiginherited | () => boolean | Return whether the data source is added in builder and is saved in app config. | 
| isLocalinherited | boolean | True means the data source is a local data source. | 
| isSelectionViewinherited | () => boolean | Determine whether the data source is a selection view. | 
| isSqlCaseSensitiveinherited | boolean | Whether the data source is case-sensitive when doing query by SQL clauses. | 
| loadinherited | (query: ArcGISQueryParams, 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   | 
| loadAllinherited | (query: QueryParams, signal?: AbortSignal, progressCallback?: QueryProgressCallback, options?: QueryOptions) => Promise<DataRecord[]> | Load all records, there is no limit to the number of the records returned in the   | 
| loadByIdinherited | (id: string, refresh?: boolean) => Promise<DataRecord> | Load record by ID, do not consider other queries. | 
| loadCountinherited | (query: ArcGISQueryParams, options?: QueryOptions) => Promise<number> | Load the records count. | 
| localIdinherited | string | The local ID of the data source. | 
| mergeQueryParamsinherited | (queries: ArcGISQueryParams[]) => ArcGISQueryParams | Merge queries by using   | 
| orderinherited | number | Order in the parent data source. | 
| parentDataSourceinherited | DataSource & SetDataSourceMixin | The parent data source of this data source, mull means it's a root data source. | 
| queryinherited | (query: ArcGISQueryParams, options?: QueryOptions) => Promise<QueryResult> | Execute query against the service only, do NOT update the internal data records.
The actual query parameters are generated by   | 
| queryAllinherited | (query: QueryParams, signal?: AbortSignal, progressCallback?: QueryProgressCallback, options?: QueryOptions) => Promise<QueryResult> | Query all records, there is no limit to the number of the records returned in the   | 
| queryByIdinherited | (id: string, fields?: string[]) => Promise<DataRecord> | Query record by ID.
Will return all fields if not pass in the   | 
| queryCountinherited | (query: ArcGISQueryParams, options?: QueryOptions) => Promise<QueryResult> | Query count | 
| queryIdsinherited | (query: ArcGISQueryParams, options?: QueryOptions) => Promise<QueryResult> | Query record IDs, there is no limit to the number of the IDs returned in the   | 
| readyinherited | () => 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   | 
| selectAllLoadedRecordsinherited | () => void | Select all loaded records. | 
| selectRecordByIdinherited | (id: string, 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. | 
| selectRecordsByIdsinherited | (ids: string[], 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. | 
| setCountStatusinherited | (status: DataSourceStatus) => void | Update data source count status. | 
| setDataSourceJsoninherited | (dsJson: IMDataSourceJson) => void | Update data source JSON in data source instance | 
| setListenSelectioninherited | (listen: boolean) => 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. | 
| setNeedRefreshinherited | (needRefresh: boolean) => void | When the auto refresh is turned on, and the data source needRefresh status is changed, this method will be invoked. | 
| setRecordsinherited | (records: DataRecord[]) => void | Update the records in the data source object only, does not update the source data. | 
| setSourceFeaturesinherited | (features: Graphic | 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   | 
| setSourceRecordsinherited | (records: DataRecord[]) => void | When current data source is created from an array of records (  | 
| setStatusinherited | (status: DataSourceStatus) => void | Update data source status. | 
| supportReplicainherited | () => Promise<boolean> | Whether supports to create replica. See https://developers.arcgis.com/rest/services-reference/enterprise/create-replica/. | 
| type | OrientedImageryLayer | The type of the data source. | 
| updateQueryParamsinherited | (query: ArcGISQueryParams, widgetId: string) => void | Update the data source query without executing the actual query. | 
| updateSelectionInfoinherited | (options: SelectOptions, triggerDataSource: DataSource, forceCheck?: boolean) => void | Update selected records in data source info if the current data source listens selection change (see   | 
| urlinherited | string | The data source URL | 
addSourceVersion
addSourceVersion: () => voidWhen 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.
Type declaration
function(): voidReturns
voidaddVersion
addVersion: () => voidUpdate data source version.
Type declaration
function(): voidReturns
voidbelongToDataSource
belongToDataSource: DataSourceThe data source which this data source derives from.
buildRecord
buildRecord: (feature: IFeature | Graphic) => FeatureDataRecordBuilds a data record only -- does not add the record into data source.
Type declaration
function(feature: IFeature | Graphic): FeatureDataRecordParameters
| Parameter | Type | 
|---|---|
| feature | IFeature | Graphic | 
Returns
FeatureDataRecordchangeGDBVersion
changeGDBVersion: (gdbVersion: string) => voidChange the layer GDB version.
Type declaration
function(gdbVersion: string): voidParameters
| Parameter | Type | 
|---|---|
| gdb | string | 
Returns
voidclearRecords
clearRecords: () => voidThis 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.
Type declaration
function(): voidReturns
voidclearSourceRecords
clearSourceRecords: () => voidClear both sourceRecords and loaded records. Both source version and version in data source info will be updated.
Type declaration
function(): voidReturns
voidcount
count: numberThe total records count depends on the current query
createJSAPILayerByDataSource
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.
Type declaration
function(dataSource?: DataSource, useDataSourceQueryParams?: boolean, throwError?: boolean): Promise<Layer | ArcGISSubLayer>Parameters
| Parameter | Type | 
|---|---|
| data | DataSource | 
| use | boolean | 
| throw | boolean | 
Returns
Promise<Layer | ArcGISSubLayer>dataSourceManager
dataSourceManager: DataSourceManagerThe data source manager, which is used to manage the data source, including create/get/destroy the data source instance.
dataViewId
dataViewId: stringThe data view ID configured in JSON.
destroy
destroy: () => voidDestroy the data source.
Type declaration
function(): voidReturns
voidfetchSchema
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.
Type declaration
function(): Promise<IMDataSourceSchema>Returns
Promise<IMDataSourceSchema>getAllDerivedDataSources
getAllDerivedDataSources: () => DataSource[]Return the derived data views and local data sources.
Type declaration
function(): DataSource[]Returns
DataSource[]getAllLoadedRecords
getAllLoadedRecords: () => DataRecord[]Get records of all the loaded pages.
Type declaration
function(): DataRecord[]Returns
DataRecord[]getAutoRefreshInterval
getAutoRefreshInterval: () => numberIf the return value > 0, auto refresh is enabled.
Type declaration
function(): numberReturns
numbergetConfigQueryParams
getConfigQueryParams: () => ArcGISQueryParamsGet the user config query parameters.
Type declaration
function(): ArcGISQueryParamsReturns
ArcGISQueryParamsgetCountStatus
getCountStatus: () => DataSourceStatusReturn data source count status.
Type declaration
function(): DataSourceStatusReturns
DataSourceStatusgetCurrentQueryId
getCurrentQueryId: () => stringGet the current loaded record id, which is used in  loadById  method.
Type declaration
function(): stringReturns
stringgetCurrentQueryParams
getCurrentQueryParams: (options?: GetCurrentQueryParamsOptions) => ArcGISQueryParamsGet the current query parameters. The current query parameters contain all applied queries.
Type declaration
function(options?: GetCurrentQueryParamsOptions): ArcGISQueryParamsParameters
| Parameter | Type | 
|---|---|
| options | GetCurrentQueryParamsOptions | 
Returns
ArcGISQueryParamsgetDataSourceJson
getDataSourceJson: () => IMDataSourceJsonThe data source JSON object in app config.
Type declaration
function(): IMDataSourceJsonReturns
IMDataSourceJsongetDataViewConfig
getDataViewConfig: () => IMDataViewJsonReturn the config of the current data source.
Type declaration
function(): IMDataViewJsonReturns
IMDataViewJsongetDataViews
getDataViews: () => ArcGISQueriableDataSource[]Override parent interface to get correct type.
Type declaration
function(): ArcGISQueriableDataSource[]Returns
ArcGISQueriableDataSource[]getGDBVersion
getGDBVersion: () => stringReturn the current GDB version.
Type declaration
function(): stringReturns
stringgetIdField
getIdField: () => stringReturn the data source ID field.
Type declaration
function(): stringReturns
stringgetInfo
getInfo: () => IMDataSourceInfoReturn the data source info in redux store.
Type declaration
function(): IMDataSourceInfoReturns
IMDataSourceInfogetLabel
getLabel: () => stringReturn data source label.
Type declaration
function(): stringReturns
stringgetListenSelection
getListenSelection: () => booleanReturn whether listen selection.
Type declaration
function(): booleanReturns
booleangetLocalDataSource
getLocalDataSource: (localId: string) => DataSourceGet local data source by local ID.
Type declaration
function(localId: string): DataSourceParameters
| Parameter | Type | 
|---|---|
| local | string | 
Returns
DataSourcegetLocalDataSources
getLocalDataSources: () => DataSource[]Return all local data sources created from a main data source or data view.
Type declaration
function(): DataSource[]Returns
DataSource[]getMaxRecordCount
getMaxRecordCount: () => numberNull means there is no record count limit, and will return all records from the service.
Type declaration
function(): numberReturns
numbergetRealQueryPages
getRealQueryPages: (pageSize: number, page: number) => number[]Get real query page depends on the widget's request page.
Type declaration
function(pageSize: number, page: number): number[]Parameters
| Parameter | Type | 
|---|---|
| page | number | 
| page | number | 
Returns
number[]getRealQueryParams
getRealQueryParams: (query: any, flag: "load" | "query", options?: QueryOptions) => ArcGISQueryParamsWhen 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.
Type declaration
function(query: any, flag: "load" | "query", options?: QueryOptions): ArcGISQueryParamsParameters
| Parameter | Type | 
|---|---|
| query | any | 
| flag | "load" | "query" | 
| options | QueryOptions | 
Returns
ArcGISQueryParamsgetRecord
getRecord: (index: number) => DataRecordGet record by index
Type declaration
function(index: number): DataRecordParameters
| Parameter | Type | 
|---|---|
| index | number | 
Returns
DataRecordgetRecordById
getRecordById: (id: string) => DataRecordGet record by ID
Type declaration
function(id: string): DataRecordParameters
| Parameter | Type | 
|---|---|
| id | string | 
Returns
DataRecordgetRecords
getRecords: () => 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.
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.
Type declaration
function(): DataRecord[]Returns
DataRecord[]getRecordsByPage
getRecordsByPage: (page: number, pageSize: number) => 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.
Type declaration
function(page: number, pageSize: number): DataRecord[]Parameters
| Parameter | Type | 
|---|---|
| page | number | 
| page | number | 
Returns
DataRecord[]getRecordsByPageWithSelection
getRecordsByPageWithSelection: (page: number, pageSize: number) => 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.
Type declaration
function(page: number, pageSize: number): DataRecord[]Parameters
| Parameter | Type | 
|---|---|
| page | number | 
| page | number | 
Returns
DataRecord[]getRecordsWithSelection
getRecordsWithSelection: () => 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.
Type declaration
function(): DataRecord[]Returns
DataRecord[]getRemoteQueryParams
getRemoteQueryParams: () => QueryParamsGet the query parameters configured in remote (not in exb).
Type declaration
function(): QueryParamsReturns
QueryParamsgetRootDataSource
getRootDataSource: () => DataSourceReturn the root data source.
Type declaration
function(): DataSourceReturns
DataSourcegetRuntimeQueryParams
getRuntimeQueryParams: (excludeWidgetId?: string) => QueryParamsGet the queries applied in runtime. If the excludeWidgetId is passed in, the queries of this widget will be excluded.
Type declaration
function(excludeWidgetId?: string): QueryParamsParameters
| Parameter | Type | 
|---|---|
| exclude | string | 
Returns
QueryParamsgetSchema
getSchema: () => IMDataSourceSchemaThe 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.
Type declaration
function(): IMDataSourceSchemaReturns
IMDataSourceSchemagetSelectedRecordIds
getSelectedRecordIds: () => string[]Get selected record IDs
Type declaration
function(): string[]Returns
string[]getSelectedRecordIndexes
getSelectedRecordIndexes: () => number[]Get selected record indexes
Type declaration
function(): number[]Returns
number[]getSelectedRecords
getSelectedRecords: () => DataRecord[]Get selected records
Type declaration
function(): DataRecord[]Returns
DataRecord[]getSelectionDataView
getSelectionDataView: () => DataSourceGet selection data view
Type declaration
function(): DataSourceReturns
DataSourcegetSourceRecords
getSourceRecords: () => DataRecord[]Return the source records
Type declaration
function(): DataRecord[]Returns
DataRecord[]getSourceVersion
getSourceVersion: () => numberWhen current data source is created from an array of records, it will be saved in  sourceRecords .
Return the version of  sourceRecords .
Type declaration
function(): numberReturns
numbergetStatus
getStatus: () => DataSourceStatusReturn data source status.
Type declaration
function(): DataSourceStatusReturns
DataSourceStatusgetVersion
getVersion: () => numberReturn data source version.
Type declaration
function(): numberReturns
numberisDataSourceSet
isDataSourceSet: () => thisisDataSource & SetDataSourceMixinWhether 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 .
Type declaration
function(): thisisDataSource & SetDataSourceMixinReturns
thisisDataSource & SetDataSourceMixinisDataView
isDataView: booleanTrue 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
isInAppConfig: () => booleanReturn whether the data source is added in builder and is saved in app config.
Type declaration
function(): booleanReturns
booleanisLocal
isLocal: booleanTrue means the data source is a local data source.
isSelectionView
isSelectionView: () => booleanDetermine whether the data source is a selection view.
Type declaration
function(): booleanReturns
booleanisSqlCaseSensitive
isSqlCaseSensitive: booleanWhether the data source is case-sensitive when doing query by SQL clauses.
load
load: (query: ArcGISQueryParams, 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 .
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.
Type declaration
function(query: ArcGISQueryParams, options?: QueryOptions): Promise<DataRecord[]>Parameters
| Parameter | Type | 
|---|---|
| query | ArcGISQueryParams | 
| options | QueryOptions | 
Returns
Promise<DataRecord[]>loadAll
loadAll: (query: QueryParams, 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.
Type declaration
function(query: QueryParams, signal?: AbortSignal, progressCallback?: QueryProgressCallback, options?: QueryOptions): Promise<DataRecord[]>Parameters
| Parameter | Type | 
|---|---|
| query | QueryParams | 
| signal | AbortSignal | 
| progress | QueryProgressCallback | 
| options | QueryOptions | 
Returns
Promise<DataRecord[]>loadById
loadById: (id: string, refresh?: boolean) => Promise<DataRecord>Load record by ID, do not consider other queries.
Type declaration
function(id: string, refresh?: boolean): Promise<DataRecord>Parameters
| Parameter | Type | 
|---|---|
| id | string | 
| refresh | boolean | 
Returns
Promise<DataRecord>loadCount
loadCount: (query: ArcGISQueryParams, options?: QueryOptions) => Promise<number>Load the records count.
Type declaration
function(query: ArcGISQueryParams, options?: QueryOptions): Promise<number>Parameters
| Parameter | Type | 
|---|---|
| query | ArcGISQueryParams | 
| options | QueryOptions | 
Returns
Promise<number>mergeQueryParams
mergeQueryParams: (queries: ArcGISQueryParams[]) => ArcGISQueryParamsMerge queries by using  AND , and return the merged result.
If any query is undefined/null, it will be ignored.
Type declaration
function(queries: ArcGISQueryParams[]): ArcGISQueryParamsParameters
| Parameter | Type | 
|---|---|
| queries | ArcGISQueryParams[] | 
Returns
ArcGISQueryParamsparentDataSource
parentDataSource: DataSource & SetDataSourceMixinThe parent data source of this data source, mull means it's a root data source.
query
query: (query: ArcGISQueryParams, 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 .
Type declaration
function(query: ArcGISQueryParams, options?: QueryOptions): Promise<QueryResult>Parameters
| Parameter | Type | 
|---|---|
| query | ArcGISQueryParams | 
| options | QueryOptions | 
Returns
Promise<QueryResult>queryAll
queryAll: (query: QueryParams, 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.
Type declaration
function(query: QueryParams, signal?: AbortSignal, progressCallback?: QueryProgressCallback, options?: QueryOptions): Promise<QueryResult>Parameters
| Parameter | Type | 
|---|---|
| query | QueryParams | 
| signal | AbortSignal | 
| progress | QueryProgressCallback | 
| options | QueryOptions | 
Returns
Promise<QueryResult>queryById
queryById: (id: string, fields?: string[]) => Promise<DataRecord>Query record by ID.
Will return all fields if not pass in the  fields .
Type declaration
function(id: string, fields?: string[]): Promise<DataRecord>Parameters
| Parameter | Type | 
|---|---|
| id | string | 
| fields | string[] | 
Returns
Promise<DataRecord>queryCount
queryCount: (query: ArcGISQueryParams, options?: QueryOptions) => Promise<QueryResult>Query count
Type declaration
function(query: ArcGISQueryParams, options?: QueryOptions): Promise<QueryResult>Parameters
| Parameter | Type | 
|---|---|
| query | ArcGISQueryParams | 
| options | QueryOptions | 
Returns
Promise<QueryResult>queryIds
queryIds: (query: ArcGISQueryParams, options?: QueryOptions) => Promise<QueryResult>Query record IDs, there is no limit to the number of the IDs returned in the  ids  array response.
Type declaration
function(query: ArcGISQueryParams, options?: QueryOptions): Promise<QueryResult>Parameters
| Parameter | Type | 
|---|---|
| query | ArcGISQueryParams | 
| options | QueryOptions | 
Returns
Promise<QueryResult>ready
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 .
Type declaration
function(): Promise<any>Returns
Promise<any>selectAllLoadedRecords
selectAllLoadedRecords: () => voidSelect all loaded records.
Type declaration
function(): voidReturns
voidselectRecordById
selectRecordById: (id: string, record?: FeatureDataRecord) => voidSelect 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.
Type declaration
function(id: string, record?: FeatureDataRecord): voidParameters
| Parameter | Type | Notes | 
|---|---|---|
| id | string | The ID to be selected. The selection will be cleared if the ID is null. | 
| record | FeatureDataRecord | 
Returns
voidselectRecordsByIds
selectRecordsByIds: (ids: string[], records?: FeatureDataRecord[]) => voidSelect 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.
Type declaration
function(ids: string[], records?: FeatureDataRecord[]): voidParameters
| Parameter | Type | Notes | 
|---|---|---|
| ids | string[] | The IDs to be selected. The selection will be cleared if the IDs are null. | 
| records | FeatureDataRecord[] | 
Returns
voidsetCountStatus
setCountStatus: (status: DataSourceStatus) => voidUpdate data source count status.
Type declaration
function(status: DataSourceStatus): voidParameters
| Parameter | Type | 
|---|---|
| status | DataSourceStatus | 
Returns
voidsetDataSourceJson
setDataSourceJson: (dsJson: IMDataSourceJson) => voidUpdate data source JSON in data source instance
Type declaration
function(dsJson: IMDataSourceJson): voidParameters
| Parameter | Type | 
|---|---|
| ds | IMDataSourceJson | 
Returns
voidsetListenSelection
setListenSelection: (listen: boolean) => voidWhether 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.
Type declaration
function(listen: boolean): voidParameters
| Parameter | Type | 
|---|---|
| listen | boolean | 
Returns
voidsetNeedRefresh
setNeedRefresh: (needRefresh: boolean) => voidWhen the auto refresh is turned on, and the data source needRefresh status is changed, this method will be invoked.
Type declaration
function(needRefresh: boolean): voidParameters
| Parameter | Type | 
|---|---|
| need | boolean | 
Returns
voidsetRecords
setRecords: (records: DataRecord[]) => voidUpdate the records in the data source object only, does not update the source data.
Type declaration
function(records: DataRecord[]): voidParameters
| Parameter | Type | 
|---|---|
| records | DataRecord[] | 
Returns
voidsetSourceFeatures
setSourceFeatures: (features: Graphic | 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.
Type declaration
function(features: Graphic | GraphicProperties[], others?: Omit<FeatureLayerProperties, "source" | "fields" | "objectIdField">): Promise<void>Parameters
| Parameter | Type | 
|---|---|
| features | Graphic | GraphicProperties[] | 
| others | Omit<FeatureLayerProperties, "source" | "fields" | "objectIdField"> | 
Returns
Promise<void>setSourceRecords
setSourceRecords: (records: DataRecord[]) => voidWhen 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.
Type declaration
function(records: DataRecord[]): voidParameters
| Parameter | Type | 
|---|---|
| records | DataRecord[] | 
Returns
voidsetStatus
setStatus: (status: DataSourceStatus) => voidUpdate data source status.
Type declaration
function(status: DataSourceStatus): voidParameters
| Parameter | Type | 
|---|---|
| status | DataSourceStatus | 
Returns
voidsupportReplica
supportReplica: () => Promise<boolean>Whether supports to create replica. See https://developers.arcgis.com/rest/services-reference/enterprise/create-replica/.
Type declaration
function(): Promise<boolean>Returns
Promise<boolean>updateQueryParams
updateQueryParams: (query: ArcGISQueryParams, widgetId: string) => voidUpdate the data source query without executing the actual query.
Type declaration
function(query: ArcGISQueryParams, widgetId: string): voidParameters
| Parameter | Type | 
|---|---|
| query | ArcGISQueryParams | 
| widget | string | 
Returns
voidupdateSelectionInfo
updateSelectionInfo: (options: SelectOptions, triggerDataSource: DataSource, forceCheck?: boolean) => voidUpdate 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.
Type declaration
function(options: SelectOptions, triggerDataSource: DataSource, forceCheck?: boolean): voidParameters
| Parameter | Type | 
|---|---|
| options | SelectOptions | 
| trigger | DataSource | 
| force | boolean | 
Returns
void