module Granite::Transactions::ClassMethods

Direct including types

Defined in:

granite/transactions.cr

Instance Method Summary

Instance Method Detail

def clear #

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

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

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

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

[View source]
def import(model_array : Array(self) | Granite::Collection(self), update_on_duplicate : Bool, columns : Array(String), batch_size : Int32 = model_array.size) #

[View source]
def import(model_array : Array(self) | Granite::Collection(self), batch_size : Int32 = model_array.size) #

The import class method will run a batch INSERT statement for each model in the array the array must contain only one model class invalid model records will be skipped


[View source]
def import(model_array : Array(self) | Granite::Collection(self), ignore_on_duplicate : Bool, batch_size : Int32 = model_array.size) #

[View source]