66 MaterializedView = 1 << 5,
68 IncludeSystemTables = 1 << 7,
142 SIP_PYOBJECT __next__();
144 QList<QVariant> result;
145 Py_BEGIN_ALLOW_THREADS
146 result = sipCpp->nextRow( );
148 if ( ! result.isEmpty() )
150 const sipTypeDef *qvariantlist_type = sipFindType(
"QList<QVariant>" );
151 sipRes = sipConvertFromNewType(
new QList<QVariant>( result ), qvariantlist_type, Py_None );
155 PyErr_SetString( PyExc_StopIteration,
"" );
167 struct CORE_EXPORT QueryResultIterator
SIP_SKIP
170 QVariantList nextRow();
173 bool hasNextRow()
const;
176 long long fetchedRowCount();
179 long long rowCount();
181 virtual ~QueryResultIterator() =
default;
185 virtual QVariantList nextRowPrivate() = 0;
186 virtual bool hasNextRowPrivate()
const = 0;
187 virtual long long rowCountPrivate()
const = 0;
189 mutable qlonglong mFetchedRowCount = 0;
190 mutable QMutex mMutex;
199 void appendColumn(
const QString &columnName )
SIP_SKIP;
206 QueryResult( std::shared_ptr<QueryResultIterator> iterator )
SIP_SKIP;
217 double queryExecutionTime( )
const;
222 void setQueryExecutionTime(
double queryExecutionTime );
228 mutable std::shared_ptr<QueryResultIterator> mResultIterator;
229 QStringList mColumns;
231 double mQueryExecutionTime = 0;
254 bool disableSelectAtId =
false;
273 SIP_PYOBJECT __repr__();
275 QString
str = QStringLiteral(
"<QgsAbstractDatabaseProviderConnection.TableProperty: '%1'>" ).arg( sipCpp->tableName() );
276 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
287 SIP_PYOBJECT __repr__();
289 QString
str = QStringLiteral(
"<QgsAbstractDatabaseProviderConnection.TableProperty.GeometryColumnType: '%1, %2'>" ).arg(
QgsWkbTypes::displayString( sipCpp->wkbType ), sipCpp->crs.authid() );
290 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
299 return this->crs == other.
crs && this->wkbType == other.
wkbType;
310 QString tableName()
const;
317 void setTableName(
const QString &name );
329 QList<QgsAbstractDatabaseProviderConnection::TableProperty::GeometryColumnType> geometryColumnTypes()
const;
334 void setGeometryColumnTypes(
const QList<QgsAbstractDatabaseProviderConnection::TableProperty::GeometryColumnType> &geometryColumnTypes );
343 QString defaultName()
const;
354 QString schema()
const;
359 void setSchema(
const QString &schema );
364 QString geometryColumn()
const;
369 void setGeometryColumn(
const QString &geometryColumn );
374 QStringList primaryKeyColumns()
const;
379 void setPrimaryKeyColumns(
const QStringList &primaryKeyColumns );
384 QList<QgsCoordinateReferenceSystem> crsList()
const;
399 QString comment()
const;
404 void setComment(
const QString &comment );
412 QVariantMap info()
const;
420 void setInfo(
const QVariantMap &info );
427 int geometryColumnCount()
const;
432 void setGeometryColumnCount(
int geometryColumnCount );
445 int maxCoordinateDimensions()
const;
452 QList<GeometryColumnType> mGeometryColumnTypes;
458 QString mGeometryColumn;
460 int mGeometryColumnCount;
462 QStringList mPkColumns;
487 CreateVectorTable = 1 << 1,
488 DropRasterTable = 1 << 2,
489 DropVectorTable = 1 << 3,
490 RenameVectorTable = 1 << 4,
491 RenameRasterTable = 1 << 5,
492 CreateSchema = 1 << 6,
494 RenameSchema = 1 << 8,
500 TableExists = 1 << 14,
502 CreateSpatialIndex = 1 << 16,
503 SpatialIndexExists = 1 << 17,
504 DeleteSpatialIndex = 1 << 18,
505 DeleteField = 1 << 19,
506 DeleteFieldCascade = 1 << 20,
508 ListFieldDomains = 1 << 22,
509 RetrieveFieldDomain = 1 << 23,
510 SetFieldDomain = 1 << 24,
511 AddFieldDomain = 1 << 25,
512 RenameField = 1 << 26,
513 RetrieveRelationships = 1 << 27,
514 AddRelationship = 1 << 28,
515 UpdateRelationship = 1 << 29,
516 DeleteRelationship = 1 << 30,
533 SinglePoint = 1 << 5,
534 SingleLineString = 1 << 6,
535 SinglePolygon = 1 << 7,
536 PolyhedralSurfaces = 1 << 8,
540 Q_ENUM( GeometryColumnCapability )
575 Qgis::DatabaseProviderConnectionCapabilities2 capabilities2() const;
588 virtual
Qgis::SqlLayerDefinitionCapabilities sqlLayerDefinitionCapabilities();
847 QString providerKey() const;
858 virtual QMultiMap<
Qgis::SqlKeywordCategory, QStringList> sqlDictionary();
866 virtual QSet< QString > illegalFieldNames() const;
885 virtual QList<
Qgis::FieldDomainType > supportedFieldDomainTypes() const;
957 virtual QList< Qgis::RelationshipCardinality > supportedRelationshipCardinalities()
const;
959 SIP_PYOBJECT supportedRelationshipCardinalities() const
SIP_TYPEHINT( List[
Qgis.RelationshipCardinality] );
963 const QList<
Qgis::RelationshipCardinality > cppRes = sipCpp->supportedRelationshipCardinalities();
965 PyObject *l = PyList_New( cppRes.size() );
971 for (
int i = 0; i < cppRes.size(); ++i )
973 PyObject *eobj = sipConvertFromEnum(
static_cast<int>( cppRes.at( i ) ),
974 sipType_Qgis_RelationshipCardinality );
981 PyList_SetItem( l, i, eobj );
1002 virtual QList< Qgis::RelationshipStrength > supportedRelationshipStrengths()
const;
1004 SIP_PYOBJECT supportedRelationshipStrengths() const
SIP_TYPEHINT( List[
Qgis.RelationshipStrength] );
1008 const QList<
Qgis::RelationshipStrength > cppRes = sipCpp->supportedRelationshipStrengths();
1010 PyObject *l = PyList_New( cppRes.size() );
1016 for (
int i = 0; i < cppRes.size(); ++i )
1018 PyObject *eobj = sipConvertFromEnum(
static_cast<int>( cppRes.at( i ) ),
1019 sipType_Qgis_RelationshipStrength );
1026 PyList_SetItem( l, i, eobj );
1058 virtual QStringList relatedTableTypes()
const;
1138 void checkCapability( Capability capability ) const;
1145 void checkCapability(
Qgis::DatabaseProviderConnectionCapability2 capability ) const;
1149 Qgis::DatabaseProviderConnectionCapabilities2 mCapabilities2 =
Qgis::DatabaseProviderConnectionCapabilities2()
SIP_SKIP;
1152 Qgis::SqlLayerDefinitionCapabilities mSqlLayerDefinitionCapabilities =
Qgis::SqlLayerDefinitionCapabilities()
SIP_SKIP;
1153 QString mProviderKey;
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)