{"id":15010692,"url":"https://github.com/viesti/table-spec","last_synced_at":"2025-04-09T18:35:00.005Z","repository":{"id":63131105,"uuid":"82222521","full_name":"viesti/table-spec","owner":"viesti","description":"Specs from SQL database schema for data generation and validation","archived":false,"fork":false,"pushed_at":"2019-08-21T06:30:17.000Z","size":25,"stargazers_count":35,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-01T18:13:03.782Z","etag":null,"topics":["clojure","spec","sql-database-schema"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/viesti.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":"2017-02-16T20:21:21.000Z","updated_at":"2024-05-31T07:56:50.000Z","dependencies_parsed_at":"2022-11-13T15:00:34.366Z","dependency_job_id":null,"html_url":"https://github.com/viesti/table-spec","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viesti%2Ftable-spec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viesti%2Ftable-spec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viesti%2Ftable-spec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viesti%2Ftable-spec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viesti","download_url":"https://codeload.github.com/viesti/table-spec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248088347,"owners_count":21045695,"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","spec","sql-database-schema"],"created_at":"2024-09-24T19:35:23.698Z","updated_at":"2025-04-09T18:34:59.977Z","avatar_url":"https://github.com/viesti.png","language":"Clojure","readme":"# table-spec\n\n[![CircleCI](https://circleci.com/gh/viesti/table-spec/tree/master.svg?style=svg)](https://circleci.com/gh/viesti/table-spec/tree/master) [![Clojars Project](https://img.shields.io/clojars/v/viesti/table-spec.svg)](https://clojars.org/viesti/table-spec)\n\nSpecs ([clojure.spec](https://clojure.org/about/spec)) from SQL database schema for data generation and validation.\n\n## Usage\n\n```\n\u003e psql\npostgres#= create table lol (id int not null, name varchar(250));\nCREATE TABLE\n```\n\n```clojure\n...\n:dependencies [[org.clojure/clojure \"1.9.0-alpha14\"]\n               [viesti/table-spec \"0.1.0\"]\n               [org.postgresql/postgresql \"9.4.1212\"]]\n; For generating test data\n:profiles {:dev {:dependencies [[org.clojure/test.check \"0.9.0\" :scope \"test\"]]}}\n...\n\n\nuser\u003e (require '[table-spec.core :as t])\nnil\nuser\u003e (require '[clojure.spec :as s])\nnil\nuser\u003e (-\u003e {:connection-uri \"jdbc:postgresql:lol\" :schema \"public\"}\n          (t/tables)\n          (t/register))\nnil\nuser\u003e (s/exercise :table/lol)\n([#:lol{:id -1, :name \"\"} #:lol{:id -1, :name \"\"}] [#:lol{:id 0, :name \"C\"} #:lol{:id 0, :name \"C\"}]...\nuser\u003e (s/exercise :lol/id)\n([-1 -1] [-1 -1] [1 1] [0 0] [-1 -1] [0 0] [-2 -2] [-1 -1] [-1 -1] [-8 -8])\n```\n\n# Changelog\n\n### 0.1.1\n\n* Bump to Clojure 1.9.0\n* Support smallint, bigint, date, timestamp_with_timezone\n\n### 0.1.0\n\n* Initial release\n\n## License\n\nCopyright © 2019 Kimmo Koskinen\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviesti%2Ftable-spec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviesti%2Ftable-spec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviesti%2Ftable-spec/lists"}