sql2erd

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 17 Imported by: 0

README

sql2erd

Generates ERD from SQL in SVG format. PostgreSQL only supported for now.

How to use

$ sql2erd --help
Usage:
  sql2erd [flags]

Flags:
  -h, --help           help for sql2erd
  -i, --in string      path to input sql file, or "-" for stdin (default "-")
  -o, --out string     path to output svg file, or "-" for stdout (default "-")
  -t, --theme string   theme: "light" or "dark" (default "light")

Example

Here is ERD of example.sql

Example ERD

License

sql2erd is licensed under MIT.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Renderer

type Renderer struct {
	Theme Theme
	In    io.Reader
	Out   io.Writer
}

func (Renderer) Render

func (r Renderer) Render(ctx context.Context) error

type Theme

type Theme int
const (
	LightTheme Theme = 0
	DarkTheme  Theme = 200
)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL