MCPcopy Create free account
hub / github.com/gogs/gogs / getTableType

Function getTableType

internal/database/backup.go:29–31  ·  view source on GitHub ↗

getTableType returns the type name of a table definition without package name, e.g. *database.LFSObject -> LFSObject.

(t any)

Source from the content-addressed store, hash-verified

27// getTableType returns the type name of a table definition without package name,
28// e.g. *database.LFSObject -> LFSObject.
29func getTableType(t any) string {
30 return strings.TrimPrefix(fmt.Sprintf("%T", t), "*database.")
31}
32
33// DumpDatabase dumps all data from database to file system in JSON Lines format.
34func DumpDatabase(ctx context.Context, db *gorm.DB, dirPath string, verbose bool) error {

Callers 4

DumpDatabaseFunction · 0.85
dumpLegacyTablesFunction · 0.85
dumpTablesFunction · 0.85
importTablesFunction · 0.85

Calls

no outgoing calls

Tested by 2

dumpTablesFunction · 0.68
importTablesFunction · 0.68