database

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MySQL      = "mysql"
	PostgreSQL = "postgres"
	SQLServer  = "sqlserver"
	SQlite     = "sqlite3"
	Oracle     = "oracle"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	TableName string
	Name      string
	Comment   string
	Default   string
	IsNull    string
	Type      string
}

type Query

type Query interface {
	Open() error
	Close() error
	Query() ([]*Table, error)
}

Query 数据库查询器

func NewQuery

func NewQuery(driver, host, user, pwd, db, schema string) (query Query, err error)

type Table

type Table struct {
	Name    string
	Comment string

	Columns []*Column
}

Table 数据表结构

func (*Table) Markdown

func (t *Table) Markdown() string

Markdown 生成 markdown 内容

Jump to

Keyboard shortcuts

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