From 6732a50dfbf1777a5915b7e04af006badacea3be Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Tue, 13 Sep 2016 07:41:42 +0800 Subject: [PATCH] Get Dialect of DB --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index bce3c56b..a6add969 100644 --- a/main.go +++ b/main.go @@ -91,6 +91,11 @@ func (s *DB) DB() *sql.DB { return s.db.(*sql.DB) } +// Dialect get dialect +func (s *DB) Dialect() Dialect { + return s.parent.dialect +} + // New clone a new db connection without search conditions func (s *DB) New() *DB { clone := s.clone()