Get Dialect of DB

This commit is contained in:
Jinzhu 2016-09-13 07:41:42 +08:00
parent 02f6ae3c4e
commit 6732a50dfb
1 changed files with 5 additions and 0 deletions

View File

@ -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()