Skip to content

davidwclin/Simple-Persistence-for-Clojure

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

persister

Quickly prototype your software without having the database slow you down. Simple Persistence for Clojure. Based on/inspired by https://github.com/SergeyDidenko/Simple-Persistence-for-Clojure/.

Writing to the FS is useful for development, but for use on platforms like Heroku, the FS isn't available.

Installation

in project.clj:

:dependencies [[davidwclin/persister "0.0.1"]]

Usage

(default) file-based approach:

(core/init-db)

file-based approach with parameters:

(core/init-db :data-directory "db-loc" 
              :file-change-interval (* 60 15) 
              :transaction-chunk-size 1000)

db-based using postgres:

(core/init-db :db-url "postgresql://user:[email protected]:5432/dbname")

db-based using derby:

(core/init-db :db-url {:classname "org.apache.derby.jdbc.EmbeddedDriver"
                 	   :subprotocol "derby"
                       :subname "db/derby/dbname"
                       :create true})

License

Copyright © 2013 FIXME

Distributed under the Eclipse Public License, the same as Clojure.

About

Simple journal-based persistance for Clojure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Clojure 100.0%