1
0
Fork 1
mirror of https://github.com/hay-kot/homebox.git synced 2025-03-08 10:06:20 +00:00
homebox/backend/internal/data/ent/external.go

14 lines
271 B
Go
Raw Normal View History

2022-09-03 01:17:48 -08:00
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()
}