Skip to content

Commit 7f277ab

Browse files
committed
chore: remove loads from expression calculations
1 parent dc4fb2e commit 7f277ab

File tree

4 files changed

+2
-10
lines changed

4 files changed

+2
-10
lines changed

test/support/complex_calculations/resources/certification.ex

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,10 @@ defmodule AshPostgres.Test.ComplexCalculations.Certification do
4141
calculations do
4242
calculate :all_documentation_approved, :boolean do
4343
calculation(expr(count_of_skills == count_of_approved_skills))
44-
load([:count_of_skills, :count_of_approved_skills])
4544
end
4645

4746
calculate :some_documentation_created, :boolean do
4847
calculation(expr(count_of_documented_skills > 0 && all_documentation_approved == false))
49-
50-
load([:count_of_documented_skills, :all_documentation_approved])
5148
end
5249
end
5350

test/support/complex_calculations/resources/skill.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ defmodule AshPostgres.Test.ComplexCalculations.Skill do
6060
)
6161
)
6262

63-
load([:count_of_demonstrated_documentations])
6463
public?(true)
6564
end
6665
end

test/support/resources/account.ex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ defmodule AshPostgres.Test.Account do
2727
calculate(
2828
:active,
2929
:boolean,
30-
expr(is_active && user_is_active),
31-
load: [:user_is_active]
30+
expr(is_active && user_is_active)
3231
)
3332
end
3433

test/support/resources/post.ex

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,9 +1023,7 @@ defmodule AshPostgres.Test.Post do
10231023
})
10241024
)
10251025

1026-
calculate(:c_times_p, :integer, expr(count_of_comments * count_of_linked_posts),
1027-
load: [:count_of_comments, :count_of_linked_posts]
1028-
)
1026+
calculate(:c_times_p, :integer, expr(count_of_comments * count_of_linked_posts))
10291027

10301028
calculate(
10311029
:literal_map_in_expr,
@@ -1160,7 +1158,6 @@ defmodule AshPostgres.Test.Post do
11601158
)
11611159
) do
11621160
public?(true)
1163-
load([:total_edited_time, :total_planned_time, :total_comment_time, :base_reading_time])
11641161
end
11651162
end
11661163

0 commit comments

Comments
 (0)