abstract class Marten::DB::Model

Included Modules

Extended Modules

Direct Known Subclasses

Defined in:

marten/db/model.cr
marten/db/model/app_config.cr
marten/db/model/callbacks.cr
marten/db/model/comparison.cr
marten/db/model/connection.cr
marten/db/model/inheritance.cr
marten/db/model/persistence.cr
marten/db/model/querying.cr
marten/db/model/table.cr
marten/db/model/table/field_context.cr
marten/db/model/table/reverse_relation_context.cr
marten/db/model/validation.cr
marten/template/ext/db/model.cr

Constant Summary

LOOKUP_SEP = "__"

Constructors

Instance methods inherited from module Marten::Core::Validation

errors : ErrorSet errors, invalid?(context : Nil | String | Symbol = nil) invalid?, valid?(context : Nil | String | Symbol = nil) valid?, validate validate

Instance methods inherited from module Marten::DB::Model::Persistence

delete(using : Nil | String | Symbol = nil) delete, deleted? deleted?, new_record? new_record?, persisted? persisted?, reload reload, save(using : Nil | String | Symbol = nil, validate : Bool = true) : Bool save, save!(using : Nil | String | Symbol = nil, validate : Bool = true) : Bool save!, update(values : Hash | NamedTuple)
update(**values)
update
, update!(values : Hash | NamedTuple)
update!(**values)
update!

Instance methods inherited from module Marten::DB::Model::Comparison

<=>(other : self) <=>, ==(other : self) ==

Instance methods inherited from module Marten::DB::Model::Table

get_field_value(field_name : String | Symbol) get_field_value, get_relation(relation_name : String | Symbol) get_relation, inspect(io) inspect, pk pk, pk! pk!, pk=(val) pk=, pk? : Bool pk?, set_field_value(field_name : String | Symbol, value : Field::Any | Model) set_field_value, set_field_values(values : Hash | NamedTuple)
set_field_values(**values)
set_field_values
, to_s(io) to_s

Instance methods inherited from module Marten::DB::Model::Connection

transaction(using : Nil | String | Symbol = nil, &block) transaction

Constructor Detail

def self.new(kwargs : Hash | NamedTuple) #

[View source]
def self.new(**kwargs) #

[View source]
def self.new(kwargs : Hash | NamedTuple, &) #

[View source]
def self.new(**kwargs, &) #

[View source]