Liking cljdoc? Tell your friends :D

naga.storage.datomic.core

Storage wrapper around Datomic

Storage wrapper around Datomic
raw docstring

assertion-from-tripleclj

(assertion-from-triple attr->type->new [e a v])

Inputs: [attr->type->new :- #:s{Keyword #:s{Keyword s/Keyword}} [e a v] :- nss/Triple] Returns: [(s/one s/Keyword "assertion") (s/one s/Any "entity") (s/one s/Keyword "attribute") (s/one s/Any "value")]

Converts a triple into a Datomic assertion

Inputs: [attr->type->new :- #:s{Keyword #:s{Keyword s/Keyword}} [e a v] :- nss/Triple]
Returns: [(s/one s/Keyword "assertion") (s/one s/Any "entity") (s/one s/Keyword "attribute") (s/one s/Any "value")]

Converts a triple into a Datomic assertion
sourceraw docstring

build-uriclj

(build-uri uri m)

Inputs: [uri :- URI m :- String] Returns: String

Reads a configuration map, or creates a Datomic URI. Reports an error if both are not valid

Inputs: [uri :- URI m :- String]
Returns: String

Reads a configuration map, or creates a Datomic URI. Reports an error if both are not valid
sourceraw docstring

create-storeclj

(create-store {uri :uri user-data :init data-file :json mp :map :as config})

Inputs: [{uri :uri, user-data :init, data-file :json, mp :map, :as config}] Returns: (s/pred (fn* [p1__9372#] (extends? Storage (class p1__9372#))))

Factory function to create a store

Inputs: [{uri :uri, user-data :init, data-file :json, mp :map, :as config}]
Returns: (s/pred (fn* [p1__9372#] (extends? Storage (class p1__9372#))))

Factory function to create a store
sourceraw docstring

dvar?clj

(dvar? v)
source

expand-symbolclj

(expand-symbol sym-test? [e a v :as pattern])

Converts a pattern with a variable attribute into a pair that converts the requested attribute into its identifier. Returns a seq of patterns.

Converts a pattern with a variable attribute into a pair
that converts the requested attribute into its identifier.
Returns a seq of patterns.
sourceraw docstring

file-typeclj

(file-type file)

Inputs: [file] Returns: s/Keyword

Guesses at the type of file provided

Inputs: [file]
Returns: s/Keyword

Guesses at the type of file provided
sourceraw docstring

generic-typeclj

(generic-type d)

Determines a general data type for the given data

Determines a general data type for the given data
sourceraw docstring

get-attrib-projectionclj

(get-attrib-projection {o :originals} [_ attr _ :as p])

Returns a projection function, given a pattern and the current attributes.

Returns a projection function, given a pattern and the current attributes.
sourceraw docstring

init!clj

(init! connection)

Inputs: [connection]

Initializes storage, and returns the result of any transaction. Returns nil if no transaction was needed.

Inputs: [connection]

Initializes storage, and returns the result of any transaction. Returns nil if no transaction was needed.
sourceraw docstring

kw-from-typeclj

source

kw-from-type*clj

(kw-from-type* t prefix)

Determines a keyword for a provided type

Determines a keyword for a provided type
sourceraw docstring

matching-varsclj

(matching-vars to from)

Inputs: [to :- [s/Any] from :- [Symbol]] Returns: [[s/Num s/Num]]

Returns pairs of indexes into seqs where the vars match. For any variable that appears in both sequences, the column number in the 'from' parameter gets mapped to the column number of the same variable in the 'to' parameter.

Inputs: [to :- [s/Any] from :- [Symbol]]
Returns: [[s/Num s/Num]]

Returns pairs of indexes into seqs where the vars match.
 For any variable that appears in both sequences, the column number in the
 'from' parameter gets mapped to the column number of the same variable
 in the 'to' parameter.
sourceraw docstring

project-rowclj

(project-row pattern mapping row)

Inputs: [pattern :- EPVPattern mapping :- [[s/Num s/Num]] row :- [Value]] Returns: [s/Any]

Creates a new EPVPattern from an existing one, based on existing bindings. Uses the mapping to copy from columns in 'row' to overwrite variables in 'pattern'. 'pattern' must be a vector. The index mappings have already been found and are in the 'mapping' argument

Inputs: [pattern :- EPVPattern mapping :- [[s/Num s/Num]] row :- [Value]]
Returns: [s/Any]

Creates a new EPVPattern from an existing one, based on existing bindings.
 Uses the mapping to copy from columns in 'row' to overwrite variables in 'pattern'.
 'pattern' must be a vector.
 The index mappings have already been found and are in the 'mapping' argument
sourceraw docstring

read-attribute-infoclj

(read-attribute-info db)

Inputs: [db] Returns: {(s/required-key :overloads) #:s{Keyword #:s{Keyword s/Keyword}}, (s/required-key :originals) #:s{Keyword s/Keyword}, (s/required-key :types) #:s{Keyword s/Keyword}}

Reads attribute info and uses this to create 3 maps.

  1. Maps overloaded attributes to a map of type->name, where the name is the attribute to use for that type.
  2. Maps aliases for the overloaded attribute back to the original.
  3. Maps attribute names to the type of data they hold.
Inputs: [db]
Returns: {(s/required-key :overloads) #:s{Keyword #:s{Keyword s/Keyword}}, (s/required-key :originals) #:s{Keyword s/Keyword}, (s/required-key :types) #:s{Keyword s/Keyword}}

Reads attribute info and uses this to create 3 maps.
1. Maps overloaded attributes to a map of type->name,
   where the name is the attribute to use for that type.
2. Maps aliases for the overloaded attribute back to the original.
3. Maps attribute names to the type of data they hold.
sourceraw docstring

top-idsclj

(top-ids db ids acc)

Adds to an accumulator all Database entities that represent a top level entity

Adds to an accumulator all Database entities that represent a top level entity
sourceraw docstring

transaction-fnclj

(transaction-fn {:keys [tx-id db connection]})

Create a transaction function for the given storage configuration

Create a transaction function for the given storage configuration
sourceraw docstring

txclj

(tx db)

Determines the transaction ID for a database

Determines the transaction ID for a database
sourceraw docstring

type->dbtypeclj

source

type->suffixclj

source

user-init-dataclj

(user-init-data user-data-file)

Inputs: [user-data-file :- s/Str]

Generates initialization transaction data from user data

Inputs: [user-data-file :- s/Str]

Generates initialization transaction data from user data
sourceraw docstring

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

× close