Skip to content

Commit

Permalink
Update ReadMe and release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Giorgi committed Nov 14, 2023
1 parent 0dfee86 commit bfe2e59
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 1 addition & 5 deletions DuckDB.NET.Data/Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
<PropertyGroup>
<Description>DuckDB ADO.NET Provider for C#.</Description>
<PackageReleaseNotes>
Reimplemented DuckDBDataReader for better performance.

Added named parameter support.
Added support for reading Struct types.

Added support for reading List types and nested List.

Added support for reading Enum types.
</PackageReleaseNotes>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\keyPair.snk</AssemblyOriginatorKeyFile>
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,11 @@ To read DuckDB specific native types use `DuckDBDataReader.GetFieldValue<T>` met

### List, Struct, Enum, and other composite types

DuckDB.NET 0.9.1 supports reading [Enum](https://duckdb.org/docs/sql/data_types/enum), a [List](https://duckdb.org/docs/sql/data_types/list) of primitive types (int, string, double, etc) or an Enum, as well as nested List.
DuckDB.NET 0.9.2 supports reading [Enum](https://duckdb.org/docs/sql/data_types/enum), [Struct](https://duckdb.org/docs/sql/data_types/struct),
a [List](https://duckdb.org/docs/sql/data_types/list)
of primitive types (int, string, double, etc), an Enum or Struct, as well as nested List.

To read an Enum, List or nested List use `DuckDBDataReader.GetFieldValue<T>`. For example, to read a list of doubles: `DuckDBDataReader.GetFieldValue<List<double>>` If the list contains null, use `DuckDBDataReader.GetFieldValue<List<double?>>`, otherwise an exception will be thrown when null is encountered. If you don't know whether the list contains null or not but want to skip all null values, you can use `select [x for x in mylist if x IS NOT NULL] as filtered;` to remove null values from the list.
To read an Enum, Struct or List or nested List use `DuckDBDataReader.GetFieldValue<T>`. For example, to read a list of doubles: `DuckDBDataReader.GetFieldValue<List<double>>` If the list contains null, use `DuckDBDataReader.GetFieldValue<List<double?>>`, otherwise an exception will be thrown when null is encountered. If you don't know whether the list contains null or not but want to skip all null values, you can use `select [x for x in mylist if x IS NOT NULL] as filtered;` to remove null values from the list.

Nested List can be read in a similar way: `reader.GetFieldValue<List<List<int>>>`

Expand Down

0 comments on commit bfe2e59

Please sign in to comment.