https://github.com/dbi-beam/dbi_pgo
DBI PostgreSQL extension using PGO
https://github.com/dbi-beam/dbi_pgo
elixir erlang library postgresql
Last synced: 2 months ago
JSON representation
DBI PostgreSQL extension using PGO
- Host: GitHub
- URL: https://github.com/dbi-beam/dbi_pgo
- Owner: dbi-beam
- License: lgpl-2.1
- Created: 2018-05-15T07:50:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-17T09:45:24.000Z (almost 8 years ago)
- Last Synced: 2025-12-26T05:58:19.047Z (6 months ago)
- Topics: elixir, erlang, library, postgresql
- Language: Erlang
- Homepage:
- Size: 726 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
DBI for Erlang (PostgreSQL)
===========================
[](https://travis-ci.org/dbi-beam/dbi_pgsql)
[](https://codecov.io/gh/dbi-beam/dbi_pgsql)
[](https://raw.githubusercontent.com/dbi-beam/dbi_pgsql/master/COPYING)
[](https://hex.pm/packages/dbi_pgsql)
Database Interface for Erlang and Elixir using PostgreSQL ([pgo](https://github.com/SpaceTime-IoT/pgo)). For further information check [DBI](https://github.com/dbi-beam/dbi).
### Install (rebar3)
To use it, with rebar, you only need to add the dependency to the rebar.config file:
```erlang
{deps, [
{dbi_pgo, "0.1.0"}
]}
```
### Install (mix)
To use it, with mix, you only need to add the dependency to the mix.exs file:
```elixir
{:dbi_pgo, "~> 0.1.0"}
```
### 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:
```erlang
{dbi, [
{mystrongdb, [
{type, pgo},
{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:
```elixir
confg :dbi, mystrongdb: [
type: :pgo,
host: 'localhost',
user: 'root',
pass: 'root',
database: 'mystrongdb',
poolsize: 100
]
```
Enjoy!