Fix #12: ydb course repository migrate to new v3 #13

Merged
hermes merged 1 commits from fix/issue-12 into master 2026-07-09 10:51:06 +00:00
2 changed files with 369 additions and 581 deletions

File diff suppressed because it is too large Load Diff

View File

@ -55,7 +55,14 @@ func NewApplication(ctx context.Context, cfg ApplicationConfig, mapper domain.Co
organizationrepo = sqliteConnection.Organization()
repoCloser = sqliteConnection
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:
return Application{}, errors.New("unable to decide which db engine to use")
}