mirror of
https://github.com/ent/ent.git
synced 2026-04-28 05:30:56 +03:00
correctly emit sql db stats
Reviewed By: a8m Differential Revision: D15984447 fbshipit-source-id: b762fdd2507b3b51630f10a2e14812dd3d028029
This commit is contained in:
committed by
Facebook Github Bot
parent
84be4c5653
commit
6c2813b7b5
@@ -36,6 +36,11 @@ func OpenDB(driver string, db *sql.DB) *Driver {
|
|||||||
return &Driver{conn{db}, driver}
|
return &Driver{conn{db}, driver}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DB returns underlying *sql.DB instance.
|
||||||
|
func (d Driver) DB() *sql.DB {
|
||||||
|
return d.conn.ExecQuerier.(*sql.DB)
|
||||||
|
}
|
||||||
|
|
||||||
// Dialect implements the dialect.Dialect method.
|
// Dialect implements the dialect.Dialect method.
|
||||||
func (d Driver) Dialect() string {
|
func (d Driver) Dialect() string {
|
||||||
// if the underlying driver is wrapped with opencensus driver.
|
// if the underlying driver is wrapped with opencensus driver.
|
||||||
|
|||||||
Reference in New Issue
Block a user