add FormatBytes for dialect

This commit is contained in:
Lunny Xiao 2014-05-04 13:52:56 +08:00
parent 4bcb0fbd6a
commit e649ef538f
1 changed files with 5 additions and 0 deletions

View File

@ -29,6 +29,7 @@ type Dialect interface {
DB() *DB
DBType() DbType
SqlType(*Column) string
FormatBytes(b []byte) string
QuoteStr() string
AndStr() string
@ -90,6 +91,10 @@ func (b *Base) DBType() DbType {
return b.Uri.DbType
}
func (b *Base) FormatBytes(bs []byte) string {
return fmt.Sprintf("0x%x", bs)
}
func (b *Base) DriverName() string {
return b.driverName
}