abstract class Jennifer::Model::Base

Included Modules

Extended Modules

Direct Known Subclasses

Defined in:

jennifer/model/base.cr

Constant Summary

TYPES = {Integer => Int32, Int32 => Int32, String => String, SmallInt => Int16, Bool => Bool, Serial => Int64, Int64 => Int64}

Class Method Summary

Instance Method Summary

Macro Summary

Instance methods inherited from module Jennifer::Support

pluralize(str : String) pluralize, singularize(str : String) singularize

Class Method Detail

def self.all #

[View source]
def self.c(name) #

[View source]
def self.delete(*ids) #

[View source]
def self.delete_all #

[View source]
def self.destroy(*ids) #

[View source]
def self.destroy_all #

[View source]
def self.search_by_sql(query : String, args = [] of Supportable) #

[View source]
def self.table_name(value : String | Symbol) #

[View source]
def self.table_name : String #

[View source]
def self.where(&) #

[View source]

Instance Method Detail

def delete #

[View source]
def destroy #

[View source]
def id #

[View source]
def primary #

[View source]

Macro Detail

macro belongs_to(name, klass, request = nil, foreign = nil, primary = nil) #

[View source]
macro has_many(name, klass, request = nil, foreign = nil, primary = nil) #

[View source]
macro has_one(name, klass, request = nil, foreign = nil, primary = nil) #

[View source]
macro mapping(properties) #

[View source]
macro mapping(**properties) #

[View source]
macro scope(name, opts, block = nil) #

[View source]