module Granite::Transactions

Direct including types

Defined in:

granite/transactions.cr

Instance Method Summary

Instance Method Detail

def destroy #

Destroy will remove this from the database.


[View source]
def destroy! #

[View source]
def save(*, validate : Bool = true) #

The save method will check to see if the primary key exists yet. If it does it will call the update method, otherwise it will call the create method. This will update the timestamps appropriately.


[View source]
def save!(*, validate : Bool = true) #

[View source]
def set_timestamps(*, to time = Time.local(Granite.settings.default_timezone), mode = :create) #

[View source]
def touch(*fields) : Bool #

Saves the record with the updated_at/names fields updated to the current time.


[View source]
def update(args : Granite::ModelArgs) #

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

[View source]
def update!(args : Granite::ModelArgs) #

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

[View source]