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