2017-04-24 11:51:09 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsdatasourceuri.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-04 09:10:08 +02:00
|
|
|
class QgsDataSourceUri
|
2009-09-12 20:37:31 +00:00
|
|
|
{
|
|
|
|
|
2017-04-24 11:51:09 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsdatasourceuri.h"
|
|
|
|
%End
|
2018-05-15 17:37:18 -04:00
|
|
|
public:
|
|
|
|
static const QMetaObject staticMetaObject;
|
|
|
|
|
2012-08-02 23:57:11 +02:00
|
|
|
public:
|
2017-04-24 11:51:09 +02:00
|
|
|
enum SslMode
|
|
|
|
{
|
|
|
|
SslPrefer,
|
|
|
|
SslDisable,
|
|
|
|
SslAllow,
|
|
|
|
SslRequire,
|
|
|
|
SslVerifyCa,
|
|
|
|
SslVerifyFull
|
|
|
|
};
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2016-08-04 09:10:08 +02:00
|
|
|
QgsDataSourceUri();
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
default constructor
|
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2016-08-04 09:10:08 +02:00
|
|
|
QgsDataSourceUri( QString uri );
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
constructor which parses input URI
|
|
|
|
%End
|
|
|
|
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2015-09-21 05:42:53 -06:00
|
|
|
QString connectionInfo( bool expandAuthConfig = true ) const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns connection part of URI
|
2017-04-24 11:51:09 +02:00
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2015-09-21 05:42:53 -06:00
|
|
|
QString uri( bool expandAuthConfig = true ) const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns complete uri
|
2017-04-24 11:51:09 +02:00
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2012-10-10 11:57:00 +03:00
|
|
|
QByteArray encodedUri() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns complete encoded uri (generic mode)
|
2017-04-24 11:51:09 +02:00
|
|
|
%End
|
2012-10-10 11:57:00 +03:00
|
|
|
|
2016-02-14 03:50:23 +01:00
|
|
|
|
2017-04-24 11:51:09 +02:00
|
|
|
void setEncodedUri( const QString &uri );
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets complete encoded uri (generic mode)
|
2017-04-24 11:51:09 +02:00
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
|
|
|
QString quotedTablename() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
quoted table name
|
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
|
|
|
void setParam( const QString &key, const QString &value );
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Set generic param (generic mode)
|
|
|
|
|
2017-04-24 11:51:09 +02:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
if key exists, another is inserted
|
|
|
|
%End
|
2014-01-26 18:35:21 +01:00
|
|
|
void setParam( const QString &key, const QStringList &value ) /PyName=setParamList/;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-04-24 11:51:09 +02:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
available in Python as setParamList
|
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
int removeParam( const QString &key );
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Remove generic param (generic mode)
|
|
|
|
|
2017-04-24 11:51:09 +02:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
remove all occurrences of key, returns number of params removed
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2012-08-02 23:57:11 +02:00
|
|
|
QString param( const QString &key ) const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
2018-05-26 18:44:30 +10:00
|
|
|
Gets generic param (generic mode)
|
2017-04-24 11:51:09 +02:00
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
|
|
|
QStringList params( const QString &key ) const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
2018-05-26 18:44:30 +10:00
|
|
|
Gets multiple generic param (generic mode)
|
2017-04-24 11:51:09 +02:00
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
|
|
|
bool hasParam( const QString &key ) const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
Test if param exists (generic mode)
|
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2017-04-24 11:51:09 +02:00
|
|
|
void setConnection( const QString &aHost,
|
|
|
|
const QString &aPort,
|
|
|
|
const QString &aDatabase,
|
|
|
|
const QString &aUsername,
|
|
|
|
const QString &aPassword,
|
2016-08-04 09:10:08 +02:00
|
|
|
SslMode sslmode = SslPrefer,
|
2017-04-24 11:51:09 +02:00
|
|
|
const QString &authConfigId = QString() );
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets all connection related members at once
|
2017-04-24 11:51:09 +02:00
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2017-04-24 11:51:09 +02:00
|
|
|
void setConnection( const QString &aService,
|
|
|
|
const QString &aDatabase,
|
|
|
|
const QString &aUsername,
|
|
|
|
const QString &aPassword,
|
2016-08-04 09:10:08 +02:00
|
|
|
SslMode sslmode = SslPrefer,
|
2017-04-24 11:51:09 +02:00
|
|
|
const QString &authConfigId = QString() );
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets all connection related members at once (for the service case)
|
2017-04-24 11:51:09 +02:00
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
|
|
|
void setDatabase( const QString &database );
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets database
|
2017-04-24 11:51:09 +02:00
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2017-04-24 11:51:09 +02:00
|
|
|
void setDataSource( const QString &aSchema,
|
|
|
|
const QString &aTable,
|
|
|
|
const QString &aGeometryColumn,
|
|
|
|
const QString &aSql = QString(),
|
|
|
|
const QString &aKeyColumn = QString() );
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets all data source related members at once
|
2017-04-24 11:51:09 +02:00
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2017-04-24 11:51:09 +02:00
|
|
|
void setAuthConfigId( const QString &authcfg );
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets authentication configuration ID
|
2017-04-24 11:51:09 +02:00
|
|
|
%End
|
2015-09-21 05:42:53 -06:00
|
|
|
|
2017-04-24 11:51:09 +02:00
|
|
|
void setUsername( const QString &username );
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets username
|
2017-04-24 11:51:09 +02:00
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2017-04-24 11:51:09 +02:00
|
|
|
void setPassword( const QString &password );
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets password
|
2017-04-24 11:51:09 +02:00
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2017-04-24 11:51:09 +02:00
|
|
|
static QString removePassword( const QString &aUri );
|
|
|
|
%Docstring
|
|
|
|
Removes password element from uris
|
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2015-09-21 05:42:53 -06:00
|
|
|
QString authConfigId() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
Any associated authentication configuration ID
|
|
|
|
%End
|
2016-02-14 03:50:23 +01:00
|
|
|
|
2012-08-02 23:57:11 +02:00
|
|
|
QString username() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the username
|
|
|
|
%End
|
2016-02-14 03:50:23 +01:00
|
|
|
|
2012-08-02 23:57:11 +02:00
|
|
|
QString schema() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the schema
|
|
|
|
%End
|
2016-02-14 03:50:23 +01:00
|
|
|
|
2012-08-02 23:57:11 +02:00
|
|
|
QString table() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the table
|
|
|
|
%End
|
2016-02-14 03:50:23 +01:00
|
|
|
|
2012-08-02 23:57:11 +02:00
|
|
|
QString sql() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the SQL query
|
|
|
|
%End
|
2016-02-14 03:50:23 +01:00
|
|
|
|
2012-08-02 23:57:11 +02:00
|
|
|
QString geometryColumn() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns the name of the geometry column
|
2017-04-24 11:51:09 +02:00
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2017-02-21 18:14:58 +01:00
|
|
|
void setUseEstimatedMetadata( bool flag );
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets use Estimated Metadata
|
2017-04-24 11:51:09 +02:00
|
|
|
%End
|
2016-02-14 03:50:23 +01:00
|
|
|
|
2012-08-02 23:57:11 +02:00
|
|
|
bool useEstimatedMetadata() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
Returns true if estimated metadata are used
|
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2017-02-21 18:14:58 +01:00
|
|
|
void disableSelectAtId( bool flag );
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets to true to disable selection by id
|
2017-04-24 11:51:09 +02:00
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
bool selectAtIdDisabled() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
Returns whether the selection by id is disabled
|
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
|
|
|
void clearSchema();
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
Clears the schema
|
|
|
|
%End
|
2016-01-04 22:51:18 +11:00
|
|
|
|
2017-04-24 11:51:09 +02:00
|
|
|
void setSchema( const QString &schema );
|
2016-01-04 22:51:18 +11:00
|
|
|
|
2017-04-24 11:51:09 +02:00
|
|
|
void setSql( const QString &sql );
|
|
|
|
%Docstring
|
|
|
|
Sets the SQL query
|
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
|
|
|
QString host() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the host
|
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
QString database() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the database
|
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
QString port() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the port
|
|
|
|
%End
|
2016-04-03 17:55:50 -04:00
|
|
|
QString driver() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
void setDriver( const QString &driver );
|
2012-08-02 23:57:11 +02:00
|
|
|
QString password() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the password
|
|
|
|
%End
|
2016-08-04 09:10:08 +02:00
|
|
|
SslMode sslMode() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the SSL mode
|
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
|
|
|
QString service() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the service name
|
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
|
|
|
QString keyColumn() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the name of the (primary) key column
|
|
|
|
%End
|
|
|
|
void setKeyColumn( const QString &column );
|
|
|
|
%Docstring
|
|
|
|
Sets the name of the (primary) key column
|
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
2016-08-04 09:10:08 +02:00
|
|
|
QgsWkbTypes::Type wkbType() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
The wkb type.
|
2017-04-24 11:51:09 +02:00
|
|
|
%End
|
2016-02-04 10:05:29 +01:00
|
|
|
|
2016-08-04 09:10:08 +02:00
|
|
|
void setWkbType( QgsWkbTypes::Type type );
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
Sets the wkb type
|
|
|
|
%End
|
2012-08-02 23:57:11 +02:00
|
|
|
|
|
|
|
QString srid() const;
|
2017-04-24 11:51:09 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the srid
|
|
|
|
%End
|
|
|
|
void setSrid( const QString &srid );
|
|
|
|
%Docstring
|
|
|
|
Sets the srid
|
2018-04-04 22:38:01 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
static SslMode decodeSslMode( const QString &sslMode );
|
|
|
|
%Docstring
|
|
|
|
Decodes SSL mode string into enum value. If the string is not recognized, SslPrefer is returned.
|
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
|
|
|
%End
|
|
|
|
|
|
|
|
static QString encodeSslMode( SslMode sslMode );
|
|
|
|
%Docstring
|
|
|
|
Encodes SSL mode enum value into a string.
|
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
2017-04-24 11:51:09 +02:00
|
|
|
%End
|
|
|
|
|
2009-09-12 20:37:31 +00:00
|
|
|
};
|
2017-04-24 11:51:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsdatasourceuri.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|