ServiceGeodatabase QML Type

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

Import Statement: import Esri.ArcGISRuntime 100.15
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.

This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.

TypeDefault Property
Credentialcredential
RequestConfigurationrequestConfiguration
PortalItemportalItem (since Esri.ArcGISRuntime 100.12)

ServiceGeodatabase can be created with a variety of property combinations. Properties are grouped based on whether you use a url or portalItem to create the Service Geodatabase."

If you want to use a url, these are the properties you can set.

Propertyrequired or optional
urlrequired
credentialoptional
versionNameoptional
sessionTypeoptional

If you want to use a portalItem, these are the properties you can set. In this scenario authentication should be handled by the Portal if required.

Propertyrequired or optional
portalItemrequired
versionNameoptional
sessionTypeoptional

See also Loadable, Cancelable, and RemoteResource.

Property Documentation

applyEditsResults : 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).


closeStatus : Enums.TaskStatus

Returns the status of the close method (read-only).

This property was introduced in Esri.ArcGISRuntime 100.10.


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


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.


portalItem : PortalItem

The PortalItem which the ServiceGeodatabase was created from.

This property was introduced in Esri.ArcGISRuntime 100.12.


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


sessionType : Enums.FeatureServiceSessionType

The type of read and edit sessions to use when working with the service.

The default value is Enums.FeatureServiceSessionTypeTransient.

If the feature service this ServiceGeodatabase references is not branch-versioned, only Enums.FeatureServiceSessionTypeTransient is supported.

If using Enums.FeatureServiceSessionTypePersistent, it is important to call close before destruction.

Cannot be set after the ServiceGeodatabase is loaded. When the ServiceGeodatabase is created by loading a Map, use LoadSettings to control the session type.

This property was introduced in Esri.ArcGISRuntime 100.10.

See also LoadSettings::featureServiceSessionType.


supportsBranchVersioning : bool

Returns whether the service supports branch versioning (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.


closeStatusChanged()

Emitted when the closeStatus property changes.

Note: The corresponding handler is onCloseStatusChanged.

This signal was introduced in Esri.ArcGISRuntime 100.10.


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.


portalItemChanged()

Emitted when the portalItem property changes.

Note: The corresponding handler is onPortalItemChanged.

This signal was introduced in Esri.ArcGISRuntime 100.12.


requestConfigurationChanged()

Emitted when the requestConfiguration property changes.

Note: The corresponding handler is onRequestConfigurationChanged.


sessionTypeChanged()

Emitted when the sessionType property changes.

Note: The corresponding handler is onSessionTypeChanged.

This signal was introduced in Esri.ArcGISRuntime 100.10.


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(string taskId)

Cancels the task with the ID taskId.

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

See also Cancelable.


string close()

Closes this service geodatabase.

A request to stop any active reading or editing sessions with the feature service is sent, and after this asynchronous process is complete, this service geodatabase will be closed.

Before calling this method, there should be no references to any related data. For example, terminate fetch versions, create version, switch, apply or undo edits, remove feature layers, and release tables from map.

After calling this method, accessing this service geodatabase or any of its connected tables will fail.

Closing this service geodatabase is not necessary if it has not been loaded.

Returns a string representing the task ID of the asynchronous task.

This method was introduced in Esri.ArcGISRuntime 100.10.


string createVersion(ServiceVersionParameters 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(string 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(string 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.


ServiceFeatureTable tableWithLayerIdAsInt(int 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, represented as an integer type.

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

See also table.


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.


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