72 QString connectionInfo(
bool expandAuthConfig =
true )
const;
77 QString uri(
bool expandAuthConfig =
true )
const;
82 QByteArray encodedUri()
const;
89 void setEncodedUri(
const QByteArray &uri )
SIP_SKIP;
94 void setEncodedUri(
const QString &uri );
99 QString quotedTablename()
const;
106 void setParam(
const QString &key,
const QString &value );
112 void setParam(
const QString &key,
const QStringList &value )
SIP_PYNAME( setParamList );
118 int removeParam(
const QString &key );
123 QString param(
const QString &key )
const;
128 QStringList params(
const QString &key )
const;
133 bool hasParam(
const QString &key )
const;
138 void setConnection(
const QString &aHost,
139 const QString &aPort,
140 const QString &aDatabase,
141 const QString &aUsername,
142 const QString &aPassword,
144 const QString &authConfigId = QString() );
149 void setConnection(
const QString &aService,
150 const QString &aDatabase,
151 const QString &aUsername,
152 const QString &aPassword,
154 const QString &authConfigId = QString() );
159 void setDatabase(
const QString &database );
167 void setDataSource(
const QString &aSchema,
168 const QString &aTable,
169 const QString &aGeometryColumn,
170 const QString &aSql = QString(),
171 const QString &aKeyColumn = QString() );
176 void setAuthConfigId(
const QString &authcfg );
181 void setUsername(
const QString &username );
186 void setPassword(
const QString &password );
196 static QString removePassword(
const QString &aUri,
bool hide =
false );
201 QString authConfigId()
const;
204 QString username()
const;
207 QString schema()
const;
210 QString table()
const;
223 QString geometryColumn()
const;
226 void setUseEstimatedMetadata(
bool flag );
229 bool useEstimatedMetadata()
const;
232 void disableSelectAtId(
bool flag );
235 bool selectAtIdDisabled()
const;
244 void setSchema(
const QString &schema );
254 void setSql(
const QString &sql );
257 QString host()
const;
259 QString database()
const;
261 QString port()
const;
267 QString driver()
const;
273 void setDriver(
const QString &driver );
276 QString password()
const;
282 QString service()
const;
285 QString keyColumn()
const;
288 void setKeyColumn(
const QString &column );
299 QString srid()
const;
302 void setSrid(
const QString &srid );
308 static SslMode decodeSslMode(
const QString &sslMode );
314 static QString encodeSslMode(
SslMode sslMode );
320 void setTable(
const QString &table );
326 void setGeometryColumn(
const QString &geometryColumn );
332 QSet<QString> parameterKeys()
const;
349 QString
httpHeader(
const QString &key ) {
return mHttpHeaders[key].toString(); }
358 SIP_PYOBJECT __repr__();
360 QString
str = QStringLiteral(
"<QgsDataSourceUri: %1>" ).arg( sipCpp->uri(
false ) );
361 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
366 void skipBlanks(
const QString &uri,
int &i );
367 QString getValue(
const QString &uri,
int &i );
368 QString escape(
const QString &uri, QChar delim )
const;
387 QString mGeometryColumn;
391 QString mAuthConfigId;
397 SslMode mSSLmode = SslPrefer;
401 bool mUseEstimatedMetadata =
false;
403 bool mSelectAtIdDisabled =
false;
405 bool mSelectAtIdDisabledSet =
false;
411 QMultiMap<QString, QString> mParams;