FromDefinitionDataSourceBuilder Class

Summary: Provides the ability to configure a data source object

Module: aspose.gis.formats.database.fromdefinition

Full Name: aspose.gis.formats.database.fromdefinition.FromDefinitionDataSourceBuilder

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.
build()The method retrieves an implementation of the IFromDefinitionDataSource
geometry_field(name)Configures the name of the field from which the geometry will be extracted.
identity_attribute(name, overwrite_same_key)Mandatory setting that allows tracking changes.

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 database field for attribute.
typeAttributeDataTypeType of data into which data from the database should be converted.

Returns

TypeDescription
FromDefinitionDataSourceBuilderFromDefinitionDataSourceBuilder

Method: build()

 build() 

The method retrieves an implementation of the IFromDefinitionDataSource

Returns

TypeDescription
IFromDefinitionDataSourceImplementation of the IFromDefinitionDataSource

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
FromDefinitionDataSourceBuilderFromDefinitionDataSourceBuilder

Method: identity_attribute(name, overwrite_same_key)

 identity_attribute(name, overwrite_same_key) 

Mandatory setting that allows tracking changes.

Parameters:

ParameterTypeDescription
namestringAn 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.
Otherwise, an exception will be thrown.

Returns

TypeDescription
FromDefinitionDataSourceBuilderFromDefinitionDataSourceBuilder