19 #ifndef QGSDATASOURCEURI_H
20 #define QGSDATASOURCEURI_H
22 #include "qgis_core.h"
70 QString connectionInfo(
bool expandAuthConfig =
true )
const;
75 QString uri(
bool expandAuthConfig =
true )
const;
80 QByteArray encodedUri()
const;
87 void setEncodedUri(
const QByteArray &uri )
SIP_SKIP;
92 void setEncodedUri(
const QString &uri );
97 QString quotedTablename()
const;
104 void setParam(
const QString &key,
const QString &value );
110 void setParam(
const QString &key,
const QStringList &value )
SIP_PYNAME( setParamList );
116 int removeParam(
const QString &key );
121 QString param(
const QString &key )
const;
126 QStringList params(
const QString &key )
const;
131 bool hasParam(
const QString &key )
const;
136 void setConnection(
const QString &aHost,
137 const QString &aPort,
138 const QString &aDatabase,
139 const QString &aUsername,
140 const QString &aPassword,
142 const QString &authConfigId = QString() );
147 void setConnection(
const QString &aService,
148 const QString &aDatabase,
149 const QString &aUsername,
150 const QString &aPassword,
152 const QString &authConfigId = QString() );
157 void setDatabase(
const QString &database );
165 void setDataSource(
const QString &aSchema,
166 const QString &aTable,
167 const QString &aGeometryColumn,
168 const QString &aSql = QString(),
169 const QString &aKeyColumn = QString() );
174 void setAuthConfigId(
const QString &authcfg );
179 void setUsername(
const QString &username );
184 void setPassword(
const QString &password );
189 static QString removePassword(
const QString &aUri );
194 QString authConfigId()
const;
197 QString username()
const;
200 QString schema()
const;
203 QString table()
const;
216 QString geometryColumn()
const;
219 void setUseEstimatedMetadata(
bool flag );
222 bool useEstimatedMetadata()
const;
225 void disableSelectAtId(
bool flag );
228 bool selectAtIdDisabled()
const;
237 void setSchema(
const QString &schema );
247 void setSql(
const QString &sql );
250 QString host()
const;
252 QString database()
const;
254 QString port()
const;
260 QString driver()
const;
266 void setDriver(
const QString &driver );
269 QString password()
const;
275 QString service()
const;
278 QString keyColumn()
const;
281 void setKeyColumn(
const QString &column );
292 QString srid()
const;
295 void setSrid(
const QString &srid );
301 static SslMode decodeSslMode(
const QString &sslMode );
307 static QString encodeSslMode(
SslMode sslMode );
313 void setTable(
const QString &table );
319 void setGeometryColumn(
const QString &geometryColumn );
322 SIP_PYOBJECT __repr__();
324 QString
str = QStringLiteral(
"<QgsDataSourceUri: %1>" ).arg( sipCpp->uri(
false ) );
325 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
330 void skipBlanks(
const QString &uri,
int &i );
331 QString getValue(
const QString &uri,
int &i );
332 QString escape(
const QString &uri, QChar delim )
const;
351 QString mGeometryColumn;
355 QString mAuthConfigId;
365 bool mUseEstimatedMetadata =
false;
367 bool mSelectAtIdDisabled =
false;
373 QMultiMap<QString, QString> mParams;
Class for storing the component parts of a RDBMS data source URI (e.g.
SslMode
Available SSL connection modes.
QgsDataSourceUri(const QByteArray &uri)
Constructor for QgsDataSourceUri which parses an input encoded uri).
Type
The WKB type describes the number of dimensions a geometry has.