Fix #12: ydb course repository migrate to new v3 #13
File diff suppressed because it is too large
Load Diff
@ -55,7 +55,14 @@ func NewApplication(ctx context.Context, cfg ApplicationConfig, mapper domain.Co
|
|||||||
organizationrepo = sqliteConnection.Organization()
|
organizationrepo = sqliteConnection.Organization()
|
||||||
repoCloser = sqliteConnection
|
repoCloser = sqliteConnection
|
||||||
case RepositoryEngineYDB:
|
case RepositoryEngineYDB:
|
||||||
return Application{}, errors.New("ydb is no longer supported")
|
ydbConn, err := adapters.NewYDBConnection(ctx, cfg.YDB, log.With(slog.String("db", "ydb")))
|
||||||
|
if err != nil {
|
||||||
|
return Application{}, fmt.Errorf("making ydb connection: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
courseadapter = ydbConn.CourseRepository()
|
||||||
|
organizationrepo = ydbConn.Organization()
|
||||||
|
repoCloser = ydbConn
|
||||||
default:
|
default:
|
||||||
return Application{}, errors.New("unable to decide which db engine to use")
|
return Application{}, errors.New("unable to decide which db engine to use")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user