Giorgi / DuckDB.NET

Bindings and ADO.NET Provider for DuckDB
https://duckdb.net
MIT License
356 stars 62 forks source link

Move Utils to bindings project #28

Closed kmosegaard closed 2 years ago

kmosegaard commented 2 years ago

This is a pull request to move the Utils class to the bindings project. Eventually I want to use some of these Utils in some of the bindings (e.g. ToManagedString). I have added a flag, so one is able to disable the 'free' call after the string has been copied. Mainly because calls to duckdb_column_name and duckdb_result_error returns a const char* that is cleaned up when duckdb_destroy_result is called and shouldn't be freed by duckdb_free.