diff --git a/Directory.Build.props b/Directory.Build.props
index 1a34c2b4..b85d3fa8 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -9,7 +9,7 @@
- netstandard2.0;net6.0
+ netstandard2.0;net6.0;net8.0
False
default
@@ -37,6 +37,10 @@
$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
+
+
+ net8.0
+
ManagedOnly
diff --git a/DuckDB.NET.AOT/AOT.csproj b/DuckDB.NET.AOT/AOT.csproj
new file mode 100644
index 00000000..eef2dc25
--- /dev/null
+++ b/DuckDB.NET.AOT/AOT.csproj
@@ -0,0 +1,41 @@
+
+
+
+ Exe
+ net8.0
+ enable
+ enable
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+ PreserveNewest
+ \
+ %(FileName)%(Extension)
+
+
+ false
+ PreserveNewest
+ \
+ %(FileName)%(Extension)
+
+
+ false
+ PreserveNewest
+ \
+ %(FileName)%(Extension)
+
+
+
+
diff --git a/DuckDB.NET.AOT/Program.cs b/DuckDB.NET.AOT/Program.cs
new file mode 100644
index 00000000..739eded5
--- /dev/null
+++ b/DuckDB.NET.AOT/Program.cs
@@ -0,0 +1,54 @@
+using DuckDB.NET.Data;
+
+namespace DuckDB.NET.AOT
+{
+ internal class Program
+ {
+ static void Main(string[] args)
+ {
+ using var conn = new DuckDBConnection(DuckDBConnectionStringBuilder.InMemoryConnectionString);
+ conn.Open();
+ using (var comm = conn.CreateCommand())
+ {
+ comm.CommandText = "SELECT 1";
+ comm.ExecuteNonQuery();
+
+ comm.CommandText = "SELECT 1";
+ using (var reader = comm.ExecuteReader())
+ {
+ while (reader.Read())
+ {
+ _ = reader.GetInt32(0);
+ }
+ }
+
+ comm.CommandText = "SELECT [1,2,3]";
+ using (var reader = comm.ExecuteReader())
+ {
+ while (reader.Read())
+ {
+ Console.Write("[");
+ foreach (var item in (List)reader[0])
+ {
+ Console.Write(item+",");
+ }
+ Console.WriteLine("]");
+ }
+ }
+ comm.CommandText = "select {\"a\":1,\"b\":2};";
+ using (var reader = comm.ExecuteReader())
+ {
+ while (reader.Read())
+ {
+ Console.Write("{");
+ foreach (var item in (Dictionary)reader[0])
+ {
+ Console.Write($"{item.Key}={item.Value}, ");
+ }
+ Console.WriteLine("}");
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/DuckDB.NET.Bindings/Bindings.csproj b/DuckDB.NET.Bindings/Bindings.csproj
index ee4b06f7..c69d44b4 100644
--- a/DuckDB.NET.Bindings/Bindings.csproj
+++ b/DuckDB.NET.Bindings/Bindings.csproj
@@ -4,7 +4,7 @@
DuckDB Bindings for C#.
Update to DuckDB 0.10.3.
DuckDB.NET.Native
- win-x64;linux-x64;linux-arm64;osx
+ win-x64;linux-x64;linux-arm64;osx-x64
https://github.com/duckdb/duckdb/releases/download/v0.10.3
True
..\keyPair.snk
@@ -15,13 +15,13 @@
$(Description) $(NoNativeText)
-
+
-
+
diff --git a/DuckDB.NET.Data/DuckDBException.cs b/DuckDB.NET.Data/DuckDBException.cs
index 4e1877b7..c9748a2b 100644
--- a/DuckDB.NET.Data/DuckDBException.cs
+++ b/DuckDB.NET.Data/DuckDBException.cs
@@ -1,4 +1,5 @@
-using System.Data.Common;
+using System;
+using System.Data.Common;
using System.Runtime.Serialization;
using DuckDB.NET.Native;
@@ -10,6 +11,7 @@ internal DuckDBException()
{
}
+ [Obsolete]
internal DuckDBException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
diff --git a/DuckDB.NET.Data/Internal/Reader/CreatorCache.cs b/DuckDB.NET.Data/Internal/Reader/CreatorCache.cs
new file mode 100644
index 00000000..bacd1d09
--- /dev/null
+++ b/DuckDB.NET.Data/Internal/Reader/CreatorCache.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Concurrent;
+using System.Linq.Expressions;
+
+namespace DuckDB.NET.Data.Internal.Reader;
+
+internal static class CreatorCache
+{
+ private static readonly ConcurrentDictionary> creators=new ConcurrentDictionary>();
+
+ public static Func