Skip to content
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
14 changes: 7 additions & 7 deletions src/LinqTests/Acceptance/diagnostic_methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public async Task retrieves_query_plan()

var plan = await theSession.Query<SimpleUser>().ExplainAsync();
plan.ShouldNotBeNull();
plan.PlanWidth.ShouldBeGreaterThan(0);
plan.PlanRows.ShouldBeGreaterThan(0);
plan.TotalCost.ShouldBeGreaterThan(0m);
plan.PlanWidth.Value.ShouldBeGreaterThan(0);
plan.PlanRows.Value.ShouldBeGreaterThan(0);
plan.TotalCost.Value.ShouldBeGreaterThan(0m);
}

[Fact]
Expand All @@ -63,9 +63,9 @@ public async Task retrieves_query_plan_with_where()

var plan = await theSession.Query<SimpleUser>().Where(u => u.Number > 5).ExplainAsync();
plan.ShouldNotBeNull();
plan.PlanWidth.ShouldBeGreaterThan(0);
plan.PlanRows.ShouldBeGreaterThan(0);
plan.TotalCost.ShouldBeGreaterThan(0m);
plan.PlanWidth.Value.ShouldBeGreaterThan(0);
plan.PlanRows.Value.ShouldBeGreaterThan(0);
plan.TotalCost.Value.ShouldBeGreaterThan(0m);
}

[Fact]
Expand Down Expand Up @@ -100,7 +100,7 @@ public async Task retrieves_query_plan_with_where_and_all_options_enabled()
.Verbose();
});
plan.ShouldNotBeNull();
plan.ActualTotalTime.ShouldBeGreaterThan(0m);
plan.ActualTotalTime.Value.ShouldBeGreaterThan(0m);
plan.PlanningTime.ShouldBeGreaterThan(0m);
plan.ExecutionTime.ShouldBeGreaterThan(0m);
plan.SortKey.ShouldContain("(((d.data ->> 'Number'::text))::integer)");
Expand Down
16 changes: 8 additions & 8 deletions src/Marten/Linq/QueryPlan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,49 +35,49 @@ public class QueryPlan
/// </summary>
[JsonPropertyName("Startup Cost")]
[JsonProperty(PropertyName = "Startup Cost")]
public decimal StartupCost { get; set; }
public decimal? StartupCost { get; set; }

/// <summary>
/// The cost ofo performing the query.
/// (note that "cost" does not have a unit - it's an arbitrary value)
/// </summary>
[JsonPropertyName("Total Cost")]
[JsonProperty(PropertyName = "Total Cost")]
public decimal TotalCost { get; set; }
public decimal? TotalCost { get; set; }

/// <summary>
/// The estimated number of rows returned.
/// </summary>
[JsonPropertyName("Plan Rows")]
[JsonProperty(PropertyName = "Plan Rows")]
public int PlanRows { get; set; }
public int? PlanRows { get; set; }

/// <summary>
/// The storage size of the query returned fields.
/// </summary>
[JsonPropertyName("Plan Width")]
[JsonProperty(PropertyName = "Plan Width")]
public int PlanWidth { get; set; }
public int? PlanWidth { get; set; }

[JsonPropertyName("Parallel Aware")]
[JsonProperty(PropertyName = "Parallel Aware")]
public bool ParallelAware { get; set; }

[JsonPropertyName("Actual Startup Time")]
[JsonProperty(PropertyName = "Actual Startup Time")]
public decimal ActualStartupTime { get; set; }
public decimal? ActualStartupTime { get; set; }

[JsonPropertyName("Actual Total Time")]
[JsonProperty(PropertyName = "Actual Total Time")]
public decimal ActualTotalTime { get; set; }
public decimal? ActualTotalTime { get; set; }

[JsonPropertyName("Actual Rows")]
[JsonProperty(PropertyName = "Actual Rows")]
public int ActualRows { get; set; }
public decimal? ActualRows { get; set; }

[JsonPropertyName("Actual Loops")]
[JsonProperty(PropertyName = "Actual Loops")]
public int ActualLoops { get; set; }
public decimal? ActualLoops { get; set; }

[JsonPropertyName("Output")]
[JsonProperty(PropertyName = "Output")]
Expand Down
Loading