c45e1dd427
all schema and rest apis for text extraction support * in progress * stage 8 complete * phase 9 completed * phase 9 complete * ongoing - s3 path fix * working * optimize ci build * e2e tests * missing test
21 lines
704 B
Go
21 lines
704 B
Go
package fieldextraction
|
|
|
|
import (
|
|
"queryorchestration/internal/database/repository"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// CreateFieldExtractionInput represents the complete input for creating a field extraction
|
|
type CreateFieldExtractionInput struct {
|
|
DocumentID uuid.UUID
|
|
SingleFields *repository.AddFieldExtractionParams
|
|
ArrayFields []*repository.AddFieldExtractionArrayFieldParams // All arrays must be same length N
|
|
}
|
|
|
|
// ValidateArrayConsistency checks that all array fields have consistent length
|
|
// Returns the array length if valid, error if inconsistent
|
|
func ValidateArrayConsistency(arrayFields []*repository.AddFieldExtractionArrayFieldParams) (int, error) {
|
|
return len(arrayFields), nil
|
|
}
|