class Sandstone::ORM::Base

Overview

Sandstone::ORM::Base is the base class for your model objects.

Included Modules

Extended Modules

Defined in:

sandstone/base.cr

Constructors

Macro Summary

Instance methods inherited from module Sandstone::ORM::Validators

errors errors, errors=(errors) errors=, valid? valid?

Macros inherited from module Sandstone::ORM::Validators

validate(message, block)
validate(field, message, block)
validate

Instance methods inherited from module Sandstone::ORM::Transactions

create(args : Hash(Symbol | String, DB::Any))
create(**args)
create

Macros inherited from module Sandstone::ORM::Transactions

__process_transactions __process_transactions

Macros inherited from module Sandstone::ORM::Table

__process_table __process_table, adapter(name) adapter, primary(decl) primary, set_foreign_key(column) set_foreign_key, set_order_column(column) set_order_column, table_name(name) table_name

Macros inherited from module Sandstone::ORM::Fields

__process_fields __process_fields, field(decl) field, no_timestamps no_timestamps, timestamps timestamps

Macros inherited from module Sandstone::ORM::Callbacks

__run_after_create __run_after_create, __run_after_destroy __run_after_destroy, __run_after_save __run_after_save, __run_after_update __run_after_update, __run_before_create __run_before_create, __run_before_destroy __run_before_destroy, __run_before_save __run_before_save, __run_before_update __run_before_update, after_create(callback) after_create, after_destroy(callback) after_destroy, after_save(callback) after_save, after_update(callback) after_update, before_create(callback) before_create, before_destroy(callback) before_destroy, before_save(callback) before_save, before_update(callback) before_update

Macros inherited from module Sandstone::ORM::Associations

belongs_to(model_name) belongs_to, has_many(children_table)
has_many(children_table, through)
has_many
, has_some(children_class_name)
has_some(children_class_name, through)
has_some
, owned_by(parent_class_name, column = nil) owned_by

Constructor Detail

def self.new(args : Hash(String | Symbol, Array(JSON::Any) | Bool | Float64 | Hash(String, JSON::Any) | Int64 | String | Nil | Int32 | Float32)) #

[View source]
def self.new #

[View source]

Macro Detail

macro __process_querying #

[View source]