grafana / sqlds

A package that assists writing SQL-driven datasources
Apache License 2.0
17 stars 12 forks source link

multi-mode: return error for unsupported shape #124

Closed gabor closed 1 month ago

gabor commented 3 months ago

the format=sqlutil.FormatOptionMulti is not complete yet, it only handles long dataframes, nothing else. this PR makes the code return an error for other data-shapes (until now it just returned the original data, unmodified).

i think it's better to return an error in this case for now, we don't want people to start to use this and then rely on the current behavior for data-shapes we do not handle yet. WDYT?

(NOTE: as this error-message is only temporary, until we add full support, i did not do the "proper" thing to add it to errors.go.. but i can do that if it's necessary)

gabor commented 1 month ago

i'm not working on this area anymore, so i'll close the PR. if anyone is interested in moving forward with this, feel free to create a new PR and do so. thanks!