View Find Datomic ident names
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
Datomic.q(Query( | |
s"""[:find ?name | |
:in $$ | |
:where [_ :db/ident ?ident] | |
[(namespace ?ident) ?ns] | |
[(name ?ident) ?name] | |
[(= ?ns "namespace_name")] | |
]""" | |
), database).foreach { | |
case name: String => println(name) |
View Find Datomic idents in a namespace
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
[:find ?ns ?name | |
:where [_ :db/ident ?ident] | |
[(namespace ?ident) ?ns] | |
[(name ?ident) ?name] | |
[(= ?ns "namespace_name")] | |
] |
View Find Datomic idents in namespace [Scala]
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
Datomic.q(Query( | |
s"""[:find ?ident | |
:in $$ | |
:where [_ :db/ident ?ident] | |
[(namespace ?ident) ?ns] | |
[(= ?ns "namespace_name")] | |
]""" | |
), database).foreach { | |
case ident: Keyword => println(ident) | |
} |
View Haskell-debug-trace
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
import Debug.Trace | |
debug :: Show a => String -> a -> a | |
debug description value = | |
trace (description ++ ": " ++ show value) value |