16 #ifndef QGSABSTRACTDATABASEPROVIDERCONNECTION_H
17 #define QGSABSTRACTDATABASEPROVIDERCONNECTION_H
21 #include "qgis_core.h"
59 MaterializedView = 1 << 5,
82 SIP_PYOBJECT __repr__();
84 QString str = QStringLiteral(
"<QgsAbstractDatabaseProviderConnection.TableProperty: '%1'>" ).arg( sipCpp->tableName() );
85 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
93 struct CORE_EXPORT GeometryColumnType
96 SIP_PYOBJECT __repr__();
98 QString str = QStringLiteral(
"<QgsAbstractDatabaseProviderConnection.TableProperty.GeometryColumnType: '%1, %2'>" ).arg(
QgsWkbTypes::displayString( sipCpp->wkbType ), sipCpp->crs.authid() );
99 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
105 inline bool operator==(
const GeometryColumnType &other )
const
107 return this->crs == other.crs && this->wkbType == other.wkbType;
117 QString tableName()
const;
123 void setTableName(
const QString &name );
134 QList<QgsAbstractDatabaseProviderConnection::TableProperty::GeometryColumnType> geometryColumnTypes()
const;
139 void setGeometryColumnTypes(
const QList<QgsAbstractDatabaseProviderConnection::TableProperty::GeometryColumnType> &geometryColumnTypes );
148 QString defaultName()
const;
159 QString schema()
const;
164 void setSchema(
const QString &schema );
169 QString geometryColumn()
const;
174 void setGeometryColumn(
const QString &geometryColumn );
179 QStringList primaryKeyColumns()
const;
184 void setPrimaryKeyColumns(
const QStringList &primaryKeyColumns );
189 QList<QgsCoordinateReferenceSystem> crsList()
const;
194 TableFlags flags()
const;
199 void setFlags(
const TableFlags &flags );
204 QString comment()
const;
209 void setComment(
const QString &comment );
217 QVariantMap info()
const;
225 void setInfo(
const QVariantMap &info );
232 int geometryColumnCount()
const;
237 void setGeometryColumnCount(
int geometryColumnCount );
249 int maxCoordinateDimensions()
const;
256 QList<GeometryColumnType> mGeometryColumnTypes;
262 QString mGeometryColumn;
264 int mGeometryColumnCount;
266 QStringList mPkColumns;
278 CreateVectorTable = 1 << 1,
279 DropRasterTable = 1 << 2,
280 DropVectorTable = 1 << 3,
281 RenameVectorTable = 1 << 4,
282 RenameRasterTable = 1 << 5,
283 CreateSchema = 1 << 6,
285 RenameSchema = 1 << 8,
291 TableExists = 1 << 14,
293 CreateSpatialIndex = 1 << 16,
294 SpatialIndexExists = 1 << 17,
295 DeleteSpatialIndex = 1 << 18,
300 Q_FLAG( Capabilities )
321 Capabilities capabilities() const;
425 QString geometryColumnName;
505 void checkCapability( Capability capability ) const;
508 Capabilities mCapabilities =
nullptr SIP_SKIP;
514 #endif // QGSABSTRACTDATABASEPROVIDERCONNECTION_H