{"id":15010430,"url":"https://github.com/fern-flower-lab/sqlg-clj","last_synced_at":"2026-02-28T19:32:18.544Z","repository":{"id":37254597,"uuid":"494816961","full_name":"fern-flower-lab/sqlg-clj","owner":"fern-flower-lab","description":"The SQL Graph with Tinkerpop3 and Clojure","archived":false,"fork":false,"pushed_at":"2025-04-11T19:55:46.000Z","size":41,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-18T23:25:33.209Z","etag":null,"topics":["clj","clojure","clojure-library","database","dataprocessing","graph","gremlin","h2","hsql","maria","mssql","mysql","postgresql","rdbms-to-graph","sql","tinkerpop","tinkerpop-graphs","tinkerpop3"],"latest_commit_sha":null,"homepage":"","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/fern-flower-lab.png","metadata":{"files":{"readme":"README.adoc","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"fern-flower-lab"}},"created_at":"2022-05-21T15:09:54.000Z","updated_at":"2025-04-11T19:25:16.000Z","dependencies_parsed_at":"2024-09-24T19:34:26.700Z","dependency_job_id":"21688d0f-9740-4461-8aa2-3cac03ac63fc","html_url":"https://github.com/fern-flower-lab/sqlg-clj","commit_stats":{"total_commits":29,"total_committers":2,"mean_commits":14.5,"dds":0.1724137931034483,"last_synced_commit":"f98ecd057ff4f032f612f54903315ca103d068a7"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/fern-flower-lab/sqlg-clj","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fern-flower-lab%2Fsqlg-clj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fern-flower-lab%2Fsqlg-clj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fern-flower-lab%2Fsqlg-clj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fern-flower-lab%2Fsqlg-clj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fern-flower-lab","download_url":"https://codeload.github.com/fern-flower-lab/sqlg-clj/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fern-flower-lab%2Fsqlg-clj/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29948872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T18:42:55.706Z","status":"ssl_error","status_checked_at":"2026-02-28T18:42:48.811Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["clj","clojure","clojure-library","database","dataprocessing","graph","gremlin","h2","hsql","maria","mssql","mysql","postgresql","rdbms-to-graph","sql","tinkerpop","tinkerpop-graphs","tinkerpop3"],"created_at":"2024-09-24T19:34:09.887Z","updated_at":"2026-02-28T19:32:18.524Z","avatar_url":"https://github.com/fern-flower-lab.png","language":"Clojure","funding_links":["https://github.com/sponsors/fern-flower-lab"],"categories":[],"sub_categories":[],"readme":"= The SQL Graph in Clojure\n\nUtilizes Tinkerpop3 graph over SQL database using `sqlg`.\n\nimage:https://img.shields.io/github/license/fern-flower-lab/sqlg-clj?style=for-the-badge[GitHub]\nimage:https://img.shields.io/clojars/v/ai.z7/sqlg-clj.svg?style=for-the-badge[]\nimage:https://img.shields.io/github/v/tag/fern-flower-lab/sqlg-clj?style=for-the-badge[GitHub tag (latest by date)]\nimage:https://img.shields.io/github/last-commit/fern-flower-lab/sqlg-clj?style=for-the-badge[GitHub last commit]\nimage:https://img.shields.io/github/v/release/fern-flower-lab/sqlg-clj?style=for-the-badge[GitHub release (latest by date)]\n\nWARNING: Origin's library uses J17 for releases (at least for 3.0.x versions), so independently on this Clojure library build you will be forced to use that version too.\n\n== Supported DBs\n\n. PostgreSQL\n. MySQL\n. MariaDB\n. HSQLDB\n. H2\n. MSSQL\n\nCAUTION: The low-level driver is well tested only with PostgreSQL + C3P0. You are warned.\n\n== Config\n\nBasic config is represented by `sample.properties`\n\n[source,properties]\n----\nsample.graph.db.type = postgresql\nsample.graph.db.host = localhost\nsample.graph.db.port = 5432\nsample.graph.db.name = sample\nsample.graph.db.user = username\nsample.graph.db.pass = password\n----\n\nIn order to get it prepared use\n\n[source,clojure]\n----\nuser=\u003e (require '[sqlg-clj.config :as c])\nuser=\u003e (def config (-\u003e \"sample\" c/load-config :sample :graph :db c/db-config))\n----\n\nSame result may be done using EDN config, i.e. directly from your app:\n\n[source,clojure]\n----\nuser=\u003e (def config (c/db-config {:port 5432 :pass \"password\" :user \"username\" :type \"postgresql\" :host \"localhost\" :name \"sample\"}))\n----\n\nWhen the config is ready it may be easily read back\n\n[source,clojure]\n----\nuser=\u003e(c/config-\u003eclj config)\n{\"jdbc.url\" \"jdbc:postgresql://localhost:5432/sample\", \"jdbc.username\" \"username\", \"jdbc.password\" \"password\"}\n----\n\n=== Starting\n\nOpen SqlgGraph directly\n\n[source,clojure]\n----\n(def G (c/graph config))\n----\n\nor indirectly\n\n[source,clojure]\n----\n(def G (c/open-graph config))\n----\n\nThe last method opens a new TinkerGraph with default configuration or open a new Graph instance with the specified configuration.\nThe configuration may be a path to a file or a Map of configuration options.\nWhen gets prepared BaseConfiguration or Configuration object as an argument - returns SqlgGraph.\n\n=== Using\n\n[source,clojure]\n----\nuser=\u003e (require '[sqlg-clj.core :refer :all])\nuser=\u003e (-\u003e ^Graph G traversal V (has-label \"label\"))\n#object[org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal 0x3fffba3f \"[GraphStep(vertex,[]), HasStep([~label.eq(label)])]\"]\n----\n\n=== Transactions\n\nIn order to store or to unroll the changes were made by some iteration between calls, use\n\n[source,clojure]\n----\nuser=\u003e (require '[sqlg-clj.util :as u])\nuser=\u003e (u/commit! G)\n;; or\nuser=\u003e (u/rollback! G)\n----\n\nrespectively.\n\n=== Examples\n\n==== create, find, process\n\n[source,clojure]\n----\nuser=\u003e (require '[sqlg-clj.util :as u])\nuser=\u003e (require '[sqlg-clj.data :as d])\nuser=\u003e (require '[sqlg-clj.core :refer :all])\n\nuser=\u003e (-\u003e G (d/add-V :test {:aa 11 :bb 22}))\n#object[org.umlg.sqlg.structure.SqlgVertex 0x2e5e87e9 \"v[public.test:::14]\"]\nuser=\u003e (-\u003e G (d/add-V :test {:aa 33 :cc 44}))\n#object[org.umlg.sqlg.structure.SqlgVertex 0x6ec0ead1 \"v[public.test:::15]\"]\nuser=\u003e (u/commit! G)\nnil\n\nuser=\u003e (def vxs (-\u003e G traversal V (has-label :test) (has :aa) u/into-vec!))\n#'user/vxs\n\nuser=\u003e (map #(value % :aa) vxs)\n(11 33)\nuser=\u003e (map #(value % :bb) vxs)\n(22 nil)\nuser=\u003e (map #(value % :cc) vxs)\n(nil 44)\n----\n\n=== More info\n\nPlease, read original documentation https://tinkerpop.apache.org/docs/current/reference[here] and http://sqlg.org[here]\n\n== License\n\n\u0026copy;2022-2023 Fern Flower Lab\n\nDistributed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffern-flower-lab%2Fsqlg-clj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffern-flower-lab%2Fsqlg-clj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffern-flower-lab%2Fsqlg-clj/lists"}