Liking cljdoc? Tell your friends :D

ribelo.doxa


*atom-fn*clj/s


*empty-map*clj/s


*id-sufixes*clj/s


-execute-qclj/smacro

(-execute-q {:keys [find first? mapcat? pull keys] :as pq} db)

-last-txclj/s

(-last-tx db)

-last-tx-match-datom?clj/s

(-last-tx-match-datom? db datom)

-last-tx-match-query?clj/s

(-last-tx-match-query? db pq)

-last-tx-match-raw-query?clj/s

(-last-tx-match-raw-query? db pq)

-last-tx-match-where?clj/s

(-last-tx-match-where? db datoms)

-last-tx-match-where?*clj/s

(-last-tx-match-where?* db datoms)

-match-two-datomsclj/s

(-match-two-datoms d1 d2)

-submit-commitclj/s

(-submit-commit db tx)

apply transactions to db.

apply transactions to db.
raw docstring

-tx->datomsclj/s

(-tx->datoms tx)

-tx-match-datom?clj/s

(-tx-match-datom? tx datom)

build-args-mapclj/s

(build-args-map {:keys [in args] :as pq})

build-meander-queryclj/s

(build-meander-query m)

commitclj/s

(commit db txs)
(commit db txs tx-meta)

apply transactions to db. txs can be either a single transaction or a vector of transactions. returns a modified db. transaction report is stored in the db metadata.

usage: [:dx/put|delete|conj|update|match [table eid] ?m | (?k ?v)]

put: entire map|s with entity id [:dx/put {:person/id :ivan :name "ivan" :age 30}] [:dx/put [{:person/id :ivan :name "ivan" :age 30} ...]]

entire map, without entity id
[:dx/put [:person/id :ivan] {:name "ivan" :age 30}]

ident|s
[:dx/put [:person/id :ivan] :friend [:person/id :petr]]
[:dx/put [:person/id :ivan] :friend [[:person/id :petr] ...]]

reference map|s
[:dx/put [:person/id :ivan] :friend {:person/id :petr :name "petr"}]
[:dx/put [:person/id :ivan] :friend [{:person/id :petr :name "petr"} ...]]

key value
[:dx/put [:person/id :ivan] :age 12]

delete: ident [:dx/delete [:person/id :ivan]]

entity|s
[:dx/delete {:person/id :ivan ...}]
[:dx/delete [{:person/id :ivan ...} ...]]

key
[:dx/delete [:person/id :ivan] :age]

value - like disj
[:dx/delete [:person/id :ivan] :aka "tupen"]

conj: value [:dx/conj [:person/id :ivan] :aka "tupen"]

ident|s
[:dx/conj [:person/id :ivan] :friend [:person/id :petr]]
[:dx/conj [:person/id :ivan] :friend [[:person/id :petr] ...]]

entity|s
[:dx/conj [:person/id :ivan] :friend {:person/id :petr ...}]
[:dx/conj [:person/id :ivan] :friend [{:person/id :petr ...} ...]]

