/
erd.cabal
116 lines (110 loc) · 3.36 KB
/
erd.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
-- Initial erd.cabal generated by cabal init. For further documentation,
-- see http://haskell.org/cabal/users-guide/
name: erd
version: 0.2.0.0
homepage: https://github.com/BurntSushi/erd
license: PublicDomain
license-file: UNLICENSE
author: Andrew Gallant
maintainer: jamslam@gmail.com
category: Database, Development
build-type: Simple
cabal-version: >=1.10
synopsis:
An entity-relationship diagram generator from a plain text description.
description:
erd transforms a plain text description of a relational database schema to a
graphical representation of that schema. It is intended that the graph make
use of common conventions when depicting entity-relationship diagrams,
including modeling the cardinality of relationships between entities.
.
A quick example that transforms an `er` file to a PDF:
.
> $ curl 'https://raw.githubusercontent.com/BurntSushi/erd/master/examples/simple.er' > simple.er
> $ cat simple.er
> # Entities are declared in '[' ... ']'. All attributes after the entity header
> # up until the end of the file (or the next entity declaration) correspond
> # to this entity.
> [Person]
> *name
> height
> weight
> +birth_location_id
>
> [Location]
> *id
> city
> state
> country
>
> # Each relationship must be between exactly two entities, which need not
> # be distinct. Each entity in the relationship has exactly one of four
> # possible cardinalities:
> #
> # Cardinality Syntax
> # 0 or 1 0
> # exactly 1 1
> # 0 or more *
> # 1 or more +
> Person *--1 Location
> $ erd -i simple.er -o simple.pdf
.
The PDF should now contain a graph that looks like this:
.
<<http://burntsushi.net/stuff/erd-example-simple.png>>
.
See the <https://github.com/BurntSushi/erd#readme README.md> file for more
examples and instructions on how to write ER files.
extra-source-files:
changelog.md
source-repository head
type: git
location: git://github.com/BurntSushi/erd.git
executable erd
default-language: Haskell2010
hs-source-dirs: app, src
other-modules:
Erd.Config
Erd.ER
Erd.Parse
Erd.Render
Text.Parsec.Erd.Parser
main-is: Main.hs
ghc-options: -Wall -W
build-depends: base >= 4.5 && <5
, directory >= 1.3.3.0
, filepath >= 1.4.2.1
, graphviz == 2999.*
, text == 1.*
, parsec == 3.1.*
, containers == 0.6.*
, bytestring == 0.10.*
, yaml >= 0.11.0.0
, raw-strings-qq >= 1.1
test-suite spec
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: Spec.hs
ghc-options: -Wall -W
hs-source-dirs:
test, src
other-modules:
Erd.Config
Erd.ER
Erd.Parse
Erd.Render
Text.Parsec.Erd.Parser
Test.Erd.Render
Test.Text.Parsec.Erd.Parser
build-depends: base >=4.5 && <5
, directory >= 1.3.3.0
, filepath >= 1.4.2.1
, graphviz == 2999.*
, text == 1.*
, parsec == 3.1.*
, containers == 0.6.*
, bytestring == 0.10.*
, tasty >= 0.11
, tasty-hunit >= 0.9
, yaml >= 0.11.0.0
, raw-strings-qq >= 1.1