Atomic update and backup ON DUPLICATE KEY golang sql statement [closed]
up vote
-1
down vote
favorite
What is the best way to combine two statements (INSERT or (BACKUP and UPDATE)) and perform them atomically in golang?
I found this similar question:
Query Select and Insert if not exists
But the Solution does there does not fulfil 2 of the the following requirements:
- perform an backup of the value ON DUPLICATE KEY,
- user standard SQL
- not use store procedures but
- remain atomic.
sql go
closed as off-topic by Toby Speight, Heslacher, VisualMelon, Martin R, Mast Nov 20 at 14:27
This question appears to be off-topic. The users who voted to close gave these specific reasons:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Toby Speight, Martin R, Mast
- "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Heslacher, VisualMelon
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
up vote
-1
down vote
favorite
What is the best way to combine two statements (INSERT or (BACKUP and UPDATE)) and perform them atomically in golang?
I found this similar question:
Query Select and Insert if not exists
But the Solution does there does not fulfil 2 of the the following requirements:
- perform an backup of the value ON DUPLICATE KEY,
- user standard SQL
- not use store procedures but
- remain atomic.
sql go
closed as off-topic by Toby Speight, Heslacher, VisualMelon, Martin R, Mast Nov 20 at 14:27
This question appears to be off-topic. The users who voted to close gave these specific reasons:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Toby Speight, Martin R, Mast
- "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Heslacher, VisualMelon
If this question can be reworded to fit the rules in the help center, please edit the question.
1
Welcome on Code Review. Unfortunately, we don't provide code, we review code you've written. Depending on your problem, another site of the StackExchange network can help you. Please see our help center for more information.
– Calak
Nov 20 at 10:22
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
What is the best way to combine two statements (INSERT or (BACKUP and UPDATE)) and perform them atomically in golang?
I found this similar question:
Query Select and Insert if not exists
But the Solution does there does not fulfil 2 of the the following requirements:
- perform an backup of the value ON DUPLICATE KEY,
- user standard SQL
- not use store procedures but
- remain atomic.
sql go
What is the best way to combine two statements (INSERT or (BACKUP and UPDATE)) and perform them atomically in golang?
I found this similar question:
Query Select and Insert if not exists
But the Solution does there does not fulfil 2 of the the following requirements:
- perform an backup of the value ON DUPLICATE KEY,
- user standard SQL
- not use store procedures but
- remain atomic.
sql go
sql go
asked Nov 20 at 9:57
Macilias
1022
1022
closed as off-topic by Toby Speight, Heslacher, VisualMelon, Martin R, Mast Nov 20 at 14:27
This question appears to be off-topic. The users who voted to close gave these specific reasons:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Toby Speight, Martin R, Mast
- "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Heslacher, VisualMelon
If this question can be reworded to fit the rules in the help center, please edit the question.
closed as off-topic by Toby Speight, Heslacher, VisualMelon, Martin R, Mast Nov 20 at 14:27
This question appears to be off-topic. The users who voted to close gave these specific reasons:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Toby Speight, Martin R, Mast
- "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Heslacher, VisualMelon
If this question can be reworded to fit the rules in the help center, please edit the question.
1
Welcome on Code Review. Unfortunately, we don't provide code, we review code you've written. Depending on your problem, another site of the StackExchange network can help you. Please see our help center for more information.
– Calak
Nov 20 at 10:22
add a comment |
1
Welcome on Code Review. Unfortunately, we don't provide code, we review code you've written. Depending on your problem, another site of the StackExchange network can help you. Please see our help center for more information.
– Calak
Nov 20 at 10:22
1
1
Welcome on Code Review. Unfortunately, we don't provide code, we review code you've written. Depending on your problem, another site of the StackExchange network can help you. Please see our help center for more information.
– Calak
Nov 20 at 10:22
Welcome on Code Review. Unfortunately, we don't provide code, we review code you've written. Depending on your problem, another site of the StackExchange network can help you. Please see our help center for more information.
– Calak
Nov 20 at 10:22
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
1
Welcome on Code Review. Unfortunately, we don't provide code, we review code you've written. Depending on your problem, another site of the StackExchange network can help you. Please see our help center for more information.
– Calak
Nov 20 at 10:22