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

Spread transfer request over multiple accounts matching a selector #2

Open
SOF3 opened this issue Dec 19, 2021 · 0 comments
Open

Spread transfer request over multiple accounts matching a selector #2

SOF3 opened this issue Dec 19, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@SOF3
Copy link
Owner

SOF3 commented Dec 19, 2021

For example, if we have a database like this:

ID Balance Labels
X01 15 name=X, valueMin=0
X02 15 name=X, valueMin=0
Y03 0 name=Y, valueMax=100

We want to transfer 20 from name=X to name=Y. This is not possible using a single account, but this is possible by splitting the transfer into multiple transactions:

Source Destination Delta
X01 Y03 15
X02 Y03 5

Alternatively:

Source Destination Delta
X01 Y03 10
X02 Y03 10

Whichever strategy we want to use, this is not possible with the current SQL procedures.
To implement this with atomic transactions on MySQL, we may need to create a table storing a temporary list of accounts matching a label selector, then perform operations based on this temporary list.

@SOF3 SOF3 created this issue from a note in Initial launch (To do) Dec 19, 2021
Swift-Strider added a commit to Swift-Strider/Capital that referenced this issue Feb 5, 2022
@SOF3 SOF3 added the bug Something isn't working label May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

No branches or pull requests

1 participant