Skip to content

Instantly share code, notes, and snippets.

@jdkealy
Created June 14, 2017 21:37
Show Gist options
  • Save jdkealy/e0c4ed28e64752130fe82d0f3e39c575 to your computer and use it in GitHub Desktop.
Save jdkealy/e0c4ed28e64752130fe82d0f3e39c575 to your computer and use it in GitHub Desktop.
(d/q
'[:find ?u
:where [?u :user/email "[email protected]"]]
(db/_d))
; #{[17592186045908]}
(d/q
'[:find ?entity ?name ?tx ?score
:in $ ?search
:where [(fulltext $ :user/email ?search) [[?entity ?name ?tx ?score]]]]
(db/_d) "jdkeal")
; #{}
(-> (db/_d) (d/entity :user/email) d/touch)
; {:db/id 316, :db/ident :user/email, :db/valueType :db.type/string, :db/cardinality :db.cardinality/one, :db/index true, :db/fulltext true}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment