Liking cljdoc? Tell your friends :D

ont-app.datomic-client.core

Ports datomic.client.api to IGraph protocol with accumulate-only mutability. Defines a record DatomicClient With parameters [<conn> <db>] Where <conn> is a datomic connection to some client <db> is a DB in <conn> associated with some transaction.

Ports datomic.client.api to IGraph protocol with accumulate-only mutability.
Defines a record DatomicClient
With parameters [<conn> <db>]
Where
<conn> is a datomic connection to some client
<db> is a DB in <conn> associated with some transaction.
raw docstring

ask-s-p-oclj

(ask-s-p-o db s p o)

Returns true iff s-p-o is a triple in <db>

Returns true iff s-p-o is a triple in <db>
sourceraw docstring

clear-edn-properties-cache!clj

(clear-edn-properties-cache!)
source

clear-orphan-irrelevant-attributes-cache!clj

(clear-orphan-irrelevant-attributes-cache!)

Side-effect: removes all values in orphan-irrelevant-attributes-cache

Side-effect: removes all values in orphan-irrelevant-attributes-cache 
sourceraw docstring

datomic-querycljmultimethod

Args: [db q]. Returns the result of a query q posed to db Where <q> is either a map conforming to datomic's arity-1 query or a vector conforming to a :query clause, with implicit <db> as 2nd argument to d/q.

Args: [db q]. Returns the result of a query `q` posed to `db`
Where
<q> is either a map conforming to datomic's arity-1 query or a vector
conforming to a :query clause, with implicit <db> as 2nd argument to d/q.
sourceraw docstring

declare-edn-property!clj

(declare-edn-property! db p)

Side-effect: declares p as an EDN property in db

Side-effect: declares `p` as an EDN property in `db`
sourceraw docstring

domain-element?clj

True when a graph element is not part of the standard schema.

True when a graph element is not part of the standard schema.
sourceraw docstring

edn-properties-cacheclj

Caches the set of properties which store EDN strings for a given DB. {<db> #{<property>, ...}, ...}

Caches the set of properties which store EDN strings for a given DB.
{<db> #{<property>, ...}, ...}
sourceraw docstring

edn-property?clj

(edn-property? db p)

Returns true iff (g p :igraph/edn? true) for g of db Where

<p> names a property in <db> Note: typically used when deciding whether to encode/decode objects as edn.

Returns true iff (g `p` :igraph/edn? true) for g of `db`
Where
<p> names a property in <db>
Note: typically used when deciding whether to encode/decode objects as edn.
sourceraw docstring

ensure-igraph-schemaclj

(ensure-igraph-schema conn)
source

entity-idclj

(entity-id db s)

Returns <e> for <s> in <db> Where <e> is the entity ID (a positive integer) in (:db <g>) <s> is a subject s.t. [<e> ::id <s>] in (:db <g>) <g> is an instance of DatascriptGraph

Returns <e> for <s> in <db>
Where
<e> is the entity ID (a positive integer) in (:db <g>)
<s> is a subject s.t. [<e> ::id <s>] in (:db <g>)
<g> is an instance of DatascriptGraph
sourceraw docstring

get-normal-formclj

(get-normal-form db)

Returns <desc> for <s> in <db> Where <desc> := {<p> #{<o>, ...}, ...}

Returns <desc> for <s> in <db>
Where
<desc> := {<p> #{<o>, ...}, ...}
sourceraw docstring

get-subjectsclj

(get-subjects db)

Returns (<s>, ...) for <db>, a lazy seq Where <s> is a unique identifier for some <e> <db> is a datomic db <e> <unique-id> <s>, in <db> <e> is an entity-id <unique-id> is any <p> s.t. <p>'s datatype is a unique ID.

Returns (<s>, ...) for <db>, a lazy seq
Where
<s> is a unique identifier for some <e>
<db> is a datomic db
<e> <unique-id> <s>, in <db>
<e> is an entity-id
<unique-id> is any <p> s.t. <p>'s datatype is a unique ID.
sourceraw docstring

igraph-rulesclj

source

igraph-schemaclj

source

make-graphclj

(make-graph conn)
(make-graph conn db)

Returns an instance of DatascriptGraph for conn and optional db Where <conn> is a transactor, presumably initialized for domain-specific schemas <db> (optional) is a db filter on conn, default is the db as-of the current basis-t of <conn>

Returns an instance of DatascriptGraph for `conn` and optional `db`
Where
<conn> is a transactor, presumably initialized for domain-specific schemas
<db> (optional) is a db filter on `conn`, default is the db as-of the
  current basis-t of <conn>
sourceraw docstring

map-value-to-value-typeclj

(map-value-to-value-type value)

Returns a :db.type/* for <value>, or :edn-string Where <value> is some graph element being claimed/retracted on some g :edn-string signals that <value> should be stored as an EDN string.

Returns a :db.type/* for <value>, or :edn-string 
Where 
<value> is some graph element being claimed/retracted on some g
:edn-string signals that <value> should be stored as an EDN string.
sourceraw docstring

maybe-encode-ednclj

(maybe-encode-edn db p o)

Returns an EDN string for o if (edn-property? p) else o

Returns an EDN string for `o` if (edn-property? `p`) else `o`
sourceraw docstring

maybe-read-ednclj

(maybe-read-edn db p o)

Returns the clojure object read from o if (edn-property? p) else o

Returns the clojure object read from `o` if (edn-property? `p`) else `o`
sourceraw docstring

normal-form-timeoutclj

Sets the timeout in ms for normal form query

Sets the timeout in ms for normal form query
sourceraw docstring

ontologyclj

An igraph.graph/Graph describing the various elements in datomic-client. Primarily documentatry at this point.

An igraph.graph/Graph describing the various elements in
datomic-client. Primarily documentatry at this point. 
sourceraw docstring

orphan-irrelevant-attributesclj

(orphan-irrelevant-attributes conn)

Returns #{<insignificant-attribute>, ...} for <conn> Where <insignificant attribute> is ignored when determining orphan-dom.

Returns #{<insignificant-attribute>, ...} for <conn>
Where
<insignificant attribute> is ignored when determining orphan-dom.
sourceraw docstring

orphan-irrelevant-attributes-cacheclj

Caches attributes irrelevant to determining orphans for some conn {<conn> #{<attribute>, ....}}

Caches attributes irrelevant to determining orphans for some `conn`
{<conn> #{<attribute>, ....}}
sourceraw docstring

orphaned?clj

(orphaned? db insignificant-attribute? e)
source

query-arityclj

(query-arity q)

Returns either :arity-1 or :arity-2 depending on the type of q Where <q> is a query posed to a datomic db. Maps are arity-1 and vectors are arity-2, with implicit db as 2nd arg

Returns either :arity-1 or :arity-2 depending on the type of `q`
Where
<q> is a query posed to a datomic db.
Maps are arity-1 and vectors are arity-2, with implicit db as 2nd arg
sourceraw docstring

query-for-oclj

(query-for-o db s p)

Returns #{<o>, ...} for s and p in db Where <o> is a value for <db> s.t. <s> <p> <o> <s> is a subject in <db>

<p> is a predicate with schema definition in <db> <db> is a datomic DB

Returns #{<o>, ...} for `s` and `p` in `db`
Where
<o> is a value for <db> s.t. <s> <p>  <o> 
<s> is a subject in <db>
<p> is a predicate with schema definition in <db>
<db> is a datomic DB
sourceraw docstring

query-for-p-oclj

(query-for-p-o db s)

Returns <desc> for <s> in <db> Where <desc> := {<p> #{<o>, ...}, ...}

Returns <desc> for <s> in <db>
Where
<desc> := {<p> #{<o>, ...}, ...}
sourceraw docstring

query-responseclj

source

remove-orphansclj

(remove-orphans g)
(remove-orphans g candidates)

Returns <g'>, s.t. candidates are removed if they are orphans i.e. not connected to other elements. Side-effect: (:conn g) will be modified accordingly. Where <g> is a datomic-client <candidates> := #{<elt>, ...}, (or any sequence) default (subjects g) <elt> is an element in <g> which we suspect might be an orphan. It may be an integer entity ID or a keyword unique identifier.

Returns <g'>, s.t. `candidates` are removed if they are orphans
   i.e. not connected to other elements.
Side-effect: (:conn g)  will be modified accordingly.
Where
<g> is a datomic-client
<candidates> := #{<elt>, ...}, (or any sequence) default (subjects g)
<elt> is an element in <g> which we suspect might be an orphan. It may be
  an integer entity ID or a keyword unique identifier.
sourceraw docstring

retract-clauses-for-underspecified-tripleclj

(retract-clauses-for-underspecified-triple affected-entity-fn g to-remove)

Returns [<retraction-clause>, ...] for to-remove from db Where <retraction-clause> := [<op> <elt> ...] <g> is a <op> is in #{:db/retract :db/retractEntity} <elt> is an element of <g> <affected-entity-fn> := fn [elt] -> <entity-id>, typically with the side-effect of registering a possible orphan in the calling function. <entity-id> is the numeric id of <elt> in <g>

Returns [<retraction-clause>, ...] for `to-remove` from `db`
Where
<retraction-clause> := [<op> <elt> ...]
<g> is a 
<op> is in #{:db/retract :db/retractEntity}
<elt> is an element of <g>
<affected-entity-fn> := fn [elt] -> <entity-id>, typically with the side-effect 
  of registering a possible orphan in the calling function.
<entity-id> is the numeric id of <elt> in <g>
sourceraw docstring

standard-schema-elementsclj

The set of elements provided at time of schema creation.

The set of elements provided at time of schema creation.
sourceraw docstring

value-to-value-type-atomclj

From https://docs.datomic.com/cloud/schema/schema-reference.html#db-valuetype
sourceraw docstring

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

× close