Liking cljdoc? Tell your friends :D

toucan2.tools.identity-query


identity-connectionclj

(identity-connection rows)
source

identity-queryclj

(identity-query reducible-rows)

A queryable that returns reducible-rows as-is without compiling anything or running anything against a database. Good for mocking stuff.

(def parrot-query
  (identity-query [{:id 1, :name "Parroty"}
                   {:id 2, :name "Green Friend"}]))

(select/select ::parrot parrot-query)
=>
[(instance ::parrot {:id 1, :name "Parroty"})
 (instance ::parrot {:id 2, :name "Green Friend"})]
A queryable that returns `reducible-rows` as-is without compiling anything or running anything against a database.
Good for mocking stuff.

```clj
(def parrot-query
  (identity-query [{:id 1, :name "Parroty"}
                   {:id 2, :name "Green Friend"}]))

(select/select ::parrot parrot-query)
=>
[(instance ::parrot {:id 1, :name "Parroty"})
 (instance ::parrot {:id 2, :name "Green Friend"})]
```
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close