module

Granite::Transactions::ClassMethods

Instance methods

clear
Source
create
Source
create!(args : Granite::ModelArgs)
Source
create!
Source
import(model_array : Array(self) | Granite::Collection(self), update_on_duplicate : Bool, columns : Array(String), batch_size : Int32 = model_array.size)
Source
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

Source
import(model_array : Array(self) | Granite::Collection(self), ignore_on_duplicate : Bool, batch_size : Int32 = model_array.size)
Source