-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup Codes Evaluation in Retrieve Expression
In case the codes of a Retrieve expression were obtained from a Concept, the source-property expression that get the codes of a Concept was preserved until the clauses had to be calculated. Now the source-property expression will evaluate the codes path on the static Concept during compilation as other expressions also do. After the codes expression is compiled, it's checked for holding a list of codes. So only static codes expressions are supported now explicitly and an appropriate exception is thrown otherwise. Doing so ensures that the codes argument used in external-data is actually a list of codes and so we also can calculate the query clauses in a simple way. That allowed to remove the record for the source-property expression. So the codes is simpler and safer as before.
- Loading branch information
1 parent
799c373
commit 66557ff
Showing
8 changed files
with
137 additions
and
184 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
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 |
---|---|---|
@@ -1,13 +1,12 @@ | ||
(ns blaze.elm.code-spec | ||
(:require | ||
[blaze.elm.code :as code] | ||
[clojure.spec.alpha :as s]) | ||
(:import | ||
[blaze.elm.code Code])) | ||
[clojure.spec.alpha :as s])) | ||
|
||
(defn code? [x] | ||
(instance? Code x)) | ||
(s/fdef code/code? | ||
:args (s/cat :x any?) | ||
:ret boolean?) | ||
|
||
(s/fdef code/code | ||
:args (s/cat :system string? :version (s/nilable string?) :code string?) | ||
:ret code?) | ||
:ret code/code?) |
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.