65e9a58979
Signed-off-by: Michael Mayer <michael@photoprism.app>
14 lines
304 B
Go
14 lines
304 B
Go
package entity
|
|
|
|
import "github.com/jinzhu/gorm"
|
|
|
|
// Db returns the default *gorm.DB connection.
|
|
func Db() *gorm.DB {
|
|
return dbConn.Db()
|
|
}
|
|
|
|
// UnscopedDb returns an unscoped *gorm.DB connection
|
|
// that returns all records including deleted records.
|
|
func UnscopedDb() *gorm.DB {
|
|
return Db().Unscoped()
|
|
}
|