func (i *QueryIterator) Next() (map[string]interface{}, error) // how about adding a new type (or alias) for the value?
func (i *QueryIterator) AsPoints() (*PointValues, error)
This renders Value method useless, btw.
So perhaps adding a new iterator type designed according to the guidelines, and deprecating the existing one would be a better solution.
Specifications
Code sample to reproduce problem
When result contains unsupported data type, the following calls may cause
panic
.https://github.com/InfluxCommunity/influxdb3-go/blob/94c8385fe546fabbfc38dbf958ec439c3f625ddb/influxdb3/query_iterator.go#L88 https://github.com/InfluxCommunity/influxdb3-go/blob/94c8385fe546fabbfc38dbf958ec439c3f625ddb/influxdb3/query_iterator.go#L108
Expected behavior
Next()
andAsPoints()
should not panic, but somehow return error.Next
methods could be changed according to these iterator guidelines andAsPoints
similarly. ieThis renders
Value
method useless, btw.So perhaps adding a new iterator type designed according to the guidelines, and deprecating the existing one would be a better solution.
Actual behavior
panic
may occurAdditional info
No response