model

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2018 License: Apache-2.0 Imports: 1 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDBNotFound 数据库不存在
	ErrDBNotFound = errors.New("db not found")
)

Functions

This section is empty.

Types

type Column

type Column struct {
	DB        string
	Table     string
	Name      string
	Default   string
	Nullable  string
	DataType  string
	Key       string
	CharSet   string
	Collation string
	Comment   string
	Extra     map[string]string
}

Column 列元信息

type DB

type DB struct {
	Name      string
	CharSet   string
	Collation string
	Tables    []Table
	Extra     map[string]string
}

DB 数据库实例元信息

type IRepo

type IRepo interface {
	// GetDBs 查询数据库元信息
	GetDBs(cond *DB, lazy bool) ([]DB, error)
	// GetTables 查询表元信息
	GetTables(cond *Table) ([]Table, error)
	// GetColumns 查询列元信息
	GetColumns(cond *Column) ([]Column, error)
}

IRepo 数据库元信息查询接口

type Table

type Table struct {
	DB        string
	Name      string
	Collation string
	Comment   string
	Columns   []Column
	Extra     map[string]string
}

Table 表元信息

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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