Class: QgsProcessingParameterDatabaseSchema

A database schema parameter for processing algorithms, allowing users to select from existing schemas on a registered database connection.

QgsProcessingParameterDatabaseSchema should be evaluated by calling QgsProcessingAlgorithm.parameterAsSchema().

Added in version 3.14.

Class Hierarchy

Inheritance diagram of qgis.core.QgsProcessingParameterDatabaseSchema

Base classes

QgsProcessingParameterDefinition

Base class for the definition of processing parameters.

Methods

parentConnectionParameterName

Returns the name of the parent connection parameter, or an empty string if this is not set.

setParentConnectionParameterName

Sets the name of the parent connection parameter.

Static Methods

fromScriptCode

Creates a new parameter using the definition from a script code.

typeName

Returns the type name for the parameter class.

class qgis.core.QgsProcessingParameterDatabaseSchema[source]

Bases: QgsProcessingParameterDefinition

__init__(name: str | None, description: str | None, connectionParameterName: str | None = '', defaultValue: Any = None, optional: bool = False)

Constructor for QgsProcessingParameterDatabaseSchema.

The connectionParameterName specifies the name of the parent QgsProcessingParameterProviderConnection parameter.

Warning

The provider must support the connection API methods in its QgsProviderMetadata implementation in order for the model to work correctly. This is only implemented for a subset of current data providers.

Parameters:
  • name (Optional[str])

  • description (Optional[str])

  • connectionParameterName (Optional[str] = '')

  • defaultValue (Any = None)

  • optional (bool = False)

__init__(a0: QgsProcessingParameterDatabaseSchema)
Parameters:

a0 (QgsProcessingParameterDatabaseSchema)

static fromScriptCode(name: str | None, description: str | None, isOptional: bool, definition: str | None) QgsProcessingParameterDatabaseSchema | None[source]

Creates a new parameter using the definition from a script code.

Parameters:
  • name (Optional[str])

  • description (Optional[str])

  • isOptional (bool)

  • definition (Optional[str])

Return type:

Optional[QgsProcessingParameterDatabaseSchema]

parentConnectionParameterName(self) str[source]

Returns the name of the parent connection parameter, or an empty string if this is not set.

Return type:

str

setParentConnectionParameterName(self, name: str | None)[source]

Sets the name of the parent connection parameter. Use an empty string if this is not required.

Parameters:

name (Optional[str])

static typeName() str[source]

Returns the type name for the parameter class.

Return type:

str