-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Description
Hello, I don't know if is possible do it using this gem, it is the case:
connection = Mysql2::Client.new([...])
Upsert.batch(connection, :pets) do |upsert|
# N times...
upsert.row({:name => 'product1'}, :count => 2)
upsert.row({:name => 'product2'}, :count => 10)
endI don't wanna only update the count attribute, if the product1 has a count: 1 in the database, I wanna sum the database value with the new value. In this case product1.count became 3(2+1).
Is it possible? Thanks all
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels