About influxdb3-csharp

Hello, everyone
I try to use influxdb3-csharp query data,
use influxql then get a object array, can do like this “how do i convert influxdb query to listitems”?

Hello @aiwa888aa,
Welcome!
I haven’t tried this client library yet. Please give me a day to get some code to you unless
@bednar knows off the top of his head.
Thank you.

1 Like

Hi @aiwa888aa,

At present, the library does not support the mapping of query responses to custom objects. However, this feature is on our backlog and we’re looking to address it in the future. For now, you’ll need to prepare your own mapping function. Here’s an example:

var rows = client.Query(query: "select * from cpu"); var listItems = rows.Select(row => <your mapping code>).ToList();

Best Regards

1 Like