Skip To Content ArcGIS for Developers Sign In Dashboard

ServiceGeodatabase QML Type

A container for a collection of ServiceFeatureTable instances connected to a feature service. More...

Import Statement: import Esri.ArcGISRuntime 100.9
Since: Esri.ArcGISRuntime 100.9
Inherits:

Object

Properties

Signals

Methods

Detailed Description

A ServiceGeodatabase connects to a feature service as a whole, grouping together ServiceFeatureTable instances for related records queries, connecting to a version in a branch-versioned service, and managing edits for all tables.

See also Loadable.

Property Documentation

applyEditsResult : list<FeatureTableEditResult>

The result returned when the asynchronous applyEdits operation completes (read-only).


applyEditsStatus : Enums.TaskStatus

The current status of the asynchronous applyEditsStatus operation (read-only).


connectedTables : list<ServiceFeatureTable>

The collection of feature tables managed by the ServiceGeodatabase (read-only).


createVersionResult : ServiceVersionInfo

The result returned when the asynchronous createVersion operation completes (read-only).


createVersionStatus : Enums.TaskStatus

The current status of the asynchronous createVersion operation (read-only).


[default] credential : Credential

The Credential for authenticating against a secured service.

Only applicable if using an online service that is secured.


defaultVersionName : string

The name of the default version (read-only).


fetchVersionsResults : list<ServiceVersionInfo>

The result returned when the asynchronous fetchVersions operation completes (read-only).


fetchVersionsStatus : Enums.TaskStatus

The current status of the asynchronous fetchVersions operation (read-only).


isSupportsBranchVersioning : bool

Returns whether the service supports branch versioning (read-only).


loadError : Error

Returns the load error (read-only).

Note: Load errors are also reported on the error property and emit the errorChanged signal.

See also Loadable.


loadStatus : Enums.LoadStatus

Returns the load status (read-only).

See also Loadable and Enums.LoadStatus.


[default] requestConfiguration : RequestConfiguration

The configuration parameters used for network requests sent by this task.


serviceInfo : ArcGISFeatureServiceInfo

The metadata of the service this object is connected to (read-only).


switchVersionStatus : Enums.TaskStatus

The current status of the asynchronous switchVersion operation (read-only).


undoLocalEditsStatus : Enums.TaskStatus

The current status of the asynchronous undoLocalEdits operation (read-only).


url : url

The URL of the service to connect to.

You cannot change the url to the service geodatabase after the instance is already loaded.


versionName : string

The name of the version the ServiceGeodatabase is currently connected to.

This property can only be used to set the initial version name prior to loading.

After the ServiceGeodatabase is loaded, you must use the switchVersion asynchronous method.


Signal Documentation

applyEditsStatusChanged()

Emitted when the applyEditsStatus property changes.

Note: The corresponding handler is onApplyEditsStatusChanged.


createVersionStatusChanged()

Emitted when the createVersionStatus property changes.

Note: The corresponding handler is onCreateVersionStatusChanged.


credentialChanged()

Emitted when the credential property of this ServiceGeodatabase changes.

Note: The corresponding handler is onCredentialChanged.


fetchVersionsStatusChanged()

Emitted when the fetchVersionsStatus property changes.

Note: The corresponding handler is onFetchVersionsStatusChanged.


loadErrorChanged()

Emitted when the loadError property of this ServiceGeodatabase changes.

Note: Load errors are also reported on the error property and emit the errorChanged signal.

Note: The corresponding handler is onLoadErrorChanged.

See also Loadable and Object.


loadStatusChanged()

Emitted when the loadStatus property of this ServiceGeodatabase changes.

Note: The corresponding handler is onLoadStatusChanged.

See also Loadable.


requestConfigurationChanged()

Emitted when the requestConfiguration property changes.

Note: The corresponding handler is onRequestConfigurationChanged.


switchVersionStatusChanged()

Emitted when the switchVersionStatus property changes.

Note: The corresponding handler is onSwitchVersionStatusChanged.


undoLocalEditsStatusChanged()

Emitted when the undoLocalEditsStatus property changes.

Note: The corresponding handler is onUndoLocalEditsStatusChanged.


urlChanged()

Emitted when the url property changes.

Note: The corresponding handler is onUrlChanged.


versionNameChanged()

Emitted when the versionName property changes.

Note: The corresponding handler is onVersionNameChanged.


Method Documentation

string applyEdits()

Applies all local edits in all tables to the service.

The edits in all tables are applied to the feature service in a call. This is more efficient than applying edits one ServiceFeatureTable at a time.

Returns a task ID that can be used to cancel the applyEdits task.


bool cancelTask(taskId)

Cancels the task with the ID taskId.

Returns false if the task cannot be cancelled or there is no task with the specified id taskId.

See also Cancelable.


string createVersion(parameters)

Creates a new version in the service based on the default version.

  • parameters - The properties of the new version.

Branch versioning requires that the default version always be the ancestor of all other versions.

If the service isn't branch-versioned or the parameters do not include a name, an error occurs.

Returns a task ID that can be used to cancel the createVersion task.

See also Enums.TaskStatus, Cancelable, and errorChanged.


string fetchVersions()

Gets a list of all versions on the service.

If the service isn't branch-versioned, an error occurs.

Returns a task ID that can be used to cancel the fetchVersions task.

See also Enums.TaskStatus, Cancelable, and errorChanged.


bool hasLocalEdits()

Returns whether any of the tables in the ServiceGeodatabase have unapplied edits.


string switchVersion(versionName)

Switches all connected feature tables to the new version.

  • versionName - The name of the version to connect to.

An error is emitted if:

Check the result of hasLocalEdits before attempting to switch versions, to make sure all changes are saved to the service or discarded from the local cache. Use the ServiceGeodatabase::applyEdits() or ServiceGeodatabase::undoLocalEdits() methods as appropriate to save or discard changes before switching versions. Returns a string representing the task ID of the asynchronous task.

Returns a task ID that can be used to cancel the switchVersion task.

See also Enums.TaskStatus, Cancelable, and errorChanged.


ServiceFeatureTable table(layerId)

Returns a service feature table object from the ID of a layer or table in the service.

  • layerId - The layer id for which to create the table.

If a table instance for the layer already exists in ServiceGeodatabase::connectedTables, the existing object will be returned. Otherwise, a new ServiceFeatureTable will be created.

If no table or layer exists in the service with the given ID, an error occurs.

Note: The underlying Runtime property is represented as a 64-bit integer type. See Accessing 64-bit integer properties from QML.

See also errorChanged.


string undoLocalEdits()

Undos all of the local edits in all the tables.

Returns a task ID that can be used to cancel the undoLocalEdits task.



Feedback on this topic?