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 builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close