From e649ef538f981cc7240c73ba89862e956f00a64a Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 4 May 2014 13:52:56 +0800 Subject: [PATCH] add FormatBytes for dialect --- dialect.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dialect.go b/dialect.go index f17cf784..3291d069 100644 --- a/dialect.go +++ b/dialect.go @@ -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 }