Skip to content

DataBase Interface for Erlang/Elixir to use PostgreSQL

License

Notifications You must be signed in to change notification settings

dbi-beam/dbi_pgsql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DBI for Erlang (PostgreSQL)

Build Status Codecov License: LGPL 2.1 Hex

Database Interface for Erlang and Elixir using PostgreSQL. For further information check DBI.

Install (rebar3)

To use it, with rebar, you only need to add the dependency to the rebar.config file:

{deps, [
    {dbi_pgsql, "0.1.1"}
]}

Install (mix)

To use it, with mix, you only need to add the dependency to the mix.exs file:

{:dbi_pgsql, "~> 0.1.1"}

Configuration

The configuration is made in the configuration file (sys.config or app.config) so, you can add a new block for config the database connection as follow:

{dbi, [
    {mystrongdb, [
        {type, pgsql},
        {host, "localhost"},
        {user, "root"},
        {pass, "root"},
        {database, "mystrongdb"},
        {poolsize, 100}
    ]}
]}

In case you're using Elixir, you can define the configuration for your project in this way:

confg :dbi, mystrongdb: [
              type: :pgsql,
              host: 'localhost',
              user: 'root',
              pass: 'root',
              database: 'mystrongdb',
              poolsize: 100
            ]

Enjoy!

About

DataBase Interface for Erlang/Elixir to use PostgreSQL

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages