项目作者: facjure

项目描述 :
Idiomatic Clojure interface to Postgres
高级语言: Clojure
项目地址: git://github.com/facjure/pregres.git
创建时间: 2015-08-28T21:06:33Z
项目社区:https://github.com/facjure/pregres

开源协议:Eclipse Public License 1.0

下载


Pregres

An Clojure interface to Postgres database development.

Rationale

Customers and developers have substantial investments in, and are comfortable
with the performance, security and stability of, widely used opensource
relational databases like Postgres. While Clojure developers may envy the
relative ease, flexibility and productivity of immutable databases like Datomic,
they have concerns about running them on customer-approved rdbms, accessing
existing data (including bigdata), and decades of research on fine-tuning
SQL. In addition, they face ongoing problems integrating with analytics and data
science teams.

Pregres is an effort to build a pragmatic library suitable in those areas where
a comprehensive Clojure api is suitable. It reflects the reality that, for
security, ACID compliance, and sharding scalability, sql workflows must
simply shine with idiomatic Clojure.

Features

  • Built on Clojure JDBC
  • Built-in data type conversions, including json
  • Industry’s best Connection Pool
  • First-class Migrations
  • Plain old SQL using HugSQL
  • Integration with popular Postgres extensions (postgis)

Setup

Install Postgres Docker

  1. docker pull postgres

Create Local volume (optional)

  1. mkdir $HOME/.docker/volumes/postgres

Run Postgres with username ‘postgres’, password ‘docker’

  1. docker run --name postgres -e POSTGRES_PASSWORD=docker -d -p 5432:5432 -v $HOME/.docker/volumes/postgres:/var/lib/postgresql/data postgres

Start Psql

  1. docker exec -it postgres bash
  2. root@somehost100> psql -U postgres

Run Tests

  1. lein test

Credits

Some functions are copied from the following libraries. I remain thankful to them.

Status

Beta, unstable

License

Copyright © 2015-2020, Facjure, LLC. Distributed under the Eclipse Public
License either version 1.0 or (at your option) any later version.