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

Allow tables to handle _id values in non DS+ rows #14929

Merged
merged 4 commits into from
Oct 31, 2024

Conversation

aptkingston
Copy link
Member

@aptkingston aptkingston commented Oct 31, 2024

Description

This PR allows the usage of existing values for an _id column on non-datasource-plus sources. An example is Mongo, which has it's own concept of _id separate to Budibases. The current table component assumes that non DS+ sources will not contain this field, and therefore overwrites it with a UUID in order to be able to uniquely identify each row.

This PR will now use existing _id values if they exist, trusting that they are unique, and continuing to generate them if not.

I've also updated the additional context we pull from tables to better reflect the available data. This means that fields like _id and __idx which the table generates for internal use will not appear in live binding evaluation.

Assumptions

The grid has 2 remaining assumptions.

  • _id values in non DS+ rows are unique
  • _id values in non DS+ rows do not start with ‽‽ (that's not a question mark, it's an obscure character chosen since it's extremely rare and will never be used)

Addresses

A customer issue.

Copy link

qa-wolf bot commented Oct 31, 2024

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

@aptkingston aptkingston marked this pull request as ready for review October 31, 2024 12:35
@aptkingston aptkingston changed the title Use existing ids non ds plus Allow tables to handle _id values in non DS+ rows Oct 31, 2024
Copy link
Contributor

@deanhannigan deanhannigan left a comment

Choose a reason for hiding this comment

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

LGTM!

@aptkingston aptkingston merged commit 3477fa3 into v3-ui Oct 31, 2024
11 of 12 checks passed
@aptkingston aptkingston deleted the use-existing-ids-non-ds-plus branch October 31, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants