computed

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ReadViewNoResultError = &readViewNoResultError{}
)

Functions

func ColumnIndicesSchema

func ColumnIndicesSchema() *schema.Schema

ColumnIndicesSchema provides a fully computed Schema for Column Indices of a Table

func ColumnsSchema

func ColumnsSchema() *schema.Schema

ColumnsSchema provides a fully computed Schema for Columns of a Table

func ForeignKeysSchema

func ForeignKeysSchema() *schema.Schema

ForeignKeysSchema provides a fully computed Schema for Foreign Keys of a Table

func PrimaryKeysSchema

func PrimaryKeysSchema() *schema.Schema

PrimaryKeysSchema provides a fully computed Schema for Primary Keys of a Table

func ReadConnection

func ReadConnection(ctx context.Context, d internal.Data, tx *sql.Tx) error

ReadConnection reads all attributes from Database. Will return EmptyConnectionName for empty name

Types

type TableReader

type TableReader struct {
	Columns       []interface{}
	ColumnIndices map[string]interface{}
	Comment       string
	Composite     string
	PrimaryKeys   map[string]interface{}
	ForeignKeys   map[string]interface{}
	// contains filtered or unexported fields
}

func ReadTable

func ReadTable(ctx context.Context, tx *sql.Tx, schema, table string) (*TableReader, error)

ReadTable reads necessary information of a Table

func (*TableReader) SetComment added in v0.0.18

func (tr *TableReader) SetComment(d internal.Data) error

type View added in v0.0.19

type View struct {
	Comment  string
	Columns  []ViewColumn
	Subquery string
}

func ReadView added in v0.0.19

func ReadView(ctx context.Context, tx *sql.Tx, schema, name string) (*View, error)

func (*View) SetColumns added in v0.0.22

func (v *View) SetColumns(d internal.Data) error

func (*View) SetComment added in v0.0.19

func (v *View) SetComment(d internal.Data) error

type ViewColumn added in v0.0.22

type ViewColumn struct {
	Name    string
	Comment string
}

Jump to

Keyboard shortcuts

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