Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ epers Public

A very simple persistance layer for Erlang applications for different DB's

Notifications You must be signed in to change notification settings

marcelog/epers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WARNING

This repo is deprecated. Epers has now grown and is now called sumo_db, and can be found at the Inaka github repository. This repo is kept for historical reasons.


About

This is a work in progress. There's also an article about epers.

epers aims to ease db access for erlang applications. It offers a very simple persistance layer capable of interacting with different db's, while offering a consistent api to your code.

Overview

  • epers gives you a standard way to define your db schema, no matter the db implementation (mongo, mysql, redis, etc).
  • Your entities encapsulate behavior in code (functions in module) and state into proplists.
  • epers is the main module. It translates to and from #epers_doc into your own state.
  • Each repo is a process epers_repo that calls the actual db driver (e.g: epers_repo_mysql).
  • Some native domain events are supported, that are dispatched through a gen_event:notify/2 automatically when an entity is created, updated, deleted. Also when a schema is created and when all entities of a given type are deleted. Events are described in this article

DB's supported

In progress

Planned

  • mnesia
  • memory

Example

See: examples/blog for a full example. To run it, while being in the top level directory:

make all blog

TODO

  • Get rid of atoms and use lists.

About

A very simple persistance layer for Erlang applications for different DB's

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages