QGIS/python/core/auto_generated/qgsabstractproviderconnection.sip.in
Alessandro Pasotti a3c4eb9947
Providers connections interface API
This is the implementation of the new DB connections API (grant proposal 2019).
Summary

The new API makes it available to QGIS core a new interface for provider connections and will allow to:

    replace the provider specific QgsSettings management in QGIS4 (save/load connections from the settings) NOT IN SCOPE FOR NOW.
    provide a unified API for common operations on DB connections:
        executeSql and get the results
        list tables names and properties and schemas
        create a new vector table (no rasters for now)
        create/rename/drop schemas and tables
        vacuum
       ....
2019-08-16 20:44:05 +02:00

98 lines
3.1 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsabstractproviderconnection.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsAbstractProviderConnection
{
%Docstring
The QgsAbstractProviderConnection provides an interface for data provider connections.
Connections objects can be created by passing the connection name and in this case
they are automatically loaded from the settings, or by passing a data source URI
in the constructor.
Concrete classes must implement methods to retrieve, save and remove connections from
the settings.
.. versionadded:: 3.10
%End
%TypeHeaderCode
#include "qgsabstractproviderconnection.h"
%End
%ConvertToSubClassCode
if ( dynamic_cast<QgsAbstractDatabaseProviderConnection *>( sipCpp ) != NULL )
{
sipType = sipType_QgsAbstractDatabaseProviderConnection;
}
else if ( dynamic_cast<QgsAbstractProviderConnection *>( sipCpp ) != NULL )
{
sipType = sipType_QgsAbstractProviderConnection;
}
else
{
sipType = 0;
}
%End
public:
QgsAbstractProviderConnection( const QString &name );
%Docstring
Creates a new connection with ``name`` by reading its configuration from the settings.
If a connection with this name cannot be found, an empty connection will be returned.
%End
QgsAbstractProviderConnection( const QString &name, const QString &uri );
%Docstring
Creates a new connection with ``name`` and initializes the connection from the ``uri``.
The connection is not automatically stored in the settings.
.. seealso:: :py:func:`store`
%End
virtual ~QgsAbstractProviderConnection();
virtual void store( const QVariantMap &configuration = QVariantMap() ) const = 0;
%Docstring
Stores the connection in the settings.
:param configuration: stores additional connection settings that are used by the
source select dialog and are not part of the data source URI
%End
virtual void remove( ) const = 0;
%Docstring
Deletes the connection from the settings.
%End
QString name() const;
%Docstring
Returns the connection name
%End
QString uri() const;
%Docstring
Returns the connection data source URI string representation
%End
void setUri( const QString &uri );
%Docstring
Sets the connection data source URI to ``uri``
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsabstractproviderconnection.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/