Skip to content
Permalink
Browse files
Merge pull request #45727 from elpaso/expose-qgsserverfid-to-bindings
Expose QgsServerFeatureId to Python
  • Loading branch information
troopa81 committed Nov 2, 2021
2 parents b1221a2 + c2b15d8 commit d2f27f5e7e96a29655e74db5aa9cffad98694039
Showing with 83 additions and 3 deletions.
  1. +78 −0 python/server/auto_generated/qgsserverfeatureid.sip.in
  2. +1 −0 python/server/server_auto.sip
  3. +2 −1 src/server/CMakeLists.txt
  4. +2 −2 src/server/qgsserverfeatureid.h
@@ -0,0 +1,78 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/server/qgsserverfeatureid.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/







%ModuleHeaderCode
#include "qgsserverfeatureid.h"
%End



namespace QgsServerFeatureId
{

QString getServerFid( const QgsFeature &feature, const QgsAttributeList &pkAttributes );
%Docstring
Returns the feature id based on primary keys.

:param feature: the feature
:param pkAttributes: the primary keys list

:return: the feature id based on primary keys

.. versionadded:: 3.4.9
%End

QgsFeatureRequest updateFeatureRequestFromServerFids( QgsFeatureRequest &featureRequest, const QStringList &serverFids, const QgsVectorDataProvider *provider );
%Docstring
Returns the feature request based on feature ids build with primary keys.

:param featureRequest: the feature request to update
:param serverFids: the feature ids build with :py:class:`QgsServerFeatureId`.getServerFid
:param provider: the vector layer provider to provide fields and primary keys list

:return: the feature request updated

.. versionadded:: 3.4.9
%End

QString getExpressionFromServerFid( const QString &serverFid, const QgsVectorDataProvider *provider );
%Docstring
Returns the expression feature id based on primary keys.

:param serverFid: the feature id build with primary keys
:param provider: the vector layer provider to provide fields and primary keys list

:return: the feature id based on primary keys

.. versionadded:: 3.4.9
%End

QString pkSeparator();
%Docstring
Returns the primary keys separator

:return: @@ the primary keys separator

.. versionadded:: 3.4.9
%End

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/server/qgsserverfeatureid.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -8,6 +8,7 @@
%Include auto_generated/qgsserverogcapihandler.sip
%Include auto_generated/qgsserverstatichandler.sip
%Include auto_generated/qgsserverparameters.sip
%Include auto_generated/qgsserverfeatureid.sip
%Include auto_generated/qgsserverquerystringparameter.sip
%Include auto_generated/qgsserversettings.sip
%Include auto_generated/qgsservicemodule.sip
@@ -35,11 +35,11 @@ set(QGIS_SERVER_SRCS
qgsserverparameters.cpp
qgsserverexception.cpp
qgsserverfilter.cpp
qgsserverfeatureid.cpp
qgsserverinterface.cpp
qgsserverinterfaceimpl.cpp
qgsserverlogger.cpp
qgsserverprojectutils.cpp
qgsserverfeatureid.cpp
qgsserverrequest.cpp
qgsserverresponse.cpp
qgsserversettings.cpp
@@ -64,6 +64,7 @@ set (QGIS_SERVER_HDRS
qgsserverogcapihandler.h
qgsserverstatichandler.h
qgsserverparameters.h
qgsserverfeatureid.h
qgsserverquerystringparameter.h
qgsserversettings.h
qgsservicemodule.h
@@ -18,8 +18,6 @@
#ifndef QGSSERVERFEATUREID_H
#define QGSSERVERFEATUREID_H

#define SIP_NO_FILE

#include <QString>
#include <QHash>

@@ -30,13 +28,15 @@ class QgsVectorDataProvider;
class QgsFeature;
class QgsFeatureRequest;


#ifdef SIP_RUN
% ModuleHeaderCode
#include "qgsserverfeatureid.h"
% End
#endif



/**
* \ingroup server
* \brief The QgsServerFeatureId namespace provides a way to use primary keys for

0 comments on commit d2f27f5

Please sign in to comment.