model

package
v0.0.0-...-585920d Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbSchema

type DbSchema interface {
	// Tables get all the tables
	Tables() ([]Table, error)
	// TableColumns gets the all columns by table name
	TableColumns(table string) ([]TableColumn, error)
}

DbSchema ...

type Table

type Table interface {
	// GetScheme gets the table scheme
	GetScheme() string
	// GetName gets the table name
	GetName() string
	// GetComment gets the table comment
	GetComment() string
}

Table abstract a table information

type TableColumn

type TableColumn interface {
	// GetName get the column's name
	GetName() string
	// IsNullable tells if the column is nullable or not
	IsNullable() bool
	// GetComment get the column's comment
	GetComment() string
	// GetDefault get the columns's default value
	GetDefault() string
	// GetDataType get the columns's data type
	GetDataType() string
	// GetMaxSize get the max size of the column
	GetMaxSize() sql.NullInt64
}

TableColumn describes a column in a table

Jump to

Keyboard shortcuts

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