Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings #10

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RqliteDotnet/Dto/QueryParameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
4 changes: 2 additions & 2 deletions RqliteDotnet/RqliteClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
var str = await r.Content.ReadAsStringAsync();

var result = JsonSerializer.Deserialize<QueryResults>(str, new JsonSerializerOptions() { PropertyNameCaseInsensitive = true });
return result;

Check warning on line 53 in RqliteDotnet/RqliteClient.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference return.

Check warning on line 53 in RqliteDotnet/RqliteClient.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference return.
}

/// <summary>
Expand Down Expand Up @@ -152,13 +152,13 @@
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(),
Expand Down
Loading