Skip to content

Commit

Permalink
Get Dialect of DB
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhu committed Sep 12, 2016
1 parent 02f6ae3 commit 6732a50
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 6732a50

Please sign in to comment.