Name: Adding support for list data type in Mathesar
Status: Draft
Theme: List data type
Role | Assignee | Notes |
---|---|---|
Owner | Maria | |
Approver (project plan) | Kriti | Needs to approve project plan |
Approver (product) | Kriti | Needs to approve product spec and design |
Approver (frontend) | Pavish, Sean | Needs to approve frontend spec |
Approver (design) | Ghislaine | Needs to approve design spec |
Approver (backend) | Brent | Needs to approve backend spec |
Contributor (requirements) | Brent, Ghislaine | Creates product spec, requirements, GitHub issues |
Contributor (design) | Ghislaine | Creates designs |
Contributor (backend) | Maria | Creates backend specs and implements backend |
Contributor (frontend) | Rajat | Creates frontend specs and implements frontend |
Contributor (backend review) | Brent | Reviews backend code |
Contributor (frontend review) | Pavish | Reviews frontend code |
The Mathesar UI allows users to configure the column types for their data, choosing between types like “Number”, “Date”, “Text”, and so on. All data entered into the column is then validated against the rules according to the type. So for example, in a Number column, Mathesar will allow input of 2
but will reject input of hello
.
So far, we’ve been assuming that users will only store a single point of data in any given table cell. However, PostgreSQL supports the ability to store an array instead of a single point of data, and we’d like to support that.
We already have support for arrays in explorations (and the Data Explorer), but those are read-only. This project is for adding support for lists to tables.
List
should be an available data type in addition to all of the others. Therefore, users should be able to visualize it in the dropdown menu of all the available data types.null
, as Mathesar supports this for the other data types as well."{item1,item2,...}"
: this is what Postgresql infers as an array when importing data from a CSV file (note the double quotes).[item1,item2,...]
: this notation is allowed when inserting values in an array column in Postresql.From the record page:
By double clicking a cell from the table page:
null
for a single record of the table.We should support the following filters for List
cells:
<ITEM>
Regarding the length of the list in a cell:
<NUMBER>
<NUMBER>
<NUMBER>
<NUMBER>
<NUMBER>
We should support the following custom grouping types for List cells:
This section will grow over the project’s timeframe.
This project should take 13 weeks.
Date | Outcome |
---|---|
2023-05-01 | Product specification starts |
2023-05-19 | Implementation spec complete |
2023-05-24 | Implementation spec approved |
2023-06-22 | Design work complete |
2023-07-03 | Backend work complete |
2023-07-05 | Frontend work complete |
2023-07-20 | Documentation complete |
money
of a column, to list of money
. In PostgreSQL, an array can be of any of its built-in data types.list
columns. E.g.: users can define a new list
column as the result of concatenating the items of two other list
columns. This can be extended to a functionality similar to inserting formulas in cells of a spreadsheet (like in Excel, Calc).list
column with a custom expression. E.g.: for a numerical list column, sort the column based on the average of the lists.