Geodatabase QML Type

  • Esri.ArcGISRuntime
  • Geodatabase
  • A mobile geodatabase containing geographic data and non-spatial tables. More...

    Import Statement: import Esri.ArcGISRuntime
    Since: Esri.ArcGISRuntime 100.0

    Properties

    Signals

    Methods

    Detailed Description

    Geodatabase is used to open and access the contents of a mobile geodatabase (.geodatabase file) that can contain geographic features, non-spatial tabular data, and data such as attachments, utility networks, field domain definitions, contingent values, and relationships between layers/tables. A geodatabase is typically an offline copy of data from an ArcGIS service, although it can be created using ArcMap or ArcGIS Pro. The geodatabase contains a number of GeodatabaseFeatureTables. Each GeodatabaseFeatureTable contains attribute data. For spatial features, it also stores the geometry and rendering information. A GeodatabaseFeatureTable can be used to create a feature layer to display on a map.

    Geodatabases can contain one or more geodatabase feature tables. You can create a layer from a GeodatabaseFeatureTable tables, as follows:

    You can generate a mobile geodatabase file from an ArcGIS feature service and downloaded it to a device using offline workflows offered by the GeodatabaseSyncTask and the OfflineMapTask. Apps can then operate offline to view and edit the features in these geodatabases. If the geodatabases are enabled for synchronization with the original feature service, edits can be synchronized when connectivity is restored.

    Mobile geodatabase files can also be created with ArcGIS Pro. These geodatabases can be used offline but they do not support synchronization with the original feature service. See Build offline applications for more information.

    Geodatabase adopts the loadable pattern; the geodatabase feature tables can be accessed after loaded. See Loadable for more information. By default, the Geodatabase type is automatically loaded after instantiated if a path to a geodatabase file was supplied. You can change this default behavior by declaring the autoLoad property as false.

    Both the geodatabaseFeatureTablesByTableName and geodatabaseFeatureTablesByLayerId properties may be used with property binding. They are both updated when the Geodatabase has loaded.

    // Display a feature layer with a Geodatabase
    FeatureLayer {
        id: gdbFeatureLayer
        visible: false
    
        featureTable: geodatabase.geodatabaseFeatureTablesByTableName["Trailheads"] ?? null
        Geodatabase {
            id: geodatabase
            path: dataPath + "geodatabase/LA_Trails.geodatabase"
        }
    }

    See also Loadable and GeodatabaseFeatureTable.

    Property Documentation

    autoLoad : bool

    Determines if this Geodatabase instance should attempt to automatically load after it has instantiated.

    By default this property is true which means a Geodatabase will attempt to load if it has a path to a mobile geodatabase file. It may be useful to declare this property as false in the case you would like to delay the loading of the Geodatabase to be controlled manually at a later time.

    This property cannot be set after the Geodatabase has instantiated.


    [read-only, since Esri.ArcGISRuntime 100.14] createDomainResult : Domain

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

    This property was introduced in Esri.ArcGISRuntime 100.14.


    [read-only, since Esri.ArcGISRuntime 100.14] createDomainStatus : Enums.TaskStatus

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

    This property was introduced in Esri.ArcGISRuntime 100.14.


    [read-only, since Esri.ArcGISRuntime 100.14] createTableResult : GeodatabaseFeatureTable

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

    This property was introduced in Esri.ArcGISRuntime 100.14.


    [read-only, since Esri.ArcGISRuntime 100.14] createTableStatus : Enums.TaskStatus

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

    This property was introduced in Esri.ArcGISRuntime 100.14.


    [read-only, since Esri.ArcGISRuntime 100.14] deleteDomainStatus : Enums.TaskStatus

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

    This property was introduced in Esri.ArcGISRuntime 100.14.


    [read-only, since Esri.ArcGISRuntime 100.14] deleteTableStatus : Enums.TaskStatus

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

    This property was introduced in Esri.ArcGISRuntime 100.14.


    [read-only, since Esri.ArcGISRuntime 100.14] domains : list<Domain>

    Returns a list of the domains that exist in the geodatabase (read-only).

    The returned list will be empty if the geodatabase itself is not loaded.

    This property was introduced in Esri.ArcGISRuntime 100.14.


    [read-only] error : Error

    Returns the error object (read-only).

    See also Loadable and Error.


    [read-only, since Esri.ArcGISRuntime 100.7] generateGeodatabaseGeometry : Geometry

    The geometry used to generate a sync-enabled geodatabase (read-only).

    If the geodatabase was created using the GenerateGeodatabaseJob, the geometry matches the GenerateGeodatabaseParameters::extent. If the geodatabase was created using the GenerateOfflineMapJob, the geometry reflects the GenerateOfflineMapParameters::areaOfInterest. If the geodatabase was downloaded as part of a PreplannedMapArea, this property will match the geometry used by the web map author when the offline map area was created. See Build offline applications for more information on taking data offline.

    Edits made to a sync-enabled Geodatabase must intersect this geometry. If an edit is made outside this extent, or area of interest, it will be rejected.

    This property is null if the geodatabase was authored using ArcGIS Pro or if the Geodatabase. loadStatus is not Enums.LoadStatusLoaded.

    This property is populated after the geodatabase loads.

    This property was introduced in Esri.ArcGISRuntime 100.7.


    [read-only, since Esri::ArcGISRuntime 100.6] geodatabaseAnnotationTables : list<GeodatabaseFeatureTable>

    Returns a list of GeodatabaseFeatureTable from the geodatabase that contain annotation features (read-only).

    Feature tables in this list are read-only when the geodatabase is a stand-alone mobile geodatabase created with ArcGIS Pro and tables participate a controller dataset, such as a utility network or parcel fabric. The presence of utility networks can be checked using Geodatabase::utilityNetworks.

    You can add one of the annotation feature tables instances from the list to a feature layer to display the features on a map. Or, you can open feature tables directly to work with their data.

    The returned list is empty if the geodatabase is not loaded.

    This property is populated after the geodatabase loads.

    This property was introduced in Esri::ArcGISRuntime 100.6.


    [read-only] geodatabaseAnnotationTablesByLayerId : jsobject

    Returns a map of geodatabase annotation feature tables with the service layer ID as the key (read-only).

    The service layer ID must match the ArcGISFeatureLayerInfo::serviceLayerId.

    This property is populated after the geodatabase loads.


    [read-only] geodatabaseAnnotationTablesByTableName : jsobject

    Returns a map of geodatabase annotation feature tables with the table name as the key (read-only).

    This property is populated after the geodatabase loads.


    [read-only] geodatabaseDimensionTables : list<GeodatabaseFeatureTable>

    Returns a list of GeodatabaseFeatureTable from the geodatabase that contain dimension features (read-only).

    You can add one of the dimension feature tables instances from the list to a feature layer to display the features on a map. Or, you can open feature tables directly to work with their data.

    The returned list is empty if the geodatabase is not loaded.

    This property is populated after the geodatabase loads.


    [read-only] geodatabaseDimensionTablesByLayerId : jsobject

    Returns a map of geodatabase dimension feature tables with the service layer ID as the key (read-only).

    The service layer ID must match the ArcGISFeatureLayerInfo::serviceLayerId.

    This property is populated after the geodatabase loads.


    [read-only] geodatabaseDimensionTablesByTableName : jsobject

    Returns a map of geodatabase dimension feature tables with the table name as the key (read-only).

    This property is populated after the geodatabase loads.


    [read-only] geodatabaseFeatureTables : list<GeodatabaseFeatureTable>

    Returns a list of GeodatabaseFeatureTable from the geodatabase that contain geometries, such as points, lines or polygons (read-only).

    You can add one of the feature tables instances from the list to a feature layer to display the features on a map. Or, you can open feature tables directly to work with their data.

    This property is populated after the geodatabase loads.

    Feature tables in this list are read-only when the geodatabase is a stand-alone mobile geodatabase created with ArcGIS Pro and tables participate in a controller dataset, such as a utility network or parcel fabric. The presence of utility networks can be checked using utilityNetworks.

    The returned list will be empty if the geodatabase itself is not loaded.


    [read-only] geodatabaseFeatureTablesByLayerId : jsobject

    Returns a map of geodatabase feature tables with the service layer ID as the key (read-only).

    This property is populated after the geodatabase loads.

    The feature table returned is read-only when the geodatabase is a stand-alone mobile geodatabase created with ArcGIS Pro and the table participates in a controller dataset, such as a utility network or parcel fabric. The presence of utility networks can be checked using utilityNetworks.


    [read-only] geodatabaseFeatureTablesByTableName : jsobject

    Returns a map of geodatabase feature tables with the table name as the key (read-only).

    This property is populated after the geodatabase loads.


    [read-only] hasLocalEdits : bool

    Returns true if the geodatabase has local edits, false otherwise.

    If the geodatabase was created by ArcGIS Pro, this method returns false because there is no concept of uploading or applying edits. If you want to determine which tables have local edits, examine GeodatabaseFeatureTable::hasLocalEditsSince(date).

    See also GeodatabaseSyncTask and OfflineMapTask.


    [read-only, since Esri.ArcGISRuntime 100.3] inTransaction : bool

    Returns true if a transaction is active on the geodatabase, false otherwise (read-only).

    A transaction manages a series of geodatabase edits as a single unit of work. You can start a transaction by calling beginTransaction. All edits made after this call are part of the transaction.

    A geodatabase transaction stays active until you end it by calling commitTransaction or rollbackTransaction. commitTransaction saves all edits in the transaction to the geodatabase and ends the transaction. rollbackTransaction discards all edits in the transaction and ends the transaction.

    If the app unexpectedly disconnects from the database, any active transaction will be rolled back. If the app crashes, or the user closes the app without saving edits, the transaction will be rolled back and the edits discarded.

    This property was introduced in Esri.ArcGISRuntime 100.3.

    See also beginTransaction, rollbackTransaction, and commitTransaction.


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


    [read-only] loadStatus : Enums.LoadStatus

    Returns the load status code of this Loadable object (read-only).

    See also Enums.LoadStatus and Loadable.


    [read-only, since Esri.ArcGISRuntime 100.6] minServerGeneration : string

    The minimum server generation number for the geodatabase (read-only).

    Server generation numbers indicate the state of a geodatabase or individual layers with respect to changes which have been synced with the online service. The number increases as new changes from the online feature service are synced to the local geodatabase.

    If the syncModel is Enums.SyncModelGeodatabase, the value will indicate the server generation number for the entire geodatabase. If the syncModel is Enums.SyncModelLayer, the value will be the lowest server generation number for all of the layers in the geodatabase. This property will be -1 if the geodatabase does not support sync (Enums.SyncModelNone).

    This property will be -1 until the geodatabase is Enums.LoadStatusLoaded.

    Note that this property is only required when using advanced workflows to manually apply pre-generated changes and not when performing a sync directly against the online service.

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

    This property was introduced in Esri.ArcGISRuntime 100.6.

    See also minServerGenerationAsInt.


    [read-only, since Esri.ArcGISRuntime 100.6] minServerGenerationAsInt : double

    The same as minServerGeneration but represented as an integer type (read-only).

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

    This property was introduced in Esri.ArcGISRuntime 100.6.


    path : url

    The path to the mobile geodatabase file.

    If the specified path points to a stand-alone mobile geodatabase created with ArcGIS Pro and contains a controller dataset, such as a utility network or parcel fabric, the feature tables on this geodatabase are read-only. The presence of utility networks can be checked using Geodatabase::utilityNetworks. Constructing a geodatabase from a path to a geodatabase file does not automatically load the geodatabase. You must load it explicitly.

    You cannot set the path to the geodatabase after the instance is already loaded.


    [read-only] serviceUrl : url

    Returns the URL of the service that was the source of this geodatabase (read-only).

    This property is populated after the geodatabase loads.


    [read-only] syncEnabled : bool

    Returns whether sync is enabled for the geodatabase (read-only).

    This property is populated after the geodatabase loads.


    [read-only, since Esri.ArcGISRuntime 100.2] syncId : string

    Returns the sync ID of the geodatabase (read-only).

    Sync ID is available if syncEnabled is true. The sync ID is the same as the replica ID described in the REST documentation. It is used by the geodatabase service to uniquely identify when carrying out sync operations. It is also used to unregister the geodatabase using the GeodatabaseSyncTask.unregisterGeodatabaseAsync(GUID).

    Note: The returned string will be empty if there is an error or if this is not a sync-enabled geodatabase or the geodatabase is not loaded.

    This property was introduced in Esri.ArcGISRuntime 100.2.

    See also GeodatabaseSyncTask.


    [read-only] syncModel : Enums.SyncModel

    Returns the sync model defining how datasets within the geodatabase are synchronized with the originating ArcGIS feature service (read-only).

    Sync model only applies to the geodatabase if syncEnabled is true.

    This property is populated after the geodatabase loads.

    See also Enums.SyncModel.


    [read-only, since Esri.ArcGISRuntime 100.11] utilityNetworks : list<UtilityNetwork>

    The list of UtilityNetwork objects that are packaged within the Geodatabase (read-only).

    The returned list will be empty if the geodatabase itself is not loaded or if no utility networks exist in the geodatabase.

    This property was introduced in Esri.ArcGISRuntime 100.11.


    Signal Documentation

    autoLoadChanged()

    Emitted when the autoLoad property changes.

    Note: The corresponding handler is onAutoLoadChanged.


    [since Esri.ArcGISRuntime 100.14] createDomainStatusChanged()

    Emitted when the createDomainStatus property changes.

    Note: The corresponding handler is onCreateDomainStatusChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.14.


    [since Esri.ArcGISRuntime 100.14] createTableStatusChanged()

    Emitted when the createTableStatus property changes.

    Note: The corresponding handler is onCreateTableStatusChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.14.


    [since Esri.ArcGISRuntime 100.14] deleteDomainStatusChanged()

    Emitted when the deleteDomainStatus property changes.

    Note: The corresponding handler is onDeleteDomainStatusChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.14.


    [since Esri.ArcGISRuntime 100.14] deleteDomainStatusChanged()

    Emitted when the deleteDomainStatus property changes.

    Note: The corresponding handler is onDeleteDomainStatusChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.14.


    [since Esri.ArcGISRuntime 100.14] deleteTableStatusChanged()

    Emitted when the deleteTableStatus property changes.

    Note: The corresponding handler is onDeleteTableStatusChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.14.


    [since Esri.ArcGISRuntime 100.14] domainsChanged()

    Emitted when the domains property changes.

    Note: The corresponding handler is onDomainsChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.14.


    [since Esri.ArcGISRuntime 100.7] generateGeodatabaseGeometryChanged()

    Emitted when the generateGeodatabaseGeometry property changes.

    Note: The corresponding handler is onGenerateGeodatabaseGeometryChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.7.


    geodatabaseAnnotationTablesByLayerIdChanged()

    Emitted when the geodatabaseAnnotationTablesByLayerId property changes.

    Note: The corresponding handler is onGeodatabaseAnnotationTablesByLayerIdChanged.


    geodatabaseAnnotationTablesByTableNameChanged()

    Emitted when the geodatabaseAnnotationTablesByTableName property changes.

    Note: The corresponding handler is onGeodatabaseAnnotationTablesByTableNameChanged.


    geodatabaseAnnotationTablesChanged()

    Emitted when the geodatabaseAnnotationTables property changes.

    Note: The corresponding handler is onGeodatabaseAnnotationTablesChanged.


    [since Esri::ArcGISRuntime 100.13] geodatabaseDimensionTablesByLayerIdChanged()

    Emitted when the geodatabaseDimensionTablesByLayerId property changes.

    Note: The corresponding handler is onGeodatabaseDimensionTablesByLayerIdChanged.

    This signal was introduced in Esri::ArcGISRuntime 100.13.


    [since Esri::ArcGISRuntime 100.13] geodatabaseDimensionTablesByTableNameChanged()

    Emitted when the geodatabaseDimensionTablesByTableName property changes.

    Note: The corresponding handler is onGeodatabaseDimensionTablesByTableNameChanged.

    This signal was introduced in Esri::ArcGISRuntime 100.13.


    [since Esri::ArcGISRuntime 100.13] geodatabaseDimensionTablesChanged()

    Emitted when the geodatabaseDimensionTables property changes.

    Note: The corresponding handler is onGeodatabaseDimensionTablesChanged.

    This signal was introduced in Esri::ArcGISRuntime 100.13.


    geodatabaseFeatureTablesByLayerIdChanged()

    Emitted when the geodatabaseFeatureTablesByLayerId property changes.

    Note: The corresponding handler is onGeodatabaseFeatureTablesByLayerIdChanged.


    geodatabaseFeatureTablesByTableNameChanged()

    Emitted when the geodatabaseFeatureTablesByTableName property changes.

    Note: The corresponding handler is onGeodatabaseFeatureTablesByTableNameChanged.


    geodatabaseFeatureTablesChanged()

    Emitted when the geodatabaseFeatureTables property changes.

    Note: The corresponding handler is onGeodatabaseFeatureTablesChanged.


    hasLocalEditsChanged()

    Emitted when the hasLocalEdits property changes.

    Note: The corresponding handler is onHasLocalEditsChanged.


    [since Esri.ArcGISRuntime 100.3] inTransactionChanged()

    Emitted when the inTransaction property changes.

    Note: The corresponding handler is onInTransactionChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.3.


    loadErrorChanged()

    Emitted when the loadError property of this Geodatabase 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 changes.

    Note: The corresponding handler is onLoadStatusChanged.

    See also Loadable.


    [since Esri.ArcGISRuntime 100.6] minServerGenerationAsIntChanged()

    Emitted when the minServerGenerationAsInt property changes.

    Note: The corresponding handler is onMinServerGenerationAsIntChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.6.


    [since Esri.ArcGISRuntime 100.6] minServerGenerationChanged()

    Emitted when the minServerGeneration property changes.

    Note: The corresponding handler is onMinServerGenerationChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.6.


    pathChanged()

    Emitted when the path property changes.

    Note: The corresponding handler is onPathChanged.


    serviceUrlChanged()

    Emitted when the serviceUrl property changes.

    Note: The corresponding handler is onServiceUrlChanged.


    syncEnabledChanged()

    Emitted when the syncEnabled property changes.

    Note: The corresponding handler is onSyncEnabledChanged.


    syncIdChanged()

    Emitted when the syncId property changes.

    Note: The corresponding handler is onSyncIdChanged.


    syncModelChanged()

    Emitted when the syncModel property changes.

    Note: The corresponding handler is onSyncModelChanged.


    Method Documentation

    [since Esri.ArcGISRuntime 100.3] void beginTransaction()

    Starts a transaction on the geodatabase.

    This method starts a new transaction on the geodatabase. The transaction fails to begin if another transaction is already active. A geodatabase cannot be synchronized while a transaction is active.

    Transactions must be started and stopped on a single thread of execution. This method should only be called once per transaction. Repeatedly calling this method from the same thread will raise an error.

    This method was introduced in Esri.ArcGISRuntime 100.3.


    void cancelLoad()

    See also Loadable.


    [since Esri.ArcGISRuntime 100.14] bool cancelTask(string taskId)

    Cancel the task with the ID taskId.

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

    This method was introduced in Esri.ArcGISRuntime 100.14.

    See also Cancelable.


    [since Esri.ArcGISRuntime 100.1] void close()

    Closes the Geodatabase by forcefully removing all internal references to it.

    This is to allow for deleting a Geodatabase when you're done using it. That can be problematic in some workflows since there can be outstanding references to it and it may be difficult to track and delete them all.

    You should stop using the geodatabase before you close it. For example, you should terminate geodatabase synchronization, remove feature layers from maps, and release the feature tables. Any attempt to access the geodatabase after it is closed will fail, resulting in an error. After closing a geodatabase, you can delete the geodatabase file from the device.

    This method is not needed for typical workflows.

    The close method has no effect on the loadStatus of the Geodatabase. Once closed, the object cannot be reloaded or used again and the loadStatus is no longer indicative of the state.

    Warning: Once close is called the Geodatabase object is in an undefined state and should no longer be used.

    This method was introduced in Esri.ArcGISRuntime 100.1.


    [since Esri.ArcGISRuntime 100.3] void commitTransaction()

    Commits the current transaction on the geodatabase.

    Commits the edits in the current transaction to the geodatabase. This will also end the transaction. An error will be thrown if a transaction has not been started on the geodatabase. Transactions must be started and stopped on a single thread of execution.

    This method was introduced in Esri.ArcGISRuntime 100.3.


    [since Esri.ArcGISRuntime 100.14] string createDomain(DomainDescription domainDescription)

    Creates a new domain in the geodatabase.

    • domainDescription - The description of the domain to create.

    Creating domains is only supported in mobile geodatabases (either created in Pro or via create(string)). The domain name must not already exist in the geodatabase.

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

    This method was introduced in Esri.ArcGISRuntime 100.14.


    [since Esri.ArcGISRuntime 100.14] string createTable(TableDescription tableDescription)

    Creates a new table in the geodatabase.

    • tableDescription - The description of the table to create.

    Creating tables is only supported in mobile geodatabases (either created in Pro or via create(string)). The table name must not already exist in the geodatabase. For additional table name constraints, see TableDescription::tableName. Returns a string representing the task ID of the asynchronous task.

    This method was introduced in Esri.ArcGISRuntime 100.14.


    [since Esri.ArcGISRuntime 100.14] string deleteDomain(string domainName)

    Deletes the domain with the specified name from the geodatabase.

    • domainName - The name of the domain to delete.

    Deleting domains is only supported in mobile geodatabases (either created in Pro or via create(string)). The domain with the specified name must exist in the geodatabase. The domain must not be in use by any fields in existing tables.

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

    This method was introduced in Esri.ArcGISRuntime 100.14.


    [since Esri.ArcGISRuntime 100.14] string deleteTable(string tableName)

    Deletes an existing table from the geodatabase.

    • tableName - The name of the table to delete.

    Deleting tables is only supported in mobile geodatabases in Pro or using create(string)). Attempting further use of a deleted table, such as rendering it in a feature layer or querying it, may result in errors.

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

    This method was introduced in Esri.ArcGISRuntime 100.14.


    void load()

    See also Loadable.


    void retryLoad()

    See also Loadable.


    [since Esri.ArcGISRuntime 100.3] void rollbackTransaction()

    Rollback the edits in the transaction from the geodatabase.

    Discards the edits in the current transaction from the geodatabase. This will also end the transaction. An error will be thrown if a transaction has not been started on the geodatabase. Transactions must be started and stopped on a single thread of execution.

    This method was introduced in Esri.ArcGISRuntime 100.3.


    [since Esri.ArcGISRuntime 100.11] UtilityNetwork utilityNetwork(string utilityNetworkName)

    Returns a UtilityNetwork from the geodatabase with the specified utility network name.

    • utilityNetworkName - The name of the utility network.

    This method was introduced in Esri.ArcGISRuntime 100.11.


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