MCPcopy
hub / github.com/MHSanaei/3x-ui / GetDB

Function GetDB

internal/database/db.go:1303–1305  ·  view source on GitHub ↗

GetDB returns the global GORM database instance.

()

Source from the content-addressed store, hash-verified

1301
1302// GetDB returns the global GORM database instance.
1303func GetDB() *gorm.DB {
1304 return db
1305}
1306
1307func IsNotFound(err error) bool {
1308 return errors.Is(err, gorm.ErrRecordNotFound)

Calls

no outgoing calls