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
[documentation]: Relations reordering #15894
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit picks, but great writing 💪🏼 I added value
after order
when discussing it because i found it clearer to understand what we're talking about :)
1. `before`: | ||
1. Place **before** the element with that **id** in the list | ||
1. If placing before an init relation: **order = beforeRelation.order -0.5** | ||
_(0.5 is based on the “gap” between the init relation and the one before, so it is placed in between them)_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that the value might not always be 0.5? But is computed as the gap divided by 2?
If so maybe we should make that clearer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should always be 0.5 in this step.
Placing a new relation between
{id: 1, order: 1}
{id: 2, order: 2}
Will result in
{id: 1, order: 1}
{id: 3, order: 1.5}
{id: 2, order: 2}
Saying that, I have rephrased the algo steps hoping it's a little bit clearer. wdyt?
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
What does it do?
Document relations reordering internals in the database layer.