-
Notifications
You must be signed in to change notification settings - Fork 19
Storage
Naga abstracts storage behind a Clojure protocol.
Storage is expected to be a graph store with a basic set of primitive operations. If the storage requires declaration of properties before use, then this should be done before the rules engine is run against the store.
Storage modules should register themselves with a public keyword that will be used to find the storage. This is done with the register-storage!
function.
Namespace: naga.store
Function:
(register-storage! registry-key construction-fn)
Registers a storage type with Naga. This should be called by the storage module when it is loaded.
registry-key
: Should be a keyword that will be used to address the module. The :memory
module is always registered.
construction-fn
: This is a function that takes a single parameter of a map that contains storage specific parameters, and returns an implementation of the naga.store.Storage
protocol.
e.g.
(naga.store/registry.storage! :datomic create-datomic-store)