You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried to look through the unit tests, docs, and samples, but did not see (maybe I was blind) how to create a parameter for a struct. In my case, specifically, I have an array of struct for the column.
Looking at ClrToDuckDBConverter, it doesn't seem to support this style of conversion. Do you have advice?
If it's not possible, I could use a detail table, but I was experimenting to see if I could avoid the join.
Binding Struct parameters isn't supported at the moment, and I can't say when/if it will be supported. If you are interested in it, you can PInvoke duckdb_create_struct_value function and I can add support for accepting arbitrary duckdb_value-s as a parameter value.
Your offer is generous. I think for now, I will use the well understood path until my project is a bit further along. Thank you for your work and support.
the support for this sounds very useful to ingest complex types :) we use C# classes with just properties, but also records/structs would be highly appreciated if they can be mapped. For complex structures such as lists with a struct it's pretty hard to do this right now otherwise right? you would have to make your data simple types List etc..
Is it possible to already ingest this via the table api perhaps? https://duckdb.net/docs/table-functions.html or some other way? at the moment we serialize our .net list to json, write it to disk and make a typed schema manually to do queries, which feels odd. Especially the fact we need to write to disk feels off.
Activity
Giorgi commentedon Nov 17, 2024
Binding Struct parameters isn't supported at the moment, and I can't say when/if it will be supported. If you are interested in it, you can PInvoke duckdb_create_struct_value function and I can add support for accepting arbitrary
duckdb_value-s as a parameter value.jhgoodwin commentedon Nov 17, 2024
Your offer is generous. I think for now, I will use the well understood path until my project is a bit further along. Thank you for your work and support.
Giorgi commentedon Nov 17, 2024
I'll leave this issue as open, in case others are interested in Struct parameter support.
jcageman commentedon Apr 14, 2026
the support for this sounds very useful to ingest complex types :) we use C# classes with just properties, but also records/structs would be highly appreciated if they can be mapped. For complex structures such as lists with a struct it's pretty hard to do this right now otherwise right? you would have to make your data simple types List etc..
Is it possible to already ingest this via the table api perhaps? https://duckdb.net/docs/table-functions.html or some other way? at the moment we serialize our .net list to json, write it to disk and make a typed schema manually to do queries, which feels odd. Especially the fact we need to write to disk feels off.