{"id":26706607,"url":"https://github.com/pbalduino/clj-qldb","last_synced_at":"2025-04-13T15:22:21.394Z","repository":{"id":62434100,"uuid":"209329177","full_name":"pbalduino/clj-qldb","owner":"pbalduino","description":"A lightweight library to use AWS QLDB in Clojure","archived":false,"fork":false,"pushed_at":"2019-10-08T14:11:32.000Z","size":19,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T06:18:30.880Z","etag":null,"topics":["aws","aws-qldb","clojure","dandelion","ion","qldb"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pbalduino.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-18T14:28:16.000Z","updated_at":"2023-08-20T16:45:06.000Z","dependencies_parsed_at":"2022-11-01T20:45:52.581Z","dependency_job_id":null,"html_url":"https://github.com/pbalduino/clj-qldb","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbalduino%2Fclj-qldb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbalduino%2Fclj-qldb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbalduino%2Fclj-qldb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbalduino%2Fclj-qldb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pbalduino","download_url":"https://codeload.github.com/pbalduino/clj-qldb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248733224,"owners_count":21152980,"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":["aws","aws-qldb","clojure","dandelion","ion","qldb"],"created_at":"2025-03-27T06:18:37.363Z","updated_at":"2025-04-13T15:22:21.372Z","avatar_url":"https://github.com/pbalduino.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clj-qldb\n\n[![Clojars Project](https://img.shields.io/clojars/v/pbalduino/clj-qldb.svg)](https://clojars.org/pbalduino/clj-qldb)\n\n[![cljdoc badge](https://cljdoc.org/badge/pbalduino/clj-qldb)](https://cljdoc.org/d/pbalduino/clj-qldb/CURRENT)\n\n## What?\n`clj-qldb` is a small and lightweight library that allows you to use AWS [QLDB](https://aws.amazon.com/qldb/) without having to care about Java code, proprietary formats and all those distracting and boring things.\n\nYou send Clojure data and receive Clojure data, without wasting time.\n\n## Why?\n\nFrom [QLDB description](https://aws.amazon.com/qldb/):\n\n\u003e Amazon QLDB is a fully managed ledger database that provides a transparent, immutable, and cryptographically verifiable transaction log ‎owned by a central trusted authority. Amazon QLDB tracks each and every application data change and maintains a complete and verifiable history of changes over time.\n\n## How?\n\n### Lein/Boot\n```\n[pbalduino/clj-qldb \"0.1.3\"]\n```\n\n### deps.edn\n```\npbalduino/clj-qldb {:mvn/version \"0.1.3\"}\n```\n\n### Sample\n\n```clojure\n;; The ledger name is a String. Here we're getting it from the environment.\n;; For QLDB the ledger is like a database in the SQL world.\n(def ledger-name (System/getenv \"QLDB_LEDGER_NAME\"))\n\n;; Session is the gateway between this library and the service. You'll use it all the time.\n(def session (create-session ledger-name))\n\n;; Another string containing the table name. It's analog to a SQL table.\n(def table-name \"SAMPLE_TABLE\")\n\n(create-table session table-name)\n\n;; Insert two rows:\n(insert session table-name {:id \"IUGBLMEAMHYGPNARTUOISSAZLYCTYDOL\"\n                            :name \"Jeremias\"\n                            :age 42})\n\n(insert session table-name {:id \"TUPTVXWNBVJNOQLYFHOFWJWWEGKTTXTW\"\n                            :name \"Humberto\"\n                            :age 20})\n\n;; Query data:\n(select session table-name :fields [\"id\" \"name\"])\n; ({\"id\" \"IUGBLMEAMHYGPNARTUOISSAZLYCTYDOL\", \"name\" \"Humberto\"}\n;  {\"id\" \"TUPTVXWNBVJNOQLYFHOFWJWWEGKTTXTW\", \"name\" \"Jeremias\"})\n\n(select session table-name)\n;({\"id\" \"IUGBLMEAMHYGPNARTUOISSAZLYCTYDOL\",\n;  \"name\" \"Humberto\",\n;  \"age\" 20}\n; {\"id\" \"TUPTVXWNBVJNOQLYFHOFWJWWEGKTTXTW\",\n;  \"name\" \"Jeremias\",\n;  \"age\" 42})\n\n(select session table-name :filter \"age \u003e 21\")\n; ({\"id\" \"TUPTVXWNBVJNOQLYFHOFWJWWEGKTTXTW\",\n;   \"name\" \"Jeremias\",\n;   \"age\" 42})\n\n(select session table-name :filter \"age \u003c 21\")\n; ({\"id\" \"IUGBLMEAMHYGPNARTUOISSAZLYCTYDOL\",\n;   \"name\" \"Humberto\",\n;   \"age\" 20})\n\n(select session table-name :fields [\"count(*) as c\"] :filter \"age \u003c 21\")\n; ({\"c\" 1})\n\n(select session table-name :fields [\"count(*) as c\"])\n; ({\"c\" 2})\n\n;; Of course you don't need to create and drop tables all the time in the real world\n(drop-table session table-name)\n```\n\n## Who?\n[Plínio Balduino](https://github.com/pbalduino), software developer and problem solver.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbalduino%2Fclj-qldb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpbalduino%2Fclj-qldb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbalduino%2Fclj-qldb/lists"}