{"id":19293949,"url":"https://github.com/igrishaev/pg2","last_synced_at":"2025-05-16T08:05:11.901Z","repository":{"id":214761543,"uuid":"737235570","full_name":"igrishaev/pg2","owner":"igrishaev","description":"A fast PostgreSQL driver for Clojure","archived":false,"fork":false,"pushed_at":"2025-04-26T16:05:35.000Z","size":2397,"stargazers_count":142,"open_issues_count":3,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-14T01:59:53.624Z","etag":null,"topics":["clojure","java","postgresql"],"latest_commit_sha":null,"homepage":"https://github.com/igrishaev/pg2","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/igrishaev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-12-30T09:39:03.000Z","updated_at":"2025-05-13T09:23:22.000Z","dependencies_parsed_at":"2024-04-01T19:25:13.866Z","dependency_job_id":"4342a41f-a69e-442b-a288-9c88a6a566e7","html_url":"https://github.com/igrishaev/pg2","commit_stats":null,"previous_names":["igrishaev/pg2"],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igrishaev%2Fpg2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igrishaev%2Fpg2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igrishaev%2Fpg2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igrishaev%2Fpg2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igrishaev","download_url":"https://codeload.github.com/igrishaev/pg2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493378,"owners_count":22080126,"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":["clojure","java","postgresql"],"created_at":"2024-11-09T22:36:39.806Z","updated_at":"2025-05-16T08:05:06.891Z","avatar_url":"https://github.com/igrishaev.png","language":"Clojure","readme":"# PG2: A *Fast* PostgreSQL Driver For Clojure\n\n[pg]: https://github.com/igrishaev/pg\n\nPG2 is a client library for PostgreSQL server. It succeeds [PG(one)][pg] -- my\nearly attempt to make a JDBC-free client. Comparing to it, PG2 has the following\nfeatures:\n\n**It's fast.** Benchmarks prove up to 3 times performance boost compared to\nNext.JDBC. A simple HTTP application which reads data from the database and\nresponds with JSON handles 2 times more RPS. For details, see the \"benchmarks\"\nbelow.\n\n**It's written in Java** with a Clojure layer on top of it. Unfortunately,\nClojure is not as fast as Java. For performance sake, I've got to implement most\nof the logic in pure Java. The Clojure layer is extremely thin and serves only\nto call certain methods.\n\nIt's still **Clojure friendly**: by default, all the queries return a vector of\nmaps, where the keys are keywords. You don't need to remap the result in any\nway. But moreover, the library provides dozens of ways to group, index, a reduce\na result.\n\nIt **supports JSON** out from the box: There is no need to extend any protocols\nand so on. Read and write json(b) with ease as Clojure data! Also, JSON reading\nand writing as *really fast*, again: 2-3 times faster than in Next.JDBC.\n\nIt **supports COPY operations**: you can easily COPY OUT a table into a\nstream. You can COPY IN a set of rows without CSV-encoding them because it's\nheld by the library. It also supports binary COPY format, which is faster.\n\nIt **supports java.time.** classes. The ordinary JDBC clients still use\n`Timestamp` class for dates, which is horrible. In PG2, all the `java.time.*`\nclasses are supported for reading and writing.\n\n...And plenty of other features.\n\n## Documentation\n\n[tests]: https://github.com/igrishaev/pg2/blob/master/pg-core/test/pg/client_test.clj\n\n*A note:* sections with no links mean they're implemented yet not documented. If\nyou're interested in a non-documented feature, either ping me or [check out the\ntests][tests].\n\n- [Installation](/docs/installation.md)\n- [Quick Start (Demo)](/docs/quick-start.md)\n- [Benchmarks](/docs/benchmarks.md)\n- [Authentication](/docs/authentication.md)\n- [Connecting to the Server](/docs/connecting.md)\n- [Data Source Abstraction](/docs/data-source.md)\n- [URI Connection String](/docs/connection-uri.md)\n- [Query and Execute](/docs/query-execute.md)\n- [Prepared Statements](/docs/prepared-statement.md)\n- [Prepared Statement Cache](docs/prepared-statement-cache.md)\n- [Transactions](/docs/transaction.md)\n- [Connection State](/docs/connection-state.md)\n- [Connection Pool](/docs/pool.md)\n- [HoneySQL Integration](/docs/honeysql.md)\n- [HugSQL Support](/docs/hugsql.md)\n- [Next.JDBC API layer](/docs/next-jdbc-layer.md)\n- [Folders (Reducers)](/docs/folders.md)\n- [JSON Support](/docs/json.md)\n- [Arrays Support](/docs/arrays.md)\n- [Migrations](/docs/migrations.md)\n- [Unix Domain Sockets](/docs/unix-socket.md)\n- Common Execute Parameters\n- Type Hints (OIDs)\n- Types \u0026 Extensions\n- [Geometry (line, box, etc)](/docs/geometry.md)\n- [PGVector Support](/docs/pgvector.md)\n- [Custom Type Processors](/docs/processors.md)\n- [Working With Rows](/docs/row-map.md)\n- Working with Enums\n- Cloning a Connection\n- Cancelling a Query\n- Thread Safety\n- COPY FROM/TO\n- [SSL Setup](/docs/ssl.md)\n- [Services Tested With](/docs/services.md)\n- Type Mapping\n- [Listen \u0026 Notify](/docs/listen-notify.md)\n- Notices\n- Logging\n- [Errors and Exceptions](/docs/errors.md)\n- Component Integration\n- Ring middleware\n- Debugging\n- Running Tests\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figrishaev%2Fpg2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figrishaev%2Fpg2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figrishaev%2Fpg2/lists"}