Geodatabase QML Type

A mobile geodatabase on the local file system. More...

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

Properties

Signals

Methods

Detailed Description

The Geodatabase type is used for opening and accessing the contents of a mobile geodatabase. 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.

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.

// create a feature layer
FeatureLayer {
    // obtain the feature table from the geodatabase by name
    featureTable: gdb.geodatabaseFeatureTablesByTableName["Trailheads"] ?
                      gdb.geodatabaseFeatureTablesByTableName["Trailheads"] :
                      null

    // create the geodatabase
    Geodatabase {
        id: gdb
        path: dataPath + "geodatabase/LA_Trails.geodatabase"

        onErrorChanged: errorMessage = error.message;
    }

    onErrorChanged: errorMessage = error.message;
}

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.


createDomainResult : Domain

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

This property was introduced in 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.


createTableResult : GeodatabaseFeatureTable

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

This property was introduced in 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.


deleteDomainStatus : Enums.TaskStatus

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

This property was introduced in 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.


domains : list<Domain>

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

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

This property was introduced in Esri.ArcGISRuntime 100.14.


error : Error

Returns the error object (read-only).

See also Loadable and Error.


generateGeodatabaseGeometry : Geometry

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

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

If the geodatabase was created using GenerateGeodatabaseJob, this property reflects the GenerateGeodatabaseParameters.extent property. If the geometry was created using GenerateOfflineMapJob, this property reflects the GenerateOfflineMapParameters.areaOfInterest property. If the geodatabase was downloaded as part of a PreplannedMapArea, this property matches the geometry used by the web map author when creating the map area.

If no geometry was used to create the geodatabase (for example if it was authored using ArcGIS Pro), this property may be an empty Geometry.

This property is populated after the geodatabase loads.

This property was introduced in Esri.ArcGISRuntime 100.7.


geodatabaseAnnotationTables : list<GeodatabaseFeatureTable>

Returns a list of geodatabase annotation feature tables in the mobile geodatabase (read-only).

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.

This property is populated after the geodatabase loads.

This property was introduced in Esri::ArcGISRuntime 100.6.


geodatabaseAnnotationTablesByLayerId : jsobject

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

This property is populated after the geodatabase loads.


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.


geodatabaseDimensionTables : list<GeodatabaseFeatureTable>

Returns a list of geodatabase dimension feature tables in the mobile geodatabase (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.

This property is populated after the geodatabase loads.


geodatabaseDimensionTablesByLayerId : jsobject

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

This property is populated after the geodatabase loads.


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.


geodatabaseFeatureTables : list<GeodatabaseFeatureTable>

Returns a list of geodatabase feature tables in the mobile geodatabase (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.


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.


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.


hasLocalEdits : bool

Returns whether the geodatabase has local edits (read-only).

This property is populated after the geodatabase loads.

For mobile geodatabases created by ArcGIS Pro, this method returns false because there is no concept of uploading or applying edits. For tables from mobile geodatabases, use GeodatabaseFeatureTable::hasLocalEditsSince.


inTransaction : bool

Returns whether a transaction is currently active on the geodatabase (read-only).

This property was introduced in Esri.ArcGISRuntime 100.3.


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 code of this Loadable object (read-only).

See also Enums.LoadStatus and Loadable.


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 Runtime 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 GeodatabaseSyncTask::importGeodatabaseDelta and minServerGenerationAsInt.


minServerGenerationAsInt : double

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

Note: The underlying Runtime 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.

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


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.


syncEnabled : bool

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

This property is populated after the geodatabase loads.


syncId : string

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

The geodatabase's sync ID is the same as the replica ID described in the REST documentation. This is used by the service that created the geodatabase to uniquely identify it when carrying out sync operations. It can also be used when unregistering the geodatabase if it has already been deleted locally.

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.


syncModel : Enums.SyncModel

Returns the geodatabase's supported sync model (read-only).

This property is populated after the geodatabase loads.

See also Enums.SyncModel.


utilityNetworks : list<UtilityNetwork>

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


createDomainStatusChanged()

Emitted when the createDomainStatus property changes.

Note: The corresponding handler is onCreateDomainStatusChanged.

This signal was introduced in 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.


deleteDomainStatusChanged()

Emitted when the deleteDomainStatus property changes.

Note: The corresponding handler is onDeleteDomainStatusChanged.

This signal was introduced in 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.


deleteTableStatusChanged()

Emitted when the deleteTableStatus property changes.

Note: The corresponding handler is onDeleteTableStatusChanged.

This signal was introduced in 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.


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.


geodatabaseDimensionTablesByLayerIdChanged()

Emitted when the geodatabaseDimensionTablesByLayerId property changes.

Note: The corresponding handler is onGeodatabaseDimensionTablesByLayerIdChanged.

This signal was introduced in 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.


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.


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.


minServerGenerationAsIntChanged()

Emitted when the minServerGenerationAsInt property changes.

Note: The corresponding handler is onMinServerGenerationAsIntChanged.

This signal was introduced in 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

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.

This method was introduced in Esri.ArcGISRuntime 100.3.


void cancelLoad()

See also Loadable.


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.


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.

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.


void commitTransaction()

Commits the current transaction on the geodatabase.

This method ends the current transaction and commits the changes.

This method was introduced in Esri.ArcGISRuntime 100.3.


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.


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.


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.


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 (either created in Pro or via create(string)). A table with the specified name must exist in the geodatabase. 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.


void rollbackTransaction()

Rolls back the current transaction on the geodatabase.

This method ends the current transaction and discards the changes from the geodatabase.

This method was introduced in Esri.ArcGISRuntime 100.3.


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.