Documentation ¶
Index ¶
- type ColumnSchema
- type Dialect
- type Field
- type Index
- type MySQL
- func (d *MySQL) AddColumnSQL(field Field) []string
- func (d *MySQL) Begin() (Transactioner, error)
- func (d *MySQL) ColumnSchema(tables ...string) ([]ColumnSchema, error)
- func (d *MySQL) ColumnType(name string) string
- func (d *MySQL) CreateIndexSQL(index Index) []string
- func (d *MySQL) CreateTableSQL(table Table) []string
- func (d *MySQL) DropColumnSQL(field Field) []string
- func (d *MySQL) DropIndexSQL(index Index) []string
- func (d *MySQL) ImportPackage(schema ColumnSchema) string
- func (d *MySQL) ModifyColumnSQL(oldField, newField Field) []string
- func (d *MySQL) ModifyPrimaryKeySQL(oldPrimaryKeys, newPrimaryKeys []Field) []string
- func (d *MySQL) Quote(s string) string
- func (d *MySQL) QuoteString(s string) string
- type PrimaryKeyModifier
- type Spanner
- func (d *Spanner) AddColumnSQL(field Field) []string
- func (d *Spanner) Begin() (Transactioner, error)
- func (s *Spanner) ColumnSchema(tables ...string) ([]ColumnSchema, error)
- func (s *Spanner) ColumnType(name string) string
- func (d *Spanner) CreateIndexSQL(index Index) []string
- func (d *Spanner) CreateTableSQL(table Table) []string
- func (d *Spanner) DropColumnSQL(field Field) []string
- func (d *Spanner) DropIndexSQL(index Index) []string
- func (s *Spanner) ImportPackage(schema ColumnSchema) string
- func (d *Spanner) ModifyColumnSQL(oldField, newField Field) []string
- func (d *Spanner) Quote(s string) string
- func (d *Spanner) QuoteString(s string) string
- type Table
- type Transactioner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnSchema ¶ added in v0.4.0
type ColumnSchema interface { TableName() string ColumnName() string ColumnType() string DataType() string GoType() string IsPrimaryKey() bool IsAutoIncrement() bool Index() (name string, unique bool, ok bool) Default() (string, bool) IsNullable() bool Extra() (string, bool) Comment() (string, bool) }
type Dialect ¶
type Dialect interface { ColumnSchema(tables ...string) ([]ColumnSchema, error) ColumnType(name string) string ImportPackage(schema ColumnSchema) string Quote(s string) string QuoteString(s string) string CreateTableSQL(table Table) []string AddColumnSQL(field Field) []string DropColumnSQL(field Field) []string ModifyColumnSQL(oldField, newfield Field) []string CreateIndexSQL(index Index) []string DropIndexSQL(index Index) []string Begin() (Transactioner, error) }
func NewSpanner ¶ added in v0.4.0
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
func (*MySQL) AddColumnSQL ¶ added in v0.4.0
func (*MySQL) Begin ¶ added in v0.4.0
func (d *MySQL) Begin() (Transactioner, error)
func (*MySQL) ColumnSchema ¶ added in v0.4.0
func (d *MySQL) ColumnSchema(tables ...string) ([]ColumnSchema, error)
func (*MySQL) ColumnType ¶
func (*MySQL) CreateIndexSQL ¶ added in v0.4.0
func (*MySQL) CreateTableSQL ¶ added in v0.4.0
func (*MySQL) DropColumnSQL ¶ added in v0.4.0
func (*MySQL) DropIndexSQL ¶ added in v0.4.0
func (*MySQL) ImportPackage ¶ added in v0.4.0
func (d *MySQL) ImportPackage(schema ColumnSchema) string
func (*MySQL) ModifyColumnSQL ¶ added in v0.4.0
func (*MySQL) ModifyPrimaryKeySQL ¶ added in v0.4.0
func (*MySQL) QuoteString ¶ added in v0.2.0
type PrimaryKeyModifier ¶ added in v0.4.0
type Spanner ¶ added in v0.4.0
type Spanner struct {
// contains filtered or unexported fields
}
func (*Spanner) AddColumnSQL ¶ added in v0.4.0
func (*Spanner) Begin ¶ added in v0.4.0
func (d *Spanner) Begin() (Transactioner, error)
func (*Spanner) ColumnSchema ¶ added in v0.4.0
func (s *Spanner) ColumnSchema(tables ...string) ([]ColumnSchema, error)
func (*Spanner) ColumnType ¶ added in v0.4.0
func (*Spanner) CreateIndexSQL ¶ added in v0.4.0
func (*Spanner) CreateTableSQL ¶ added in v0.4.0
func (*Spanner) DropColumnSQL ¶ added in v0.4.0
func (*Spanner) DropIndexSQL ¶ added in v0.4.0
func (*Spanner) ImportPackage ¶ added in v0.4.0
func (s *Spanner) ImportPackage(schema ColumnSchema) string
func (*Spanner) ModifyColumnSQL ¶ added in v0.4.0
func (*Spanner) QuoteString ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.