@@ -126,9 +126,6 @@ class QgsPostgresProvider : public QgsVectorDataProvider
126126 void setExtent ( QgsRectangle& newExtent );
127127
128128 virtual QgsRectangle extent () const override ;
129-
130- /* * Update the extent
131- */
132129 virtual void updateExtents () override ;
133130
134131 /* *
@@ -145,13 +142,7 @@ class QgsPostgresProvider : public QgsVectorDataProvider
145142 void determinePrimaryKeyFromUriKeyColumn ();
146143
147144 QgsFields fields () const override ;
148-
149- /* *
150- * Return a short comment for the data that this provider is
151- * providing access to (e.g. the comment for postgres table).
152- */
153145 QString dataComment () const override ;
154-
155146 QVariant minimumValue ( int index ) const override ;
156147 QVariant maximumValue ( int index ) const override ;
157148 virtual void uniqueValues ( int index, QList<QVariant> &uniqueValues, int limit = -1 ) const override ;
@@ -165,42 +156,14 @@ class QgsPostgresProvider : public QgsVectorDataProvider
165156 QString defaultValueClause ( int fieldId ) const override ;
166157 QVariant defaultValue ( int fieldId ) const override ;
167158 bool skipConstraintCheck ( int fieldIndex, QgsFieldConstraints::Constraint constraint, const QVariant& value = QVariant() ) const override ;
168-
169- /* * Adds a list of features
170- @return true in case of success and false in case of failure*/
171159 bool addFeatures ( QgsFeatureList & flist ) override ;
172-
173- /* * Deletes a list of features
174- @param id list of feature ids
175- @return true in case of success and false in case of failure*/
176160 bool deleteFeatures ( const QgsFeatureIds & id ) override ;
177-
161+ bool truncate () override ;
178162 bool addAttributes ( const QList<QgsField> &attributes ) override ;
179163 bool deleteAttributes ( const QgsAttributeIds &name ) override ;
180164 virtual bool renameAttributes ( const QgsFieldNameMap& renamedAttributes ) override ;
181-
182- /* * Changes attribute values of existing features
183- @param attr_map a map containing the new attributes. The integer is the feature id,
184- the first QString is the attribute name and the second one is the new attribute value
185- @return true in case of success and false in case of failure*/
186165 bool changeAttributeValues ( const QgsChangedAttributesMap &attr_map ) override ;
187-
188- /* *
189- Changes geometries of existing features
190- @param geometry_map A QMap containing the feature IDs to change the geometries of.
191- the second map parameter being the new geometries themselves
192- @return true in case of success and false in case of failure
193- */
194166 bool changeGeometryValues ( const QgsGeometryMap &geometry_map ) override ;
195-
196- /* *
197- * Changes attribute values and geometries of existing features.
198- * @param attr_map a map containing changed attributes
199- * @param geometry_map A QgsGeometryMap whose index contains the feature IDs
200- * that will have their geometries changed.
201- * The second map parameter being the new geometries themselves
202- * @return true in case of success and false in case of failure
203- */
204167 bool changeFeatures ( const QgsChangedAttributesMap &attr_map, const QgsGeometryMap &geometry_map ) override ;
205168
206169 // ! Get the postgres connection
@@ -559,6 +522,7 @@ class QgsPostgresSharedData
559522 QVariantList removeFid ( QgsFeatureId fid );
560523 void insertFid ( QgsFeatureId fid, const QVariantList& k );
561524 QVariantList lookupKey ( QgsFeatureId featureId );
525+ void clear ();
562526
563527 protected:
564528 QMutex mMutex ; // !< Access to all data members is guarded by the mutex
0 commit comments