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

NameDescription
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:

ParameterTypeDescription
namestringName of query field for attribute.
typeAttributeDataTypeType of data into which data from the database should be converted.

Returns

TypeDescription
DatabaseQueryDataSourceBuilderDatabaseQueryDataSourceBuilder

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:

ParameterTypeDescription
table_namestringThe name of the table where the changes will be made.
identity_attributestringAn attribute of a feature that will be treated as uniquely identifying the feature.
overwrite_same_keyboolIf 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_funcstringFunction that will be supplied in SQL query to transform binary data into geographic data representation of the current database.

Returns

TypeDescription
DatabaseEditableDataSourceBuilderDatabaseEditableDataSourceBuilder

Method: build()

 build() 

The method retrieves an implementation of the IDatabaseDataSource

Returns

TypeDescription
IDatabaseDataSourceImplementation of the IDatabaseDataSource

Method: geometry_field(name)

 geometry_field(name) 

Configures the name of the field from which the geometry will be extracted.

Parameters:

ParameterTypeDescription
namestringName of gemetry field.

Returns

TypeDescription
DatabaseQueryDataSourceBuilderDatabaseQueryDataSourceBuilder

Method: srid_field(name)

 srid_field(name) 

Configuring the name of the query field that will contain the spatial reference system identifier (srid).

Parameters:

ParameterTypeDescription
namestringName of the query field containing the spatial reference system identifier.

Returns

TypeDescription
DatabaseQueryDataSourceBuilderDatabaseQueryDataSourceBuilder

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:

ParameterTypeDescription
srs_querystringQuery to retrieve information about additional spatial coordinate systems used in the main query to retrieve features.

Returns

TypeDescription
DatabaseExternalSrsSettingsBuilderDatabaseExternalSrsSettingsBuilder