Documentation
¶
Index ¶
- Constants
- func DatetimePrecision(d int) dao.Option
- func DisableDatetimePrecision(b bool) dao.Option
- func DontSupportForShareClause(b bool) dao.Option
- func DontSupportRenameColumn(b bool) dao.Option
- func DontSupportRenameIndex(b bool) dao.Option
- func DriverName(name string) dao.Option
- func JSONQuery(column string) *jsonQueryExpression
- func NewDialect(opts ...dao.Option) dao.Dialect
- func SkipInitializeWithVersion(b bool) dao.Option
- func StringSize(size uint) dao.Option
- func Update(db *dao.DB)
- type Column
- type Dialect
- func (d *Dialect) Apply(options *dao.Options) error
- func (d *Dialect) BindVarTo(writer clause.Writer, stmt *dao.Statement, v interface{})
- func (d *Dialect) ClauseBuilders() map[string]clause.ClauseBuilder
- func (d *Dialect) DataTypeOf(field *schema.Field) string
- func (d *Dialect) DefaultValueOf(field *schema.Field) clause.Expression
- func (d *Dialect) Explain(sql string, vars ...interface{}) string
- func (d *Dialect) Init(opts ...dao.Option) (err error)
- func (d *Dialect) JSONBuild(column string) dao.JSONQuery
- func (d *Dialect) JSONDataType() string
- func (d *Dialect) Migrator() dao.Migrator
- func (d *Dialect) NewTx() *dao.DB
- func (d *Dialect) Options() dao.Options
- func (d *Dialect) QuoteTo(writer clause.Writer, str string)
- func (d *Dialect) RollbackTo(tx *dao.DB, name string) error
- func (d *Dialect) SavePoint(tx *dao.DB, name string) error
- func (d *Dialect) String() string
- type Migrator
- func (m Migrator) AlterColumn(value interface{}, field string) error
- func (m Migrator) ColumnTypes(value interface{}) (columnTypes []dao.ColumnType, err error)
- func (m Migrator) DropConstraint(value interface{}, name string) error
- func (m Migrator) DropTable(values ...interface{}) error
- func (m Migrator) FullDataTypeOf(field *schema.Field) clause.Expr
- func (m Migrator) Rename(value interface{}, oldName, newName string) error
- func (m Migrator) RenameIndex(value interface{}, oldName, newName string) error
Constants ¶
View Source
const ( // DefaultDriverName is the default driver name for SQLite. DefaultDriverName = "mysql" // DefaultStringSize is the default string size for mysql DefaultStringSize uint = 255 )
Variables ¶
This section is empty.
Functions ¶
func DatetimePrecision ¶
func DontSupportRenameColumn ¶
func DontSupportRenameIndex ¶
func DriverName ¶
func NewDialect ¶
Example:
mysql.NewDialect(dao.DSN("dao:dao@tcp(localhost:9910)/dao?charset=utf8&parseTime=True&loc=Local"))
func StringSize ¶
Types ¶
type Column ¶
type Column struct {
// contains filtered or unexported fields
}
func (Column) DatabaseTypeName ¶
type Dialect ¶
type Dialect struct {
DB *dao.DB
Opts dao.Options
DriverName string
Conn dao.ConnPool
SkipInitializeWithVersion bool
DefaultStringSize uint
DefaultDatetimePrecision *int
DisableDatetimePrecision bool
DontSupportRenameIndex bool
DontSupportRenameColumn bool
// contains filtered or unexported fields
}
func (*Dialect) ClauseBuilders ¶
func (d *Dialect) ClauseBuilders() map[string]clause.ClauseBuilder
func (*Dialect) DefaultValueOf ¶
func (d *Dialect) DefaultValueOf(field *schema.Field) clause.Expression
func (*Dialect) JSONDataType ¶
type Migrator ¶
func (Migrator) AlterColumn ¶
func (Migrator) ColumnTypes ¶
func (m Migrator) ColumnTypes(value interface{}) (columnTypes []dao.ColumnType, err error)
func (Migrator) DropConstraint ¶
func (Migrator) RenameIndex ¶
Click to show internal directories.
Click to hide internal directories.