Skip to content

Commit

Permalink
backend/pkg/database: move all common Gorm functionality to new files
Browse files Browse the repository at this point in the history
  • Loading branch information
nickmurray47 committed Oct 13, 2023
1 parent 504cd42 commit abbfa9a
Show file tree
Hide file tree
Showing 11 changed files with 4,852 additions and 1,106 deletions.
2 changes: 2 additions & 0 deletions backend/pkg/database/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ func NewRepository(appConfig config.Interface, globalLogger logrus.FieldLogger,
switch pkg.DatabaseRepositoryType(appConfig.GetString("database.type")) {
case pkg.DatabaseRepositoryTypeSqlite:
return newSqliteRepository(appConfig, globalLogger, eventBus)
case pkg.DatabaseRepositoryTypePostgres:
return newPostgresRepository(appConfig, globalLogger, eventBus)
default:
return nil, errors.DatabaseTypeNotSupportedError(appConfig.GetString("database.type"))
}
Expand Down

0 comments on commit abbfa9a

Please sign in to comment.