Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce data added to table matches the column def type #1293

Open
naleeha opened this issue Apr 17, 2024 · 0 comments
Open

Enforce data added to table matches the column def type #1293

naleeha opened this issue Apr 17, 2024 · 0 comments
Labels

Comments

@naleeha
Copy link
Contributor

naleeha commented Apr 17, 2024

Feature Request

Description of Problem:

Context

UI (javascript) and server (Scala) has different data types and we use json to serialise messages between the two

Issues

  • Numbers get serialised to int/double on the server so issues with sending long from UI
  • On a double column, if user enters whole numbers, it get serialised to int
  • Issues with sending date/time as these are sent as long from UI
  • Need to ensure the data being added to table row matches the type expected in column definition

Potential Solutions:

Schema bases solution
#853

Using class to represent row data

  • Introduce convention of creating case classes that represent data row for a table.
  • Use that to try and serialise/deserialise RPC messages to the right type
  • Create helper function to add a generic types to a table - e.g. table.addRow(myRowInstance)
  • Explore easy ways to add tests using test object factory using the row data class
@naleeha naleeha added the server label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant