Skip to content

refactor: Update and Insert based on column structure instead of json. - #1380

Merged
Isakdl merged 8 commits into
serverpod:mainfrom
Isakdl:updateWithColumns
Sep 20, 2023
Merged

Isakdl merged 8 commits into
serverpod:mainfrom
Isakdl:updateWithColumns

Conversation

@Isakdl

@Isakdl Isakdl commented Sep 19, 2023

Copy link
Copy Markdown
Collaborator

Changes

Refactors the logic of how we update and insert data into the database. Bases the logic on the column structure rather than the JSON blob. This will help us keep the logic in sync and enable future modifications managing columns that are not represented in the dart world.

Deprecate toJsonForDatabase and the getter tableName in generated protocols / TableRow.

Pre-launch Checklist

  • I read the Contribute page and followed the process outlined there for submitting PRs.
  • This update contains only one single feature or bug fix and nothing else. (If you are submitting multiple fixes, please make multiple PRs.)
  • I read and followed the Dart Style Guide and formatted the code with dart format.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///), and made sure that the documentation follows the same style as other Serverpod documentation. I checked spelling and grammar.
  • I added new tests to check the change I am making.
  • All existing and new tests are passing.
  • Any breaking changes are documented below.

@Isakdl
Isakdl requested review from SandPod and vlidholt September 19, 2023 13:49

@SandPod SandPod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Some minor comments and questions :)

@SandPod SandPod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@Isakdl
Isakdl merged commit 00ee4fb into serverpod:main Sep 20, 2023
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 20, 2023
@Isakdl
Isakdl deleted the updateWithColumns branch November 13, 2023 15:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants