-
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improvement: lay the groundwork for fully atomic actions
- Loading branch information
1 parent
1acca3d
commit 3be83d6
Showing
25 changed files
with
651 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
defmodule Ash.Query.Function.StringLength do | ||
@moduledoc """ | ||
Trims whitespace from a string | ||
""" | ||
|
||
use Ash.Query.Function, name: :string_length | ||
|
||
def args, | ||
do: [ | ||
[:string] | ||
] | ||
|
||
def evaluate(%{arguments: [value]}) do | ||
{:known, String.length(value)} | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
defmodule Ash.Query.Function.StringTrim do | ||
@moduledoc """ | ||
Trims whitespace from a string | ||
""" | ||
|
||
use Ash.Query.Function, name: :string_trim | ||
|
||
def args, | ||
do: [ | ||
[:string] | ||
] | ||
|
||
def evaluate(%{arguments: [value]}) do | ||
{:known, String.trim(value)} | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.