getTableType returns the type name of a table definition without package name, e.g. *database.LFSObject -> LFSObject.
(t any)
| 27 | // getTableType returns the type name of a table definition without package name, |
| 28 | // e.g. *database.LFSObject -> LFSObject. |
| 29 | func 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. |
| 34 | func DumpDatabase(ctx context.Context, db *gorm.DB, dirPath string, verbose bool) error { |
no outgoing calls