Coder Social home page Coder Social logo

sumo_db_pgsql's Introduction

sumo_db_pgsql

About

This is the PostgreSQL adapter for sumo_db.

PosgreSQL

Install PostgreSQL

To install PostgreSQL please follow the instructions in this link: Installing PostgreSQL.

Getting Started

To start using sumo_db with this PostgreSQL adapter sumo_db_pgsql is pretty easy, you just have to follow these steps:

  1. Add sumo_db and sumo_db_pgsql as dependencies in your project.

Using Rebar3:

{deps, [
  {sumo_db_pgsql, "0.1.1"}
]}.
  1. You need at least one doc/entity, let's use sumo_test_people_pgsql as example.

    NOTE: if you use this entity, you'll need to include mixer to the dependencies list

  2. Provide the configuration file, e.g.: test.config.

  3. Now you can run your app and start using sumo from there.

Running sumo from Erlang console

Start the Erlang console, adding the path to your beams and config file

$ REBAR_PROFILE=test rebar3 shell --config=test/test.config

Within the console:

> application:ensure_all_started(sumo_db_pgsql).
12:02:00.250 [info] Application lager started on node nonode@nohost
12:02:00.250 [info] Application crypto started on node nonode@nohost
12:02:00.251 [info] Application asn1 started on node nonode@nohost
12:02:00.251 [info] Application public_key started on node nonode@nohost
12:02:00.251 [info] Application ssl started on node nonode@nohost
12:02:00.252 [info] Application epgsql started on node nonode@nohost
12:02:00.256 [info] Application sasl started on node nonode@nohost
12:02:00.256 [info] Creating wpool ETS table
12:02:00.256 [info] Application worker_pool started on node nonode@nohost
12:02:00.256 [info] Application quickrand started on node nonode@nohost
12:02:00.256 [info] Application uuid started on node nonode@nohost
12:02:00.337 [info] Application sumo_db started on node nonode@nohost
12:02:00.341 [info] Application sumo_db_pgsql started on node nonode@nohost
{ok,[syntax_tools,compiler,goldrush,lager,crypto,asn1,
     public_key,ssl,epgsql,sasl,worker_pool,quickrand,uuid,
     sumo_db,sumo_db_pgsql]}

% from here you can start using sumo

> sumo:find_all(people).
[]

Running Tests

  • Create a user (or use defaults) and configure it on test/test.config file.

  • Create test database sumo_test

$ rebar3 ct

Contact Us

For questions or general comments regarding the use of this library, please use our public hipchat room.

If you find any bugs or have a problem while using this library, please open an issue in this repo (or a pull request :)).

And you can check all of our open-source projects at inaka.github.io

sumo_db_pgsql's People

Contributors

cabol avatar ferigis avatar harenson avatar lucafavatella avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.