39 static constexpr int DEFAULT_PAGE_SIZE = 200;
SIP_SKIP
42 static constexpr int DEFAULT_FEATURE_LIMIT = 10000;
SIP_SKIP
45 static constexpr int DEFAULT_EXPANSION_LIMIT = 100;
SIP_SKIP
128 static QString filterForExtent(
const QString &geometryField,
const QgsRectangle &extent );
137 static QString combineFilters(
const QStringList &filters );
145 static QList< Qgis::GeometryType > availableGeometryTypes(
const QString &uri,
Qgis::SensorThingsEntity type,
QgsFeedback *feedback =
nullptr,
const QString &authCfg = QString() );
174 static QString asQueryString(
Qgis::SensorThingsEntity baseType,
const QList< QgsSensorThingsExpansionDefinition > &expansions );
193 const QString &orderBy = QString(),
194 Qt::SortOrder sortOrder = Qt::SortOrder::AscendingOrder,
196 const QString &filter = QString() );
207 bool isValid()
const;
229 QString orderBy()
const;
237 void setOrderBy(
const QString &field );
245 Qt::SortOrder sortOrder()
const;
253 void setSortOrder( Qt::SortOrder order );
271 void setLimit(
int limit );
278 QString filter()
const;
285 void setFilter(
const QString &filter );
292 QString toString()
const;
308 QString asQueryString(
Qgis::SensorThingsEntity parentEntityType,
const QStringList &additionalOptions = QStringList() )
const;
314 SIP_PYOBJECT __repr__();
316 if ( !sipCpp->isValid() )
318 sipRes = PyUnicode_FromString(
"<QgsSensorThingsExpansionDefinition: invalid>" );
322 QString innerDefinition;
323 if ( !sipCpp->orderBy().isEmpty() )
325 innerDefinition = QStringLiteral(
"by %1 (%2)" ).arg( sipCpp->orderBy(), sipCpp->sortOrder() == Qt::SortOrder::AscendingOrder ? QStringLiteral(
"asc" ) : QStringLiteral(
"desc" ) );
327 if ( sipCpp->limit() >= 0 )
329 if ( !innerDefinition.isEmpty() )
330 innerDefinition = QStringLiteral(
"%1, limit %2" ).arg( innerDefinition ).arg( sipCpp->limit() );
332 innerDefinition = QStringLiteral(
"limit %1" ).arg( sipCpp->limit() );
334 if ( !sipCpp->filter().isEmpty() )
336 if ( !innerDefinition.isEmpty() )
337 innerDefinition = QStringLiteral(
"%1, filter '%2'" ).arg( innerDefinition ).arg( sipCpp->filter() );
339 innerDefinition = QStringLiteral(
"filter '%1'" ).arg( sipCpp->filter() );
342 QString
str = QStringLiteral(
"<QgsSensorThingsExpansionDefinition: %1%2>" ).arg(
qgsEnumValueToKey( sipCpp->childEntity() ), innerDefinition.isEmpty() ? QString() : ( QStringLiteral(
" " ) + innerDefinition ) );
343 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
352 Qt::SortOrder mSortOrder = Qt::SortOrder::AscendingOrder;