mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-24 00:47:57 -05:00
52 lines
1.3 KiB
Plaintext
52 lines
1.3 KiB
Plaintext
/**
|
|
\struct QgsDataSourceURI
|
|
\brief Structure for storing the component parts of a PostgreSQL/RDBMS datasource URI.
|
|
|
|
This structure stores the database connection information, including host, database,
|
|
user name, password, schema, password, and sql where clause
|
|
*/
|
|
class QgsDataSourceURI
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgsdatasourceuri.h>
|
|
%End
|
|
|
|
public:
|
|
|
|
//! default constructor
|
|
QgsDataSourceURI();
|
|
|
|
//! constructor which parses input URI
|
|
QgsDataSourceURI(QString uri);
|
|
|
|
//! connection info
|
|
QString connectionInfo() const;
|
|
|
|
//! complete uri
|
|
QString uri() const;
|
|
|
|
//! quoted table name
|
|
QString quotedTablename() const;
|
|
|
|
//! Set all connection related members at once
|
|
void setConnection(const QString& aHost,
|
|
const QString& aPort,
|
|
const QString& aDatabase,
|
|
const QString& aUsername,
|
|
const QString& aPassword);
|
|
|
|
//! Set all data source related members at once
|
|
void setDataSource(const QString& aSchema,
|
|
const QString& aTable,
|
|
const QString& aGeometryColumn,
|
|
const QString& aSql = QString());
|
|
|
|
QString username() const;
|
|
QString schema() const;
|
|
QString table() const;
|
|
QString sql() const;
|
|
QString geometryColumn() const;
|
|
|
|
void setSql(QString sql);
|
|
};
|