schema

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Prefix []string
	Name   string
	Type   reflect.Type
}

func NewColumn

func NewColumn(prefix []string, name string, typ reflect.Type) Column

type DB

type DB interface {
	Tabler
}

type Foreign

type Foreign struct {
	Name          string
	Child         Table
	ChildColumns  []Column // all child columns
	Parent        Table
	ParentColumns []Column // all parent columns
	Referencing   []Column // columns in child used as reference
	Referenced    []Column // columns in parent used as reference
}

func NewForeign

func NewForeign(name string, child, parent Table, referencing []Column, referenced []Column) Foreign

type Foreigner added in v0.0.2

type Foreigner interface {
	Foreign(table string) ([]Foreign, error)
}

type Parameter added in v0.0.4

type Parameter struct {
	Name string
	Type reflect.Type
	In   bool
	Out  bool
}

type Primarier added in v0.0.4

type Primarier interface {
	Primary(table string) ([]Column, error)
}

type Procedure added in v0.0.4

type Procedure struct {
	Name       string
	Prefix     []string
	Parameters []Parameter
}

type Procedurer added in v0.0.4

type Procedurer interface {
	Procedures() ([]Procedure, error)
}

type Table

type Table struct {
	Prefix []string
	Name   string
}

func NewTable

func NewTable(prefix []string, name string) Table

type Tabler added in v0.0.4

type Tabler interface {
	Tables() ([]Table, error)
	Columns(table string) ([]Column, error)
}

type Viewer added in v0.0.4

type Viewer interface {
	Views() ([]Table, error)
}

Jump to

Keyboard shortcuts

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