DatabaseQueryDataSourceBuilder Class
Summary: Provides the ability to configure a query to database to to extract geospatial information.
Module: aspose.gis.formats.database
Full Name: aspose.gis.formats.database.DatabaseQueryDataSourceBuilder
Aspose.PSD Version: 25.9.0
Methods
| Name | Description |
|---|---|
| add_attribute(name, type) | Configures the name of the field that will contain information for the feature attribute. |
| as_trackable_for_changes(table_name, identity_attribute, overwrite_same_key, db_func) | Configure the resulting layer to track changes and create a data source to synchronize the changes made. |
| build() | The method retrieves an implementation of the IDatabaseDataSource |
| geometry_field(name) | Configures the name of the field from which the geometry will be extracted. |
| srid_field(name) | Configuring the name of the query field that will contain the spatial reference system identifier (srid). |
| use_external_srs_from_query(srs_query) | Allows you to configure the data source to use third-party spatial reference system data, bypassing the pre-installed data in the Aspose.GIS library. |
Method: add_attribute(name, type)
add_attribute(name, type)
Configures the name of the field that will contain information for the feature attribute.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string | Name of query field for attribute. |
| type | AttributeDataType | Type of data into which data from the database should be converted. |
Returns
| Type | Description |
|---|---|
| DatabaseQueryDataSourceBuilder | DatabaseQueryDataSourceBuilder |
Method: as_trackable_for_changes(table_name, identity_attribute, overwrite_same_key, db_func)
as_trackable_for_changes(table_name, identity_attribute, overwrite_same_key, db_func)
Configure the resulting layer to track changes and create a data source to synchronize the changes made.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| table_name | string | The name of the table where the changes will be made. |
| identity_attribute | string | An attribute of a feature that will be treated as uniquely identifying the feature. |
| overwrite_same_key | bool | If this flag is set to true, then newly added features with a unique identifier the same that is already present in the layer, the current one will be overwritten, and the data will be read as updated if differences are found. |
| db_func | string | Function that will be supplied in SQL query to transform binary data into geographic data representation of the current database. |
Returns
| Type | Description |
|---|---|
| DatabaseEditableDataSourceBuilder | DatabaseEditableDataSourceBuilder |
Method: build()
build()
The method retrieves an implementation of the IDatabaseDataSource
Returns
| Type | Description |
|---|---|
| IDatabaseDataSource | Implementation of the IDatabaseDataSource |
Method: geometry_field(name)
geometry_field(name)
Configures the name of the field from which the geometry will be extracted.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string | Name of gemetry field. |
Returns
| Type | Description |
|---|---|
| DatabaseQueryDataSourceBuilder | DatabaseQueryDataSourceBuilder |
Method: srid_field(name)
srid_field(name)
Configuring the name of the query field that will contain the spatial reference system identifier (srid).
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string | Name of the query field containing the spatial reference system identifier. |
Returns
| Type | Description |
|---|---|
| DatabaseQueryDataSourceBuilder | DatabaseQueryDataSourceBuilder |
Method: use_external_srs_from_query(srs_query)
use_external_srs_from_query(srs_query)
Allows you to configure the data source to use third-party spatial reference system data, bypassing the pre-installed data in the Aspose.GIS library.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| srs_query | string | Query to retrieve information about additional spatial coordinate systems used in the main query to retrieve features. |
Returns
| Type | Description |
|---|---|
| DatabaseExternalSrsSettingsBuilder | DatabaseExternalSrsSettingsBuilder |