Method: Cequel::Record::Callbacks#save
- Defined in:
- lib/cequel/record/callbacks.rb
#save(options = {}) ⇒ Boolean
Persist the record to the database. If this is a new record, it will be saved using an INSERT statement. If it is an existing record, it will be persisted using a series of ‘UPDATE` and `DELETE` statements which will persist all changes to the database, including atomic collection modifications.
33 34 35 36 37 |
# File 'lib/cequel/record/callbacks.rb', line 33 def save( = {}) connection.batch(.slice(:consistency)) do run_callbacks(:save) { super } end end |