Class: DatabaseCore::V3::UpdateModel
- Inherits:
-
Object
- Object
- DatabaseCore::V3::UpdateModel
- Defined in:
- lib/database-core/v3/update_model.rb
Class Method Summary collapse
Class Method Details
.build(model, params) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/database-core/v3/update_model.rb', line 5 def self.build model, params model = Sanitize.target(model) columns = build_columns(params).join(", ") output = ["UPDATE `#{model}` SET #{columns}"] WhereModel.build(output, params) output.join(" ") end |