You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)end
I 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
The text was updated successfully, but these errors were encountered:
Hello, I don't know if is possible do it using this gem, it is the case:
I don't wanna only update the count attribute, if the
product1
has acount: 1
in the database, I wanna sum the database value with the new value. In this caseproduct1.count
became 3(2+1).Is it possible? Thanks all
The text was updated successfully, but these errors were encountered: