Atomic update and backup ON DUPLICATE KEY golang sql statement [on hold]











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:




  1. perform an backup of the value ON DUPLICATE KEY,

  2. user standard SQL

  3. not use store procedures but

  4. remain atomic.










share|improve this question







New contributor




Macilias is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by Toby Speight, Heslacher, VisualMelon, Martin R, Mast 2 days ago


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
    2 days ago















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:




  1. perform an backup of the value ON DUPLICATE KEY,

  2. user standard SQL

  3. not use store procedures but

  4. remain atomic.










share|improve this question







New contributor




Macilias is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by Toby Speight, Heslacher, VisualMelon, Martin R, Mast 2 days ago


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
    2 days ago













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:




  1. perform an backup of the value ON DUPLICATE KEY,

  2. user standard SQL

  3. not use store procedures but

  4. remain atomic.










share|improve this question







New contributor




Macilias is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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:




  1. perform an backup of the value ON DUPLICATE KEY,

  2. user standard SQL

  3. not use store procedures but

  4. remain atomic.







sql go






share|improve this question







New contributor




Macilias is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Macilias is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Macilias is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









Macilias

1022




1022




New contributor




Macilias is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Macilias is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Macilias is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




put on hold as off-topic by Toby Speight, Heslacher, VisualMelon, Martin R, Mast 2 days ago


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.




put on hold as off-topic by Toby Speight, Heslacher, VisualMelon, Martin R, Mast 2 days ago


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
    2 days ago














  • 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
    2 days ago








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
2 days ago




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
2 days ago















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Quarter-circle Tiles

build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

Mont Emei