mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-17 06:08:42 +00:00
14 lines
271 B
Go
14 lines
271 B
Go
|
package ent
|
||
|
|
||
|
import (
|
||
|
"database/sql"
|
||
|
|
||
|
entsql "entgo.io/ent/dialect/sql"
|
||
|
)
|
||
|
|
||
|
// Sql exposes the underlying database connection in the ent client
|
||
|
// so that we can use it to perform custom queries.
|
||
|
func (c *Client) Sql() *sql.DB {
|
||
|
return c.driver.(*entsql.Driver).DB()
|
||
|
}
|