16#ifndef QGSARROWITERATOR_H
17#define QGSARROWITERATOR_H
23#ifndef ARROW_C_DATA_INTERFACE
24#define ARROW_C_DATA_INTERFACE
26#define ARROW_FLAG_DICTIONARY_ORDERED 1
27#define ARROW_FLAG_NULLABLE 2
28#define ARROW_FLAG_MAP_KEYS_SORTED 4
40 struct ArrowSchema **children;
41 struct ArrowSchema *dictionary;
44 void ( *release )(
struct ArrowSchema * );
62 struct ArrowArray **children;
63 struct ArrowArray *dictionary;
66 void ( *release )(
struct ArrowArray * );
75#ifndef ARROW_C_STREAM_INTERFACE
76#define ARROW_C_STREAM_INTERFACE
80struct ArrowArrayStream
83 int ( *get_schema )(
struct ArrowArrayStream *,
struct ArrowSchema *out );
84 int ( *get_next )(
struct ArrowArrayStream *,
struct ArrowArray *out );
85 const char *( *get_last_error )(
struct ArrowArrayStream * );
88 void ( *release )(
struct ArrowArrayStream * );
126 QString mGeometryColumnName;
159 struct ArrowSchema *
schema();
162 const struct ArrowSchema *
schema()
const;
193 struct ArrowSchema mSchema {};
194 int mGeometryColumnIndex = -1;
229 struct ArrowArray *
array();
232 const struct ArrowArray *
array()
const;
253 struct ArrowArray mArray {};
Wrapper around an ArrowArray.
QgsArrowArray()=default
Construct invalid array holder.
struct ArrowArray * array()
Access the underlying ArrowArray from C++.
QgsArrowArray & operator=(QgsArrowArray &other)=delete
bool isValid() const
Returns true if this wrapper object holds a valid ArrowArray.
QgsArrowArray(const QgsArrowArray &other)=delete
void exportToAddress(unsigned long long otherAddress)
Export this array to the address of an empty ArrowArray for export across boundaries.
unsigned long long cArrayAddress() const
Returns the address of the underlying ArrowArray for import or export across boundaries.
Options for inferring an ArrowSchema from a feature source.
void setGeometryColumnName(const QString &geometryColumnName)
Set the name that should be used to refer to the geometry column.
QgsArrowInferSchemaOptions()
Construct default options.
QString geometryColumnName() const
The name that should be used for a layer's geometry column.
static QgsArrowSchema inferSchema(const QgsVectorLayer &layer, const QgsArrowInferSchemaOptions &options=QgsArrowInferSchemaOptions())
Infer the QgsArrowSchema for a given QgsVectorLayer.
QgsArrowArray nextFeatures(int n)
Build an ArrowArray using the next n features (or fewer depending on the number of features remaining...
QgsArrowIterator()=default
Construct invalid iterator.
void setSchema(const QgsArrowSchema &schema)
Set the ArrowSchema for the output of all future batches.
Wrapper around an ArrowSchema.
int geometryColumnIndex() const
Returns the index of the column in this schema that should be populated with a feature geometry.
bool isValid() const
Returns true if this wrapper object holds a valid ArrowSchema.
unsigned long long cSchemaAddress() const
Returns the address of the underlying ArrowSchema for import or export across boundaries.
struct ArrowSchema * schema()
Access the underlying ArrowSchema from C++.
QgsArrowSchema & operator=(const QgsArrowSchema &other)
Assignment operator.
void exportToAddress(unsigned long long otherAddress)
Export this array to the address of an empty ArrowSchema for export across boundaries.
QgsArrowSchema()
Construct invalid schema holder.
void setGeometryColumnIndex(int geometryColumnIndex)
Set the index of the column in this schema that should be populated with a feature geometry.
Represents a coordinate reference system (CRS).
Defines a QGIS exception class.
Wrapper for iterator of features from vector data provider or vector layer.
Container of fields for a vector layer.
Represents a vector layer which manages a vector based dataset.
#define SIP_THROW(name,...)