update: entity [:dx/update [:person/id :ivan] (fn [entity] (f entity)]

key
[:dx/update [:person/id :ivan] :age inc]

match: entity [:dx/match [:person/id :ivan] {:person/id :ivan ...}]

key value
[:dx/match [:person/id :ivan] :age 30]

key fn
[:dx/match [:person/id :ivan] :salary #(> % 10000)]
apply transactions to db. txs can be either a single transaction or a vector of
transactions. returns a modified db. transaction report is stored in the
db metadata.

usage:
[:dx/put|delete|conj|update|match [table eid] ?m | (?k ?v)]

put:
    entire map|s with entity id
    [:dx/put {:person/id :ivan :name "ivan" :age 30}]
    [:dx/put [{:person/id :ivan :name "ivan" :age 30} ...]]

    entire map, without entity id
    [:dx/put [:person/id :ivan] {:name "ivan" :age 30}]

    ident|s
    [:dx/put [:person/id :ivan] :friend [:person/id :petr]]
    [:dx/put [:person/id :ivan] :friend [[:person/id :petr] ...]]

    reference map|s
    [:dx/put [:person/id :ivan] :friend {:person/id :petr :name "petr"}]
    [:dx/put [:person/id :ivan] :friend [{:person/id :petr :name "petr"} ...]]

    key value
    [:dx/put [:person/id :ivan] :age 12]

delete:
    ident
    [:dx/delete [:person/id :ivan]]

    entity|s
    [:dx/delete {:person/id :ivan ...}]
    [:dx/delete [{:person/id :ivan ...} ...]]

    key
    [:dx/delete [:person/id :ivan] :age]

    value - like disj
    [:dx/delete [:person/id :ivan] :aka "tupen"]

conj:
    value
    [:dx/conj [:person/id :ivan] :aka "tupen"]

    ident|s
    [:dx/conj [:person/id :ivan] :friend [:person/id :petr]]
    [:dx/conj [:person/id :ivan] :friend [[:person/id :petr] ...]]

    entity|s
    [:dx/conj [:person/id :ivan] :friend {:person/id :petr ...}]
    [:dx/conj [:person/id :ivan] :friend [{:person/id :petr ...} ...]]

update:
    entity
    [:dx/update [:person/id :ivan] (fn [entity] (f entity)]

    key
    [:dx/update [:person/id :ivan] :age inc]

match:
    entity
    [:dx/match [:person/id :ivan] {:person/id :ivan ...}]

    key value
    [:dx/match [:person/id :ivan] :age 30]

    key fn
    [:dx/match [:person/id :ivan] :salary #(> % 10000)]
raw docstring

commit!clj/s

(commit! db_ txs)
(commit! db_ txs tx-meta)

accepts an atom with db, see commit

accepts an atom with db, see `commit`
raw docstring

comp-someclj/s

(comp-some & fns)

conjvclj/s

returns a vector even if the argument is nil

returns a vector even if the argument is nil
raw docstring

create-dxclj/s

(create-dx)
(create-dx data)
(create-dx data {:keys [with-diff?] :as opts})

creates a db, can take a map, which is written to the metadata

creates a db, can take a map, which is written to the metadata
raw docstring

datalog->meanderclj/s

(datalog->meander {:keys [where in args] :as q})

db-withclj/s

(db-with data)
(db-with db data)

delete-cached-results!clj/s

(delete-cached-results! db kw)

denormalizeclj/s

(denormalize data)
(denormalize db data)
(denormalize db data max-level)

turns a flat map into a nested one. to avoid stackoverflow and infinite loop, it takes a maximum nesting level as an additional argument

turns a flat map into a nested one. to avoid stackoverflow and infinite loop,
it takes a maximum nesting level as an additional argument
raw docstring

dxs_clj/s


get-dxclj/s

(get-dx k)

get-dx!clj/s

(get-dx! k)

haulclj/s

(haul db)
(haul db x)
(haul db x max-level)

into-mapclj/s

returns a map even if the argument is nil

returns a map even if the argument is nil
raw docstring

listen!clj/s

(listen! db_ cb)
(listen! db_ k cb)

listens for changes in the db. each time changes are made via commit, the callback is called with the db. the transaction report is written to the db metadata, and may include, depending on the configuration, the transaction time, the difference between the old and new db, the db hash. calling listen twice with the same k overwrites the previous callback.

listens for changes in the db. each time changes are made via commit, the
callback is called with the db. the transaction report is written to the db
metadata, and may include, depending on the configuration, the transaction
time, the difference between the old and new db, the db hash. calling listen
twice with the same k overwrites the previous callback.
raw docstring

normalizeclj/s

(normalize data)

turns a nested map into a flat collection with references.

turns a nested map into a flat collection with references.
raw docstring

parse-findclj/s

(parse-find args)

parse-queryclj/s

(parse-query q & args)

parse-query-elemclj/s

(parse-query-elem elem args-map)

patchclj/s

(patch db edits)
(patch db edits time)

patch db using ediscript edits

patch db using ediscript edits
raw docstring

patch!clj/s

(patch! db_ edits)
(patch! db_ edits time)

patch db inside atom, see patch

patch db inside atom, see `patch`
raw docstring

pullclj/s

(pull db query)
(pull db query id)

pull*clj/s

(pull* db query)
(pull* db query parent)

pull-oneclj/s

(pull-one db query)
(pull-one db query id)

qclj/smacro

(q q' db & args)

qsymbol?clj/s

(qsymbol? x)

queryclj

(query args)

reg-dx!clj/s

(reg-dx! id store)

(reverse-search db id)
(reverse-search db k id)

rewrite-all-argsclj/s


rewrite-argclj/s

(rewrite-arg arg)

simplify-whereclj/s

(simplify-where where args-map)

unlisten!clj/s

(unlisten! db_ k)

remove registered listener

remove registered listener
raw docstring

valid-id?clj/s

(valid-id? id)

with-dxclj/smacro

(with-dx bindings & body)

with-dx!clj/smacro

(with-dx! bindings & body)

with-time-msclj/smacro

(with-time-ms & body)

macro establishes the execution time of the body and returns a result with attached metadata, with key execution-time in milliseconds

macro establishes the execution time of the body and returns a result with
attached metadata, with key `execution-time` in milliseconds
raw docstring

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

× close