internal

package
v0.0.0-...-a3b5a27 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const PRIMARY = "PRI"

PRIMARY is the mysql-default schema value hint. SQLite maps `pk=1` into this.

Variables

View Source
var ColumnFields = []string{"COLUMN_NAME", "COLUMN_TYPE", "COLUMN_KEY", "COLUMN_COMMENT", "DATA_TYPE"}

ColumnFields lists database columns from Column{}

View Source
var TableFields = []string{"TABLE_NAME", "TABLE_COMMENT"}

TableFields lists database columns from Table{}

Functions

func Camel

func Camel(input string) string

func Contains

func Contains(set []string, value string) bool

Types

type Column

type Column struct {
	Name    string `db:"COLUMN_NAME"`
	Type    string `db:"COLUMN_TYPE"`
	Key     string `db:"COLUMN_KEY"`
	Comment string `db:"COLUMN_COMMENT"`

	// Holds the clean data type
	DataType string `db:"DATA_TYPE"`
}

Column is an information_schema record

type Table

type Table struct {
	Name    string `db:"TABLE_NAME"`
	Comment string `db:"TABLE_COMMENT"`

	Columns []*Column
}

Table is an information_schema record

func ListTables

func ListTables(ctx context.Context, config db.Options, schema string) ([]*Table, error)

func (*Table) Ignore

func (t *Table) Ignore() bool

Jump to

Keyboard shortcuts

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