18#ifndef QGSFEATURESINK_H
19#define QGSFEATURESINK_H
Wrapper for iterator of features from vector data provider or vector layer.
An interface for objects which accept features via addFeature(s) methods.
QFlags< SinkFlag > SinkFlags
virtual bool flushBuffer()
Flushes any internal buffer which may exist in the sink, causing any buffered features to be added to...
virtual bool addFeature(QgsFeature &feature, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags())
Adds a single feature to the sink.
Flag
Flags controlling how features are added to a sink.
@ RollBackOnErrors
Roll back the whole transaction if a single add feature operation fails.
@ FastInsert
Use faster inserts, at the cost of updating the passed features to reflect changes made at the provid...
SinkFlag
Flags that can be set on a QgsFeatureSink.
@ RegeneratePrimaryKey
This flag indicates, that a primary key field cannot be guaranteed to be unique and the sink should i...
virtual QString lastError() const
Returns the most recent error encountered by the sink, e.g.
virtual bool addFeatures(QgsFeatureList &features, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags())=0
Adds a list of features to the sink.
virtual void finalize()
Finalizes the sink, flushing any buffered features to the destination.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
#define SIP_ENUM_BASETYPE(type)
Q_DECLARE_METATYPE(QgsDatabaseQueryLogEntry)
QList< QgsFeature > QgsFeatureList