forked from avescodes/conformity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
read directly from the resource, no intermediate string
- uses less memory, not requiring the entire resource contents in memory before reading - renamed to more clearly indicate what it does - there's nothing schema or norm specific about it - clojure.edn/read is safer than read-string regarding read-eval - the test provides an example of a more typical ensure-conforms use - from resources rather than Clojure source
- Loading branch information
Showing
3 changed files
with
52 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{:test4/norm1 | ||
{:txes [[{:db/ident :test/attribute1 | ||
:db/doc "test attribute 1" | ||
:db/valueType :db.type/string | ||
:db/cardinality :db.cardinality/one | ||
:db/id #db/id[:db.part/db] | ||
:db.install/_attribute :db.part/db} | ||
{:db/ident :test/user | ||
:db/doc "test user" | ||
:db/valueType :db.type/string | ||
:db/cardinality :db.cardinality/one | ||
:db/id #db/id[:db.part/db] | ||
:db.install/_attribute :db.part/db} | ||
{:db/ident :test/transaction-metadata | ||
:db/doc "annotates the transaction with metadata" | ||
:db/id #db/id[:db.part/user] | ||
:db/fn #db/fn | ||
{:lang :clojure | ||
:params [db metadata] | ||
:code [(assoc metadata :db/id #db/id[:db.part/tx])]}}]]}} |
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