All Projects → viesti → table-spec

viesti / table-spec

Licence: EPL-1.0 License
Specs from SQL database schema for data generation and validation

Programming Languages

clojure
4091 projects

Projects that are alternatives of or similar to table-spec

api-spec
API Specififications
Stars: ✭ 30 (-6.25%)
Mutual labels:  spec
dataset
qri dataset definition
Stars: ✭ 16 (-50%)
Mutual labels:  spec
form-validator-cljs
ClojureScript library to validate forms
Stars: ✭ 52 (+62.5%)
Mutual labels:  spec
dropbox-api-spec
The Official API Spec for Dropbox API V2 SDKs.
Stars: ✭ 36 (+12.5%)
Mutual labels:  spec
spec-kemal
Easy testing for Kemal
Stars: ✭ 51 (+59.38%)
Mutual labels:  spec
falcon-apispec
apispec plugin that generates OpenAPI specification (aka Swagger Docs) for Falcon web applications.
Stars: ✭ 44 (+37.5%)
Mutual labels:  spec
Jasmine Spec Reporter
Real time console spec reporter for jasmine testing framework
Stars: ✭ 241 (+653.13%)
Mutual labels:  spec
automock
A library for testing classes with auto mocking capabilities using jest-mock-extended
Stars: ✭ 26 (-18.75%)
Mutual labels:  spec
framework
Lightweight, open source and magic-free framework for testing solidity smart contracts.
Stars: ✭ 36 (+12.5%)
Mutual labels:  spec
es-to-primitive
ECMAScript "ToPrimitive" algorithm. Provides ES5 and ES6/ES2015 versions.
Stars: ✭ 21 (-34.37%)
Mutual labels:  spec
speck
A concise and composable syntax for your function specs
Stars: ✭ 53 (+65.63%)
Mutual labels:  spec
oci-spec-rs
OCI Runtime, Image and Distribution Spec in Rust
Stars: ✭ 117 (+265.63%)
Mutual labels:  spec
wdio-spec-reporter
A WebdriverIO v4 plugin. Reporter that creates 'spec'-style reports
Stars: ✭ 20 (-37.5%)
Mutual labels:  spec
spec-pattern
Specification design pattern for JavaScript and TypeScript with bonus classes
Stars: ✭ 43 (+34.38%)
Mutual labels:  spec
microsub
For tracking issues on the Microsub specification
Stars: ✭ 23 (-28.12%)
Mutual labels:  spec
Specs
The Filecoin protocol specification
Stars: ✭ 249 (+678.13%)
Mutual labels:  spec
es-abstract
ECMAScript spec abstract operations.
Stars: ✭ 86 (+168.75%)
Mutual labels:  spec
ntast
Notion Abstract Syntax Tree specification.
Stars: ✭ 101 (+215.63%)
Mutual labels:  spec
eggplant
A behaviour driven development (BDD) library for Clojure. Simplicity is key.
Stars: ✭ 16 (-50%)
Mutual labels:  spec
meta-schema
Little DSL to make data processing sane with clojure.spec and spec-tools
Stars: ✭ 25 (-21.87%)
Mutual labels:  spec

table-spec

CircleCI Clojars Project

Specs (clojure.spec) from SQL database schema for data generation and validation.

Usage

> psql
postgres#= create table lol (id int not null, name varchar(250));
CREATE TABLE
...
:dependencies [[org.clojure/clojure "1.9.0-alpha14"]
               [viesti/table-spec "0.1.0"]
               [org.postgresql/postgresql "9.4.1212"]]
; For generating test data
:profiles {:dev {:dependencies [[org.clojure/test.check "0.9.0" :scope "test"]]}}
...


user> (require '[table-spec.core :as t])
nil
user> (require '[clojure.spec :as s])
nil
user> (-> {:connection-uri "jdbc:postgresql:lol" :schema "public"}
          (t/tables)
          (t/register))
nil
user> (s/exercise :table/lol)
([#:lol{:id -1, :name ""} #:lol{:id -1, :name ""}] [#:lol{:id 0, :name "C"} #:lol{:id 0, :name "C"}]...
user> (s/exercise :lol/id)
([-1 -1] [-1 -1] [1 1] [0 0] [-1 -1] [0 0] [-2 -2] [-1 -1] [-1 -1] [-8 -8])

Changelog

0.1.1

  • Bump to Clojure 1.9.0
  • Support smallint, bigint, date, timestamp_with_timezone

0.1.0

  • Initial release

License

Copyright © 2019 Kimmo Koskinen

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].