module RethinkORM::Persistence

Direct including types

Defined in:

rethinkdb-orm/persistence.cr

Instance Method Summary

Instance Method Detail

def _new_flag #

[View source]
def _new_flag=(_new_flag) #

[View source]
def delete #

Only deletes document from table. No callbacks or updated associations


[View source]
def destroy #

Destroy object, run destroy callbacks and update associations


[View source]
def destroyed=(destroyed : Bool) #

[View source]
def destroyed? : Bool #

[View source]
def new_record? #

Id generated on save or set on load


[View source]
def persisted? #

[View source]
def reload! #

Reload the model in place.

Raises


[View source]
def save(**options) #

Saves the model.

If the model is new, a record gets created in the database, otherwise the existing record gets updated.


[View source]
def save!(**options) #

Saves the model.

If the model is new, a record gets created in the database, otherwise the existing record gets updated.

Raises


[View source]
def update(**attributes) #

Updates the model

Non-atomic updates are required for multidocument updates


[View source]
def update!(**attributes) #

Updates the model in place

Raises RethinkORM::Error::DocumentInvalid on update failure


[View source]
def update_fields(**attributes) #

Atomically update specified fields, without running callbacks


[View source]