19 #ifndef QGSDATASOURCEURI_H 20 #define QGSDATASOURCEURI_H 22 #include "qgis_core.h" 66 QString connectionInfo(
bool expandAuthConfig =
true )
const;
69 QString uri(
bool expandAuthConfig =
true )
const;
72 QByteArray encodedUri()
const;
78 void setEncodedUri(
const QByteArray &uri )
SIP_SKIP;
81 void setEncodedUri(
const QString &uri );
84 QString quotedTablename()
const;
90 void setParam(
const QString &key,
const QString &value );
92 void setParam(
const QString &key,
const QStringList &value )
SIP_PYNAME( setParamList );
98 int removeParam(
const QString &key );
101 QString param(
const QString &key )
const;
104 QStringList params(
const QString &key )
const;
107 bool hasParam(
const QString &key )
const;
110 void setConnection(
const QString &aHost,
111 const QString &aPort,
112 const QString &aDatabase,
113 const QString &aUsername,
114 const QString &aPassword,
116 const QString &authConfigId = QString() );
119 void setConnection(
const QString &aService,
120 const QString &aDatabase,
121 const QString &aUsername,
122 const QString &aPassword,
124 const QString &authConfigId = QString() );
127 void setDatabase(
const QString &database );
130 void setDataSource(
const QString &aSchema,
131 const QString &aTable,
132 const QString &aGeometryColumn,
133 const QString &aSql = QString(),
134 const QString &aKeyColumn = QString() );
137 void setAuthConfigId(
const QString &authcfg );
140 void setUsername(
const QString &username );
143 void setPassword(
const QString &password );
146 static QString removePassword(
const QString &aUri );
149 QString authConfigId()
const;
152 QString username()
const;
155 QString schema()
const;
158 QString table()
const;
164 QString geometryColumn()
const;
167 void setUseEstimatedMetadata(
bool flag );
170 bool useEstimatedMetadata()
const;
173 void disableSelectAtId(
bool flag );
175 bool selectAtIdDisabled()
const;
182 void setSchema(
const QString &schema );
185 void setSql(
const QString &sql );
188 QString host()
const;
190 QString database()
const;
192 QString port()
const;
195 QString driver()
const;
198 void setDriver(
const QString &driver );
200 QString password()
const;
205 QString service()
const;
208 QString keyColumn()
const;
210 void setKeyColumn(
const QString &column );
221 QString srid()
const;
223 void setSrid(
const QString &srid );
229 static SslMode decodeSslMode(
const QString &sslMode );
235 static QString encodeSslMode(
SslMode sslMode );
238 void skipBlanks(
const QString &uri,
int &i );
239 QString getValue(
const QString &uri,
int &i );
240 QString escape(
const QString &uri, QChar delim )
const;
259 QString mGeometryColumn;
263 QString mAuthConfigId;
273 bool mUseEstimatedMetadata =
false;
275 bool mSelectAtIdDisabled =
false;
281 QMap<QString, QString> mParams;
284 #endif //QGSDATASOURCEURI_H
Type
The WKB type describes the number of dimensions a geometry has.
Class for storing the component parts of a PostgreSQL/RDBMS datasource URI.