From be48e123fae48fbcb425a28bd1ec118a6b8d2781 Mon Sep 17 00:00:00 2001 From: Arthur Date: Mon, 28 Oct 2024 22:16:42 +0200 Subject: [PATCH] Fix warnings --- RqliteDotnet/Dto/QueryParameter.cs | 2 +- RqliteDotnet/RqliteClient.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RqliteDotnet/Dto/QueryParameter.cs b/RqliteDotnet/Dto/QueryParameter.cs index 57b354f..2a1a7ca 100644 --- a/RqliteDotnet/Dto/QueryParameter.cs +++ b/RqliteDotnet/Dto/QueryParameter.cs @@ -4,7 +4,7 @@ public class QueryParameter { public QueryParamType ParamType { get; set; } - public object Value { get; set; } + public object? Value { get; set; } public virtual string ToParamString() { diff --git a/RqliteDotnet/RqliteClient.cs b/RqliteDotnet/RqliteClient.cs index e970dfc..8783062 100644 --- a/RqliteDotnet/RqliteClient.cs +++ b/RqliteDotnet/RqliteClient.cs @@ -152,13 +152,13 @@ private string GetParameters(DbFlag? flags) return result.ToString(); } - protected object GetValue(string valType, JsonElement el) + protected object? GetValue(string valType, JsonElement el) { if (el.ValueKind == JsonValueKind.Null) { return null; } - object x = valType switch + object? x = valType switch { "text" => el.GetString(), "integer" or "numeric" or "int" => el.GetInt32(),