Validate final registered sequence identities
This commit is contained in:
@@ -25,8 +25,8 @@ func SequenceAnyMappingKey() SequenceSelectorSegment {
|
||||
}
|
||||
|
||||
// SequenceIdentity records the identity fields used for strict sequence
|
||||
// composition and identified-record parent lookup. It does not add final-result
|
||||
// identity validation; that check remains the application's responsibility.
|
||||
// composition, identified-record parent lookup, and final typed-result
|
||||
// validation during loading.
|
||||
type SequenceIdentity struct {
|
||||
exactPath bool
|
||||
path Path
|
||||
@@ -34,9 +34,9 @@ type SequenceIdentity struct {
|
||||
identityFields []string
|
||||
}
|
||||
|
||||
// SequenceIdentityAt registers identity fields at an exact mapping path. The
|
||||
// path and fields are copied; invalid paths and empty field sets are reported
|
||||
// during load validation.
|
||||
// SequenceIdentityAt registers an exact mapping path for strict-composition,
|
||||
// inheritance, and final typed-result identity checks. The path and fields are
|
||||
// copied; invalid paths and empty field sets are reported during load validation.
|
||||
func SequenceIdentityAt(path Path, fields ...string) SequenceIdentity {
|
||||
return SequenceIdentity{
|
||||
exactPath: true,
|
||||
@@ -46,8 +46,9 @@ func SequenceIdentityAt(path Path, fields ...string) SequenceIdentity {
|
||||
}
|
||||
|
||||
// SequenceIdentityMatching registers identity fields at destinations matched by
|
||||
// selector. Literal and wildcard selector segments are copied. Empty field sets
|
||||
// are reported during load validation.
|
||||
// selector for strict composition, inheritance, and final typed-result checks.
|
||||
// Literal and wildcard selector segments are copied. Empty field sets are
|
||||
// reported during load validation.
|
||||
func SequenceIdentityMatching(selector SequenceSelector, fields ...string) SequenceIdentity {
|
||||
return SequenceIdentity{
|
||||
selector: append(SequenceSelector(nil), selector...),
|
||||
|
||||
Reference in New Issue
Block a user