Skip to content

Non-core datatypes default to text in relational views #12410

@bferguso

Description

@bferguso

Found while implementing the arches-controlled-lists, the relational views default to text for datatypes that are not in arches core. Need to find a way to allow for external datatypes in the relational views.

Similar to #12069

Initial strategy for this is:

  1. Add a value to the d_data_types.defaultconfig JSON which indicates what native Postgres datatype (pgdatatype?) it should resolve to
  2. Add a value to the d_data_types.defaultconfig JSON which indicates what Postgres function (pg_value_to_json?) should be used to transform the value in the relational view into JSON for the tiles.tiledata column
  3. Remove the hard-coded case statement from the __arches_get_node_value_sql and replace it using the d_data_types.defaultconfig
  4. Externalize the datatype-specific logic from the __arches_get_json_data_for_view function to use the function specified in the datatype configuration. This may have negative performance implications, but maybe we can use standard naming conventions to mitigate this?

FYI @robgaston @chiatt

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

🔖 Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions