5

Pseudo-code:
function edit(data){
// DB delete where data.id

// DB insert new data
}

Comments
  • 1
    My last boss coded like this, but somehow it always worked because there was a rollback in case there was an error, but holy shit was I nervous every time he insisted to introduce a new update function on his own.
  • 0
    You'll have to do that in Cassandra / many DBs when your key (primary or clustered) changes. Perfectly normal!
  • 0
    @aswinramakrish obviously that this happened in a regular platform flow. CRUD function, they say
  • 0
    @fiskolin Well, I bet the R in CRUD would've been so much fun! 😂 I bet the users would be going..
Add Comment