FieldPath::create() #20
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Research
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
slendium/ocd#20
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently
FieldPath's can only be created through the constructor. However, some API's require methods for convertingstring's directly into single-element field paths (from array keys for example), but still may want to allow multi-element paths.To prevent this conversion being recreated everywhere, a static
FieldPath::create(non-empty-list<non-empty-string>|non-empty-string)method should be added.Doesn't really make sense, even in the array case it is easy to wrap the field in
[]and just use the constructor. Most field names are already (should be) declared literally.The only class that does this is the
DocumentShapeutility. To prevent unnecessary branching it might even be preferred to also force the array syntax here.