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;
243 void setSchema(
const QString &schema );
253 void setSql(
const QString &sql );
256 QString host()
const;
258 QString database()
const;
260 QString port()
const;
265 QString driver()
const;
270 void setDriver(
const QString &driver );
273 QString password()
const;
279 QString service()
const;
282 QString keyColumn()
const;
285 void setKeyColumn(
const QString &column );
296 QString srid()
const;
299 void setSrid(
const QString &srid );
305 static SslMode decodeSslMode(
const QString &sslMode );
311 static QString encodeSslMode(
SslMode sslMode );
317 void setTable(
const QString &table );
323 void setGeometryColumn(
const QString &geometryColumn );
329 QSet<QString> parameterKeys()
const;
346 QString
httpHeader(
const QString &key ) {
return mHttpHeaders[key].toString(); }
355 SIP_PYOBJECT __repr__();
357 QString str = QStringLiteral(
"<QgsDataSourceUri: %1>" ).arg( sipCpp->uri(
false ) );
358 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
363 void skipBlanks(
const QString &uri,
int &i );
364 QString getValue(
const QString &uri,
int &i );
365 QString escape(
const QString &uri, QChar delim )
const;
384 QString mGeometryColumn;
388 QString mAuthConfigId;
394 SslMode mSSLmode = SslPrefer;
398 bool mUseEstimatedMetadata =
false;
400 bool mSelectAtIdDisabled =
false;
402 bool mSelectAtIdDisabledSet =
false;
408 QMultiMap<QString, QString> mParams;