An Clojure interface to Postgres database development.
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.
- 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)
Install Postgres Docker
docker pull postgres
Create Local volume (optional)
mkdir $HOME/.docker/volumes/postgres
Run Postgres with username 'postgres', password 'docker'
docker run --name postgres -e POSTGRES_PASSWORD=docker -d -p 5432:5432 -v $HOME/.docker/volumes/postgres:/var/lib/postgresql/data postgres
Start Psql
docker exec -it postgres bash
root@somehost100> psql -U postgres
Run Tests
lein test
Some functions are copied from the following libraries. I remain thankful to them.
Beta, unstable
Copyright © 2015-2020, Facjure, LLC. Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.