Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

branch: master
README.md

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.
Something went wrong with that request. Please try again.