Documentation ¶
Index ¶
- func DatabaseBoot(d *conf.DB) *sql.DB
- type AbstractDialect
- func (d *AbstractDialect) AddColumn(table, statement, after string) (err error)
- func (d *AbstractDialect) CreateDatabase(database string, statements []string) (err error)
- func (d *AbstractDialect) CreateTable(table string, statements []string) (err error)
- func (d *AbstractDialect) DropColumn(table, column string) error
- func (d *AbstractDialect) Exec(query string, args ...interface{}) (sql.Result, error)
- func (d *AbstractDialect) GetColumns(table string) (*sql.Rows, error)
- func (d *AbstractDialect) GetDatabaseName() string
- func (d *AbstractDialect) HasColumn(table, column string) bool
- func (d *AbstractDialect) HasDatabase(database string) bool
- func (d *AbstractDialect) HasTable(table string) bool
- func (d *AbstractDialect) ModifyColumn(table, statement, after string) error
- func (d *AbstractDialect) ModifyTable(table string, column string) (err error)
- func (d *AbstractDialect) PrimaryKey(table string, columns []string) (err error)
- type Dialect
- type Mysql
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AbstractDialect ¶
func (*AbstractDialect) AddColumn ¶
func (d *AbstractDialect) AddColumn(table, statement, after string) (err error)
func (*AbstractDialect) CreateDatabase ¶
func (d *AbstractDialect) CreateDatabase(database string, statements []string) (err error)
func (*AbstractDialect) CreateTable ¶
func (d *AbstractDialect) CreateTable(table string, statements []string) (err error)
func (*AbstractDialect) DropColumn ¶
func (d *AbstractDialect) DropColumn(table, column string) error
func (*AbstractDialect) Exec ¶
func (d *AbstractDialect) Exec(query string, args ...interface{}) (sql.Result, error)
func (*AbstractDialect) GetColumns ¶
func (d *AbstractDialect) GetColumns(table string) (*sql.Rows, error)
func (*AbstractDialect) GetDatabaseName ¶
func (d *AbstractDialect) GetDatabaseName() string
func (*AbstractDialect) HasColumn ¶
func (d *AbstractDialect) HasColumn(table, column string) bool
func (*AbstractDialect) HasDatabase ¶
func (d *AbstractDialect) HasDatabase(database string) bool
func (*AbstractDialect) HasTable ¶
func (d *AbstractDialect) HasTable(table string) bool
func (*AbstractDialect) ModifyColumn ¶
func (d *AbstractDialect) ModifyColumn(table, statement, after string) error
func (*AbstractDialect) ModifyTable ¶
func (d *AbstractDialect) ModifyTable(table string, column string) (err error)
func (*AbstractDialect) PrimaryKey ¶
func (d *AbstractDialect) PrimaryKey(table string, columns []string) (err error)
type Dialect ¶
type Dialect interface { GetDatabaseName() string HasDatabase(database string) bool CreateDatabase(database string, statements []string) error HasTable(table string) bool CreateTable(table string, columns []string) error ModifyTable(table, column string) error GetColumns(table string) (*sql.Rows, error) HasColumn(table, column string) bool DropColumn(table, statement string) error ModifyColumn(table, statement, after string) error AddColumn(table, statement, after string) error PrimaryKey(table string, columns []string) error Exec(query string, args ...interface{}) (sql.Result, error) // contains filtered or unexported methods }
type Mysql ¶
type Mysql struct {
AbstractDialect
}
Click to show internal directories.
Click to hide internal directories.