Feat: add POSIX DB projection

This commit is contained in:
MangoPig
2026-06-21 22:02:59 +01:00
parent 9b4f1ce197
commit 3c7a73853d
6 changed files with 785 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ import (
"github.com/jackc/pgx/v5"
"moku-backend/internal/database"
"moku-backend/internal/posixproj"
)
const (
@@ -413,6 +414,10 @@ func (service *Service) SaveStructure(ctx context.Context, input SaveStructureIn
return StructureRecord{}, err
}
if err := posixproj.NewProjector(service.db, service.posixRoot).Rebuild(ctx); err != nil {
return StructureRecord{}, fmt.Errorf("rebuild POSIX projection: %w", err)
}
return StructureRecord{
Installation: installation,
Organization: organization,