📅  最后修改于: 2022-03-11 14:59:48.547000             🧑  作者: Mango
代码示例2
def update
sql = <<-SQL
UPDATE dogs SET name = ?, breed = ? WHERE id = ?
SQL
DB[:conn].execute(sql, self.name, self.breed, self.id)
end