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 );
162 void setDataSource(
const QString &aSchema,
163 const QString &aTable,
164 const QString &aGeometryColumn,
165 const QString &aSql = QString(),
166 const QString &aKeyColumn = QString() );
171 void setAuthConfigId(
const QString &authcfg );
176 void setUsername(
const QString &username );
181 void setPassword(
const QString &password );
186 static QString removePassword(
const QString &aUri );
191 QString authConfigId()
const;
194 QString username()
const;
197 QString schema()
const;
200 QString table()
const;
206 QString geometryColumn()
const;
209 void setUseEstimatedMetadata(
bool flag );
212 bool useEstimatedMetadata()
const;
215 void disableSelectAtId(
bool flag );
218 bool selectAtIdDisabled()
const;
227 void setSchema(
const QString &schema );
230 void setSql(
const QString &sql );
233 QString host()
const;
235 QString database()
const;
237 QString port()
const;
243 QString driver()
const;
249 void setDriver(
const QString &driver );
252 QString password()
const;
258 QString service()
const;
261 QString keyColumn()
const;
264 void setKeyColumn(
const QString &column );
275 QString srid()
const;
278 void setSrid(
const QString &srid );
284 static SslMode decodeSslMode(
const QString &sslMode );
290 static QString encodeSslMode(
SslMode sslMode );
293 void skipBlanks(
const QString &uri,
int &i );
294 QString getValue(
const QString &uri,
int &i );
295 QString escape(
const QString &uri, QChar delim )
const;
314 QString mGeometryColumn;
318 QString mAuthConfigId;
328 bool mUseEstimatedMetadata =
false;
330 bool mSelectAtIdDisabled =
false;
336 QMap<QString, QString> mParams;
339 #endif //QGSDATASOURCEURI_H
SslMode
Available SSQL connection modes.
Type
The WKB type describes the number of dimensions a geometry has.
Class for storing the component parts of a RDBMS data source URI (e.g.