class Crecto::Multi

Overview

Multi is used for grouping multiple Repo operations into a single transaction

Operations will be executed in the order they were added

If a Multi contains operations that accept a Changeset, they will be checked before starting the transaction. If any changesets have errors, the transaction will never be started.

Defined in:

crecto/multi.cr

Instance Method Summary

Instance Method Detail

def changesets_valid? #

[View source]
def delete(queryable_instance : Crecto::Model) #

[View source]
def delete(changeset : Crecto::Changeset::Changeset) #

[View source]
def delete_all(queryable, query = Crecto::Repo::Query.new) #

[View source]
def insert(queryable_instance : Crecto::Model) #

[View source]
def insert(changeset : Crecto::Changeset::Changeset) #

[View source]
def update(queryable_instance : Crecto::Model) #

[View source]
def update(changeset : Crecto::Changeset::Changeset) #

[View source]
def update_all(queryable, query, update_hash : Hash) #

[View source]
def update_all(queryable, query, update_tuple : NamedTuple) #

[View source]