-
Notifications
You must be signed in to change notification settings - Fork 17
Add an array field type to Custom Objects #675
Copy link
Copy link
Open
Labels
app: custom objectscomplexity: mediumRequires a substantial but not unusual amount of effort to implementRequires a substantial but not unusual amount of effort to implementstatus: backlogtype: featureA new feature or functionalityA new feature or functionality
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
app: custom objectscomplexity: mediumRequires a substantial but not unusual amount of effort to implementRequires a substantial but not unusual amount of effort to implementstatus: backlogtype: featureA new feature or functionalityA new feature or functionality
Plugin Version
v0.6.0
Proposed functionality
Add a first-class
arrayfield type, backed by Postgres/Django'sArrayField(including support for nested arrays with a fixed element size), with an element schema — distinct from the existing unstructuredjsonfield type, which doesn't validate shape and can't be filtered positionally. Today the Custom Objects field-type enum has noarraytype.Use case
netbox-physical-geometry's
ZoneandPathmodels store geometry as a nested array of(x, y, z)integer triplets:The existing
coordinatesfield type (added in v0.6.0) only covers a single lat/lon pair and doesn't cover a variable-length list of coordinate triplets. This is a lower-priority, narrower gap — only 1 of 9 surveyed plugins is affected, and it's a fairly geometric outlier — but a first-classarraytype with an element schema would close this gap and would likely be more broadly useful than a one-off geometry-specific field.External dependencies
None — reuses Postgres/Django's existing
ArrayFieldsupport.