{"id":20159868,"url":"https://github.com/diogok/pg-next","last_synced_at":"2026-04-13T02:51:16.438Z","repository":{"id":43852753,"uuid":"233699907","full_name":"diogok/pg-next","owner":"diogok","description":"PostgreSQL with next.jdbc, supporting JSONB and Timestamp using Java8 Instant","archived":false,"fork":false,"pushed_at":"2024-02-21T00:11:43.000Z","size":10,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T13:09:32.036Z","etag":null,"topics":["java-time","jsonb","pool","postgresql","timestamp"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/diogok.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-13T21:44:31.000Z","updated_at":"2023-01-28T10:14:53.000Z","dependencies_parsed_at":"2023-02-15T19:35:20.303Z","dependency_job_id":null,"html_url":"https://github.com/diogok/pg-next","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diogok%2Fpg-next","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diogok%2Fpg-next/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diogok%2Fpg-next/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diogok%2Fpg-next/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diogok","download_url":"https://codeload.github.com/diogok/pg-next/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241597679,"owners_count":19988295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java-time","jsonb","pool","postgresql","timestamp"],"created_at":"2024-11-14T00:10:45.295Z","updated_at":"2026-04-13T02:51:11.405Z","avatar_url":"https://github.com/diogok.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pg-next\n\nA simple lib with what is needed to connect with `jdbc.next` to `postgresql`.\n\nAlready including types for `jsonb` using `cheshire` and `timestamp with timezone` using `instant` from `clojure.java-time`.\n\n## Usage\n\nImport from clojars:\n\n[![Clojars Project](https://img.shields.io/clojars/v/org.clojars.diogok/pg-next.svg)](https://clojars.org/org.clojars.diogok/pg-next)\n\nIt will pull `next.jdbc`, `postgres jdbc` driver, `hikari cp` and all other deps for you.\n\nRequire the lib:\n\n```clojure\n(require '[pg-next.core :refer [make-pool]])\n```\n\nCreate a connection pool. These are the default values, you only need to supply what you want to override.\n\n```clojure\n(def db-spec \n {:host \"localhost\"\n    :port \"5432\"\n    :username \"postgres\"\n    :password \"postgres\"\n    :dbname \"postgres\"})\n\n(def pool (make-pool db-spec))\n```\n\nUse the pool with `next.jdbc`:\n\n```clojure\n(require '[next.jdbc :as jdbc])\n(require '[next.jdbc.sql :as sql])\n(require '[java.time :refer [instant]])\n\n(jdbc/execute-one! pool\n[\"CREATE TABLE IF NOT EXISTS my_table (\nid varchar primary key,\nmy_timestamp TIMESTAMP WITH TIME ZONE,\nmy_object JSONB\n)\"])\n\n(sql/insert! pool :my_table {:id \"m1\" :my_timestamp (instant) :my_object {:foo \"bar\"}})\n\n(sql/get-by-id pool :my_table \"m1\")\n#=\u003e:my_table{:id \"m1\" :my_timestamp #java.time.Instant :my_object {:foo \"bar\"}}\n```\n\n## License\n\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiogok%2Fpg-next","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiogok%2Fpg-next","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiogok%2Fpg-next/lists"}