tablemaker

package module
v0.0.0-...-cf47190 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 7 Imported by: 0

README

tablemaker

Saves PostgreSQL table and view definitions as sql files that can be used in tests.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteTables

func WriteTables(tables []*Table, pathPrefix string) error

Types

type Column

type Column struct {
	Name string
	Type string
}

type FileWriter

type FileWriter interface {
	Write(path string, table *Table) error
}

type SqlPrinter

type SqlPrinter struct {
	Indent string
}

func (*SqlPrinter) Print

func (p *SqlPrinter) Print(w io.Writer, tables []*Table) error

type Table

type Table struct {
	Name    string
	Columns []*Column
}

type TablePrinter

type TablePrinter interface {
	Print(w io.Writer, tables []*Table) error
}

type TableService

type TableService interface {
	List(ctx context.Context, names []string) ([]*Table, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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