Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/ring/session/store
.gitignore
.projectile
LICENSE
README.org
build.boot

README.org

ring session store for Datomic

Get Started

Add dependencies

[com.datomic/datomic-pro "0.9.5344"]
[datomic-session-store "0.1.0"]

with ring

(require '[ring.session.store.datomic :refer (datomic-store)])

(def app
  (wrap-session handler {:store (datomic-store datomic-conn)}))

If your using noir

(require '[ring.session.store.datomic :refer (datomic-store noir< noir>)])

(app-handler [app]
             :session-options {:store (datomic-store datomic-conn :< noir< :> noir>)})

Find a user all sessions

(:session/_user user-entity)

Session schema

{:db/id                 (d/tempid :db.part/db)
 :db/ident              :ring/session
 :db.install/_partition :db.part/db}
{:db/id                 (d/tempid :db.part/db)
 :db/ident              :session/key
 :db/valueType          :db.type/string
 :db/unique             :db.unique/identity
 :db/cardinality        :db.cardinality/one
 :db.install/_attribute :db.part/db}
{:db/id                 (d/tempid :db.part/db)
 :db/ident              :session/user
 :db/valueType          :db.type/ref
 :db/cardinality        :db.cardinality/one
 :db.install/_attribute :db.part/db}
{:db/id                 (d/tempid :db.part/db)
 :db/ident              :session/value
 :db/valueType          :db.type/bytes
 :db/cardinality        :db.cardinality/one
 :db/noHistory          true
 :db.install/_attribute :db.part/db}
You can’t perform that action at this time.