ServiceGeodatabase Class

ServiceFeatureTable instances connected to a feature service."> ServiceGeodatabase Class | ArcGISQtCpp
  • ServiceGeodatabase
  • class Esri::ArcGISRuntime::ServiceGeodatabase

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

    Header: #include <ServiceGeodatabase.h>
    Since: Esri::ArcGISRuntime 100.9
    Inherits: Esri::ArcGISRuntime::Object, Esri::ArcGISRuntime::Loadable, and Esri::ArcGISRuntime::RemoteResource

    Public Functions

    ServiceGeodatabase(const QUrl &url, QObject *parent = nullptr)
    ServiceGeodatabase(const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
    ServiceGeodatabase(const QUrl &url, Esri::ArcGISRuntime::FeatureServiceSessionType sessionType, QObject *parent = nullptr)
    ServiceGeodatabase(const QUrl &url, Esri::ArcGISRuntime::FeatureServiceSessionType sessionType, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
    ServiceGeodatabase(const QUrl &url, const QString &versionName, QObject *parent = nullptr)
    ServiceGeodatabase(const QUrl &url, const QString &versionName, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
    ServiceGeodatabase(const QUrl &url, const QString &versionName, Esri::ArcGISRuntime::FeatureServiceSessionType sessionType, QObject *parent = nullptr)
    ServiceGeodatabase(const QUrl &url, const QString &versionName, Esri::ArcGISRuntime::FeatureServiceSessionType sessionType, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
    ServiceGeodatabase(Esri::ArcGISRuntime::PortalItem *portalItem, QObject *parent = nullptr)
    ServiceGeodatabase(Esri::ArcGISRuntime::PortalItem *portalItem, Esri::ArcGISRuntime::FeatureServiceSessionType sessionType, QObject *parent = nullptr)
    ServiceGeodatabase(Esri::ArcGISRuntime::PortalItem *portalItem, const QString &versionName, QObject *parent = nullptr)
    ServiceGeodatabase(Esri::ArcGISRuntime::PortalItem *portalItem, const QString &versionName, Esri::ArcGISRuntime::FeatureServiceSessionType sessionType, QObject *parent = nullptr)
    virtual ~ServiceGeodatabase() override
    Esri::ArcGISRuntime::TaskWatcher applyEdits()
    QFuture<QList<Esri::ArcGISRuntime::FeatureTableEditResult *>> applyEditsAsync(QObject *parent = nullptr)
    Esri::ArcGISRuntime::TaskWatcher close()
    QFuture<void> closeAsync()
    QList<Esri::ArcGISRuntime::ServiceFeatureTable *> connectedTables() const
    Esri::ArcGISRuntime::TaskWatcher createVersion(Esri::ArcGISRuntime::ServiceVersionParameters *parameters)
    QFuture<Esri::ArcGISRuntime::ServiceVersionInfo *> createVersionAsync(Esri::ArcGISRuntime::ServiceVersionParameters *newVersion, QObject *parent = nullptr)
    QString defaultVersionName() const
    Esri::ArcGISRuntime::TaskWatcher fetchVersions()
    QFuture<QList<Esri::ArcGISRuntime::ServiceVersionInfo *>> fetchVersionsAsync(QObject *parent = nullptr)
    bool hasLocalEdits() const
    bool isSupportsBranchVersioning() const
    Esri::ArcGISRuntime::PortalItem *portalItem() const
    Esri::ArcGISRuntime::ArcGISFeatureServiceInfo serviceInfo() const
    Esri::ArcGISRuntime::FeatureServiceSessionType sessionType() const
    void setSessionType(Esri::ArcGISRuntime::FeatureServiceSessionType sessionType)
    Esri::ArcGISRuntime::TaskWatcher switchVersion(const QString &versionName)
    QFuture<void> switchVersionAsync(const QString &versionName)
    Esri::ArcGISRuntime::ServiceFeatureTable *table(qint64 layerId)
    Esri::ArcGISRuntime::TaskWatcher undoLocalEdits()
    QFuture<void> undoLocalEditsAsync()
    QString versionName() const

    Reimplemented Public Functions

    virtual void cancelLoad() override
    virtual Esri::ArcGISRuntime::Credential *credential() const override
    virtual void load() override
    virtual Esri::ArcGISRuntime::Error loadError() const override
    virtual Esri::ArcGISRuntime::LoadStatus loadStatus() const override
    virtual Esri::ArcGISRuntime::RequestConfiguration requestConfiguration() const override
    virtual void retryLoad() override
    virtual void setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration) override
    virtual QUrl url() const override

    Signals

    void applyEditsCompleted(const QUuid &taskId, const QList<Esri::ArcGISRuntime::FeatureTableEditResult *> &editResults)
    void createVersionCompleted(const QUuid &taskId, Esri::ArcGISRuntime::ServiceVersionInfo *serviceVersionInfo)
    void doneLoading(const Esri::ArcGISRuntime::Error &loadError)
    void fetchVersionsCompleted(const QUuid &taskId, const QList<Esri::ArcGISRuntime::ServiceVersionInfo *> &serviceVersionInfos)
    void loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)
    void undoLocalEditsCompleted(const QUuid &taskId)

    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.

    Member Function Documentation

    [explicit] ServiceGeodatabase::ServiceGeodatabase(const QUrl &url, QObject *parent = nullptr)

    Creates a new ServiceGeodatabase connected to the default version in a feature service.

    • url - The URL of the feature service or the portal item to connect to.
    • parent - The optional parent QObject.

    If the service is branch versioned, the ServiceGeodatabase will connect to the default version.

    ServiceGeodatabase::ServiceGeodatabase(const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)

    Creates a new ServiceGeodatabase that is connected to the default version in a feature service, from a secured service that requires credentials.

    • url - The URL of the service to connect to.
    • credential - The credential needed to access a secured service.
    • parent - The optional parent QObject.

    If the service is branch-versioned, the ServiceGeodatabase will connect to the default version.

    [since Esri::ArcGISRuntime 100.10] ServiceGeodatabase::ServiceGeodatabase(const QUrl &url, Esri::ArcGISRuntime::FeatureServiceSessionType sessionType, QObject *parent = nullptr)

    Creates a new ServiceGeodatabase connected to the default version in a feature service.

    • url - The URL of the feature service or the portal item to connect to.
    • sessionType - The type of read and edit sessions to use when working with the service.
    • parent - The optional parent QObject.

    If the service is branch versioned, the ServiceGeodatabase will connect to the default version.

    If using FeatureServiceSessionType::Persistent and the service is not branch versioned, the ServiceGeodatabase will fail to load.

    If using FeatureServiceSessionType::Persistent, it is important to call close before destruction.

    This function was introduced in Esri::ArcGISRuntime 100.10.

    [since Esri::ArcGISRuntime 100.10] ServiceGeodatabase::ServiceGeodatabase(const QUrl &url, Esri::ArcGISRuntime::FeatureServiceSessionType sessionType, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)

    Creates a new ServiceGeodatabase connected to the default version in a feature service, from a secured service that requires credentials.

    • url - The URL of the service to connect to.
    • sessionType - The type of read and edit sessions to use when working with the service.
    • credential - The credential needed to access a secured service.
    • parent - The optional parent QObject.

    If the service is branch versioned, the ServiceGeodatabase will connect to the default version.

    This function was introduced in Esri::ArcGISRuntime 100.10.

    ServiceGeodatabase::ServiceGeodatabase(const QUrl &url, const QString &versionName, QObject *parent = nullptr)

    Creates a new ServiceGeodatabase connected to a specific version in a feature service.

    • url - The URL of the feature service or the portal item to connect to.
    • versionName - The existing version to connect to when the ServiceGeodatabase loads.
    • parent - The optional parent QObject.

    If a version with the name does not exist, or the service is not branch versioned, the ServiceGeodatabase will fail to load. If using l {Esri::ArcGISRuntime::FeatureServiceSessionType} {FeatureServiceSessionType::Persistent} and the service is not branch versioned, the ServiceGeodatabase will fail to load.

    ServiceGeodatabase::ServiceGeodatabase(const QUrl &url, const QString &versionName, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)

    Creates a new ServiceGeodatabase instance connected to a specific version in a feature service, from a secured service that requires credentials

    • url - The URL of the service to connect to.
    • versionName - The existing version to connect to when the ServiceGeodatabase loads.
    • credential - The credential needed to access a secured service.
    • parent - The optional parent QObject.

    If a version with the name does not exist, or the service is not branch-versioned, the ServiceGeodatabase will fail to load.

    If using FeatureServiceSessionType::Persistent, it is important to call close before destruction.

    [since Esri::ArcGISRuntime 100.10] ServiceGeodatabase::ServiceGeodatabase(const QUrl &url, const QString &versionName, Esri::ArcGISRuntime::FeatureServiceSessionType sessionType, QObject *parent = nullptr)

    Creates a new `ServiceGeodatabase` connected to a specific version in a feature service.

    • url - The URL of the feature service or the portal item to connect to.
    • versionName - The existing version to connect to when the ServiceGeodatabase loads.
    • sessionType - The type of read and edit sessions to use when working with the service.
    • parent - The optional parent QObject.

    If a version with the name does not exist, or the service is not branch versioned, the ServiceGeodatabase will fail to load.

    If using FeatureServiceSessionType::Persistent and the service is not branch versioned, the ServiceGeodatabase will fail to load.

    If using FeatureServiceSessionType::Persistent, it is important to call close before destruction.

    This function was introduced in Esri::ArcGISRuntime 100.10.

    [since Esri::ArcGISRuntime 100.10] ServiceGeodatabase::ServiceGeodatabase(const QUrl &url, const QString &versionName, Esri::ArcGISRuntime::FeatureServiceSessionType sessionType, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)

    Creates a new `ServiceGeodatabase` connected to a specific version in a feature service. from a secured service that requires credentials.

    • url - The URL of the service to connect to.
    • versionName - The existing version to connect to when the ServiceGeodatabase loads.
    • sessionType - The type of read and edit sessions to use when working with the service.
    • credential - The credential needed to access a secured service.
    • parent - The optional parent QObject.

    If a version with the name does not exist, or the service is not branch versioned, the ServiceGeodatabase will fail to load. If using FeatureServiceSessionType::Persistent and the service is not branch versioned, the ServiceGeodatabase will fail to load.

    This function was introduced in Esri::ArcGISRuntime 100.10.

    [explicit, since Esri::ArcGISRuntime 100.12] ServiceGeodatabase::ServiceGeodatabase(Esri::ArcGISRuntime::PortalItem *portalItem, QObject *parent = nullptr)

    Creates a new ServiceGeodatabase from a feature service portal item, and connects to the default version in the feature service.

    If the service is branch versioned, the ServiceGeodatabase will connect to the default version.

    This function was introduced in Esri::ArcGISRuntime 100.12.

    See also portalItem.

    [since Esri::ArcGISRuntime 100.12] ServiceGeodatabase::ServiceGeodatabase(Esri::ArcGISRuntime::PortalItem *portalItem, Esri::ArcGISRuntime::FeatureServiceSessionType sessionType, QObject *parent = nullptr)

    Creates a new ServiceGeodatabase from a feature service portal item, and connects to the default version in the feature service.

    • portalItem - A feature service PortalItem.
    • sessionType - The type of read and edit sessions to use when working with the service.
    • parent - The optional parent QObject.

    If the service is branch versioned, the ServiceGeodatabase will connect to the default version.

    If using FeatureServiceSessionType::Persistent and the service is not branch versioned, the ServiceGeodatabase will fail to load.

    If using FeatureServiceSessionType::Persistent, it is important to call close before destruction.

    This function was introduced in Esri::ArcGISRuntime 100.12.

    See also portalItem.

    [since Esri::ArcGISRuntime 100.12] ServiceGeodatabase::ServiceGeodatabase(Esri::ArcGISRuntime::PortalItem *portalItem, const QString &versionName, QObject *parent = nullptr)

    Creates a new ServiceGeodatabase from a feature service portal item, and connects to a specific version in the feature service.

    If a version with the name does not exist, or the service is not branch versioned, the ServiceGeodatabase will fail to load. If using FeatureServiceSessionType::Persistent and the service is not branch versioned, the ServiceGeodatabase will fail to load.

    This function was introduced in Esri::ArcGISRuntime 100.12.

    See also portalItem.

    [since Esri::ArcGISRuntime 100.12] ServiceGeodatabase::ServiceGeodatabase(Esri::ArcGISRuntime::PortalItem *portalItem, const QString &versionName, Esri::ArcGISRuntime::FeatureServiceSessionType sessionType, QObject *parent = nullptr)

    Creates a new ServiceGeodatabase from a feature service portal item, and connects to a specific version in the feature service.

    • portalItem - A feature service PortalItem.
    • versionName - The existing version to connect to when the ServiceGeodatabase loads.
    • sessionType - The type of read and edit sessions to use when working with the service.
    • parent - The optional parent QObject.

    If a version with the name does not exist, or the service is not branch versioned, the ServiceGeodatabase will fail to load.

    If using FeatureServiceSessionType::Persistent and the service is not branch versioned, the ServiceGeodatabase will fail to load.

    If using FeatureServiceSessionType::Persistent, it is important to call close before destruction.

    This function was introduced in Esri::ArcGISRuntime 100.12.

    See also portalItem.

    [override virtual] ServiceGeodatabase::~ServiceGeodatabase()

    Destructor.

    Esri::ArcGISRuntime::TaskWatcher ServiceGeodatabase::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 Esri::ArcGISRuntime::ServiceFeatureTable at a time.

    Returns a TaskWatcher for the asynchronous operation.

    [since Esri::ArcGISRuntime 200.2] QFuture<QList<Esri::ArcGISRuntime::FeatureTableEditResult *>> ServiceGeodatabase::applyEditsAsync(QObject *parent = nullptr)

    Applies all local edits in all tables to the service. Edits in all tables are applied to the feature service in a call, which is more efficient than doing so one ServiceFeatureTable at a time.

    • parent - An optional parent.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also FeatureServiceSessionType.

    [signal] void ServiceGeodatabase::applyEditsCompleted(const QUuid &taskId, const QList<Esri::ArcGISRuntime::FeatureTableEditResult *> &editResults)

    Signal emitted when the applyEdits operation completes.

    • taskId - The task ID of the asynchronous operation.
    • editResults - A list of edit results from the apply edits operation.

    See also Returned QObjects Parenting.

    [override virtual] void ServiceGeodatabase::cancelLoad()

    Reimplements: Loadable::cancelLoad().

    See Loadable.

    [since Esri::ArcGISRuntime 100.10] Esri::ArcGISRuntime::TaskWatcher ServiceGeodatabase::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 TaskWatcher for the asynchronous operation.

    This function was introduced in Esri::ArcGISRuntime 100.10.

    [since Esri::ArcGISRuntime 200.2] QFuture<void> ServiceGeodatabase::closeAsync()

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

    Before calling this method, there should be no references to all 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 with ErrorType::GeodatabaseDatabaseClosed.

    Closing this service geodatabase is not necessary if it has not been loaded. This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    QList<Esri::ArcGISRuntime::ServiceFeatureTable *> ServiceGeodatabase::connectedTables() const

    Returns the collection of feature tables managed by the ServiceGeodatabase.

    Esri::ArcGISRuntime::TaskWatcher ServiceGeodatabase::createVersion(Esri::ArcGISRuntime::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 will occur.

    This method returns a TaskWatcher for the asynchronous operation.

    See also errorOccurred.

    [since Esri::ArcGISRuntime 200.2] QFuture<Esri::ArcGISRuntime::ServiceVersionInfo *> ServiceGeodatabase::createVersionAsync(Esri::ArcGISRuntime::ServiceVersionParameters *newVersion, QObject *parent = nullptr)

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

    • newVersion - The properties of the new version.
    • parent - An optional parent.

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

    If the service isn't branch versioned, a ErrorType::MappingBranchVersioningNotSupportedByService is thrown.

    If the version parameters do not include a name, an error is thrown. This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [signal] void ServiceGeodatabase::createVersionCompleted(const QUuid &taskId, Esri::ArcGISRuntime::ServiceVersionInfo *serviceVersionInfo)

    Signal emitted when the createVersion operation completes.

    • taskId - The task ID of the asynchronous operation.
    • serviceVersionInfo - A new version in the service based on the default version.

    See also Returned QObjects Parenting.

    [override virtual] Esri::ArcGISRuntime::Credential *ServiceGeodatabase::credential() const

    Reimplements: RemoteResource::credential() const.

    Returns the security credential used to access the routing service.

    This is only applicable if using a secured online service.

    QString ServiceGeodatabase::defaultVersionName() const

    Returns the name of the default version.

    [signal] void ServiceGeodatabase::doneLoading(const Esri::ArcGISRuntime::Error &loadError)

    Signal emitted when this object is done loading.

    • loadError - Details about any error that may have occurred.

    Note: If there is a load error it will also be emitted on the errorOccurred signal.

    See also Loadable and Object.

    Esri::ArcGISRuntime::TaskWatcher ServiceGeodatabase::fetchVersions()

    Returns a list of all versions on the service.

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

    This method returns a TaskWatcher for the asynchronous operation.

    See also errorOccurred.

    QFuture<QList<Esri::ArcGISRuntime::ServiceVersionInfo *>> ServiceGeodatabase::fetchVersionsAsync(QObject *parent = nullptr)

    Returns a list of all versions on the service. If the service isn't branch versioned, a ErrorType::MappingBranchVersioningNotSupportedByService is thrown.

    • parent - An optional parent.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    since Esri::ArcGISRuntime 200.2

    [signal] void ServiceGeodatabase::fetchVersionsCompleted(const QUuid &taskId, const QList<Esri::ArcGISRuntime::ServiceVersionInfo *> &serviceVersionInfos)

    Signal emitted when the fetchVersions operation completes.

    • taskId - The task ID of the asynchronous operation.
    • serviceVersionInfos - A list of all versions on the service.

    See also Returned QObjects Parenting.

    bool ServiceGeodatabase::hasLocalEdits() const

    Returns whether any the tables in the Esri::ArcGISRuntime::ServiceGeodatabase have unapplied edits.

    bool ServiceGeodatabase::isSupportsBranchVersioning() const

    Returns whether the service supports branch versioning.

    [override virtual] void ServiceGeodatabase::load()

    Reimplements: Loadable::load().

    See Loadable.

    [override virtual] Esri::ArcGISRuntime::Error ServiceGeodatabase::loadError() const

    Reimplements: Loadable::loadError() const.

    See Loadable.

    [override virtual] Esri::ArcGISRuntime::LoadStatus ServiceGeodatabase::loadStatus() const

    Reimplements: Loadable::loadStatus() const.

    See Loadable.

    [signal] void ServiceGeodatabase::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

    Signal emitted when the load status changes for this object.

    See also Loadable.

    [since Esri::ArcGISRuntime 100.12] Esri::ArcGISRuntime::PortalItem *ServiceGeodatabase::portalItem() const

    Returns the PortalItem which the ServiceGeodatabase was created from.

    This function was introduced in Esri::ArcGISRuntime 100.12.

    [override virtual] Esri::ArcGISRuntime::RequestConfiguration ServiceGeodatabase::requestConfiguration() const

    Reimplements: RemoteResource::requestConfiguration() const.

    Returns the RequestConfiguration in use by this task.

    See also setRequestConfiguration().

    [override virtual] void ServiceGeodatabase::retryLoad()

    Reimplements: Loadable::retryLoad().

    See Loadable.

    Esri::ArcGISRuntime::ArcGISFeatureServiceInfo ServiceGeodatabase::serviceInfo() const

    Returns the metadata of the service this object is connected to.

    [since Esri::ArcGISRuntime 100.10] Esri::ArcGISRuntime::FeatureServiceSessionType ServiceGeodatabase::sessionType() const

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

    The default value is FeatureServiceSessionType::Transient.

    If the feature service this ServiceGeodatabase references is not branch-versioned, only FeatureServiceSessionType::Transient is supported.

    If using FeatureServiceSessionType::Persistent, 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 function was introduced in Esri::ArcGISRuntime 100.10.

    See also setSessionType() and LoadSettings::featureServiceSessionType.

    [override virtual] void ServiceGeodatabase::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration)

    Reimplements: RemoteResource::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration).

    Sets configuration parameters used for network requests sent by this task to requestConfiguration.

    See also requestConfiguration().

    [since Esri::ArcGISRuntime 100.10] void ServiceGeodatabase::setSessionType(Esri::ArcGISRuntime::FeatureServiceSessionType sessionType)

    Sets the sessionType to sessionType.

    Cannot be set after the ServiceGeodatabase is loaded.

    This function was introduced in Esri::ArcGISRuntime 100.10.

    See also sessionType.

    Esri::ArcGISRuntime::TaskWatcher ServiceGeodatabase::switchVersion(const QString &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 ServiceGeodatabase::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 TaskWatcher for the asynchronous operation.

    QFuture<void> ServiceGeodatabase::switchVersionAsync(const QString &versionName)

    Switches all connected feature tables to the new version.

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

    An error is thrown if:

    • The service isn't branch versioned
    • No version exists with the supplied name
    • Any of the connectedTables have unapplied edits

    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 applyEdits or undoLocalEdits methods as appropriate to save or discard changes before switching versions. This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    since Esri::ArcGISRuntime 200.2

    Esri::ArcGISRuntime::ServiceFeatureTable *ServiceGeodatabase::table(qint64 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 will occur.

    See also errorOccurred.

    Esri::ArcGISRuntime::TaskWatcher ServiceGeodatabase::undoLocalEdits()

    Undoes all of the local edits in all the tables.

    Returns a TaskWatcher for the asynchronous operation.

    [since Esri::ArcGISRuntime 200.2] QFuture<void> ServiceGeodatabase::undoLocalEditsAsync()

    Undos all of the local edits in all the tables. This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also FeatureServiceSessionType.

    [signal] void ServiceGeodatabase::undoLocalEditsCompleted(const QUuid &taskId)

    Signal emitted when the undoLocalEdits operation completes.

    • taskId - The task ID of the asynchronous operation.

    [override virtual] QUrl ServiceGeodatabase::url() const

    Reimplements: RemoteResource::url() const.

    Returns the URL of the feature service or the portal item to connect to.

    Use ArcGISFeatureServiceInfo::url to get the feature service URL.

    QString ServiceGeodatabase::versionName() const

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

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