fix: preserve SDK 2 driver value and credential lifetimes

This commit is contained in:
Joseph Doherty
2026-11-10 10:17:03 -05:00
parent f9a006dab4
commit 4400127810
5 changed files with 73 additions and 48 deletions
@@ -19,7 +19,8 @@ public static class UpstreamValueMapping
DateTimeUtc[] times => times.Select(t => t.ToDateTime()).ToArray(),
Uuid[] uuids => uuids.Select(u => (Guid)u).ToArray(),
Variant[] variants => variants.Select(ToClr).ToArray(),
object?[] objects => objects.Select(Detach).ToArray(),
byte[][] bytes => bytes.Select(b => b?.ToArray()).ToArray(),
object?[] objects when objects.GetType() == typeof(object[]) => objects.Select(Detach).ToArray(),
Array array => array.Clone(),
_ => value,
};