16 #ifndef QGSABSTRACTDATABASEPROVIDERCONNECTION_H
17 #define QGSABSTRACTDATABASEPROVIDERCONNECTION_H
21 #include "qgis_core.h"
62 MaterializedView = 1 << 5,
67 Q_DECLARE_FLAGS( TableFlags, TableFlag )
85 SIP_PYOBJECT __repr__();
87 QString str = QStringLiteral(
"<QgsAbstractDatabaseProviderConnection.TableProperty: '%1'>" ).arg( sipCpp->tableName() );
88 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
99 SIP_PYOBJECT __repr__();
101 QString str = QStringLiteral(
"<QgsAbstractDatabaseProviderConnection.TableProperty.GeometryColumnType: '%1, %2'>" ).arg(
QgsWkbTypes::displayString( sipCpp->wkbType ), sipCpp->crs.authid() );
102 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
110 return this->crs == other.
crs && this->wkbType == other.
wkbType;
120 QString tableName()
const;
126 void setTableName(
const QString &name );
137 QList<QgsAbstractDatabaseProviderConnection::TableProperty::GeometryColumnType> geometryColumnTypes()
const;
142 void setGeometryColumnTypes(
const QList<QgsAbstractDatabaseProviderConnection::TableProperty::GeometryColumnType> &geometryColumnTypes );
151 QString defaultName()
const;
162 QString schema()
const;
167 void setSchema(
const QString &schema );
172 QString geometryColumn()
const;
177 void setGeometryColumn(
const QString &geometryColumn );
182 QStringList primaryKeyColumns()
const;
187 void setPrimaryKeyColumns(
const QStringList &primaryKeyColumns );
192 QList<QgsCoordinateReferenceSystem> crsList()
const;
197 TableFlags flags()
const;
202 void setFlags(
const TableFlags &flags );
207 QString comment()
const;
212 void setComment(
const QString &comment );
220 QVariantMap info()
const;
228 void setInfo(
const QVariantMap &info );
235 int geometryColumnCount()
const;
240 void setGeometryColumnCount(
int geometryColumnCount );
252 int maxCoordinateDimensions()
const;
259 QList<GeometryColumnType> mGeometryColumnTypes;
265 QString mGeometryColumn;
267 int mGeometryColumnCount;
269 QStringList mPkColumns;
281 CreateVectorTable = 1 << 1,
282 DropRasterTable = 1 << 2,
283 DropVectorTable = 1 << 3,
284 RenameVectorTable = 1 << 4,
285 RenameRasterTable = 1 << 5,
286 CreateSchema = 1 << 6,
288 RenameSchema = 1 << 8,
294 TableExists = 1 << 14,
296 CreateSpatialIndex = 1 << 16,
297 SpatialIndexExists = 1 << 17,
298 DeleteSpatialIndex = 1 << 18,
299 DeleteField = 1 << 19,
300 DeleteFieldCascade = 1 << 20,
304 Q_DECLARE_FLAGS( Capabilities, Capability )
305 Q_FLAG( Capabilities )
319 Q_ENUM( GeometryColumnCapability )
320 Q_DECLARE_FLAGS( GeometryColumnCapabilities, GeometryColumnCapability )
321 Q_FLAG( GeometryColumnCapabilities )
342 Capabilities capabilities()
const;
348 virtual GeometryColumnCapabilities geometryColumnCapabilities();
571 QString providerKey() const;
581 void checkCapability(
Capability capability ) const;
584 Capabilities mCapabilities = Capabilities()
SIP_SKIP;
585 GeometryColumnCapabilities mGeometryColumnCapabilities = GeometryColumnCapabilities()
SIP_SKIP;
586 QString mProviderKey;
592 #endif // QGSABSTRACTDATABASEPROVIDERCONNECTION_H