Funicular::Model class of PicoRuby

Include

Validations

Singleton methods

__assert_association_name_free

Funicular::Model.__assert_association_name_free(Symbol key) -> nil

__assert_no_association_conflict

Funicular::Model.__assert_no_association_conflict(Array[String] names) -> nil

__association_target

Funicular::Model.__association_target(Symbol key, String class_name) -> untyped

__associations

Funicular::Model.__associations() -> Hash[Symbol, Hash[Symbol, untyped]]

__camelize

Funicular::Model.__camelize(String name) -> String

__pluralize

Funicular::Model.__pluralize(String name) -> String

__register_association

Funicular::Model.__register_association(Symbol key) -> nil

__register_model

Funicular::Model.__register_model(untyped subclass) -> nil

__registered_models

Funicular::Model.__registered_models() -> Array[untyped]

__reject_association_options

Funicular::Model.__reject_association_options(Symbol kind, Symbol | String name, Hash[Symbol, untyped] rest) -> nil

__resolve_association_constant

Funicular::Model.__resolve_association_constant(Symbol key, String class_name) -> untyped

__singularize

Funicular::Model.__singularize(String name) -> String

__unresolvable_association

Funicular::Model.__unresolvable_association(Symbol key, String class_name) -> String

__write_through_delete

Funicular::Model.__write_through_delete(untyped id) -> void

__write_through_upsert

Funicular::Model.__write_through_upsert(untyped attrs) -> void

__write_through_upsert_all

Funicular::Model.__write_through_upsert_all(untyped rows) -> void

all

Funicular::Model.all(?Hash[untyped, untyped] params) ?{ (Array[Model]? instances, untyped error) -> void } -> untyped

belongs_to

Funicular::Model.belongs_to(Symbol | String name, ?class_name: (String | Symbol)?, ?foreign_key: (String | Symbol)?, **untyped rest) -> nil

build_from_local

Funicular::Model.build_from_local(Hash[untyped, untyped] attrs) -> Model

count

Funicular::Model.count() -> Integer

create

Funicular::Model.create(?Hash[untyped, untyped] attrs, **untyped kw) ?{ (Model? instance, untyped error) -> void } -> untyped

define_local_accessor

Funicular::Model.define_local_accessor(String name, Array[Symbol] existing) -> void

define_local_accessors

Funicular::Model.define_local_accessors(Hash[String, Symbol] columns) -> void

delete_all

Funicular::Model.delete_all() -> Integer

demodulized_snake_name

Funicular::Model.demodulized_snake_name() -> String

derive_replica_columns

Funicular::Model.derive_replica_columns() -> Hash[String, Symbol]

derive_table_name

Funicular::Model.derive_table_name() -> String

destroy

Funicular::Model.destroy(?untyped id) ?{ (bool? success, untyped error) -> void } -> untyped

endpoints

Funicular::Model.endpoints() -> Hash[String, Hash[String, String]]

endpoints=

Funicular::Model.endpoints=(Hash[String, Hash[String, String]] endpoints) -> Hash[String, Hash[String, String]]

ephemeral?

Funicular::Model.ephemeral?() -> bool

exists?

Funicular::Model.exists?() -> bool

find

Funicular::Model.find(?untyped id, ?endpoint_name: String, ?model_class: singleton(Model)) ?{ (Model? instance, untyped error) -> void } -> untyped

find_by

Funicular::Model.find_by(Hash[untyped, untyped] conditions) -> untyped

first

Funicular::Model.first() -> untyped

has_many

Funicular::Model.has_many(Symbol | String name, ?class_name: (String | Symbol)?, ?foreign_key: (String | Symbol)?, **untyped rest) -> nil

inherited

Funicular::Model.inherited(untyped subclass) -> void

new

Funicular::Model.new(?Hash[untyped, untyped] attributes) -> void

limit

Funicular::Model.limit(Integer? n) -> Relation

load_schema

Funicular::Model.load_schema(Hash[String, untyped] schema_data) -> void

local

Funicular::Model.local() -> Relation

local?

Funicular::Model.local?() -> bool

local_columns

Funicular::Model.local_columns() -> Hash[String, Symbol]

local_create

Funicular::Model.local_create(?Hash[untyped, untyped] attrs) -> Model

local_db

Funicular::Model.local_db() -> untyped

local_migrations

Funicular::Model.local_migrations() -> Array[Hash[Symbol, untyped]]?

local_query

Funicular::Model.local_query(String method_name) -> Relation

local_table_changed

Funicular::Model.local_table_changed() -> void

merge_keyword_attrs

Funicular::Model.merge_keyword_attrs(Hash[untyped, untyped] attrs, Hash[Symbol, untyped] kw) -> Hash[untyped, untyped]

migrate

Funicular::Model.migrate(Integer version, ?reset: bool) { (untyped t) -> void } -> void

normalize_validation_options

Funicular::Model.normalize_validation_options(Symbol | String kind, untyped opts) -> untyped

off_change

Funicular::Model.off_change(Integer subscription) -> nil

offset

Funicular::Model.offset(Integer? n) -> Relation

on_change

Funicular::Model.on_change() { (Symbol role, String table) -> void } -> Integer

order

Funicular::Model.order(*untyped args) -> Relation

refresh

Funicular::Model.refresh(Symbol mode) -> Symbol

refresh_mode

Funicular::Model.refresh_mode() -> Symbol

register_schema_validations

Funicular::Model.register_schema_validations(untyped validations) -> void

replica?

Funicular::Model.replica?() -> bool

replica_db

Funicular::Model.replica_db() -> untyped

reset_local

Funicular::Model.reset_local() -> bool

rest_attribute_type

Funicular::Model.rest_attribute_type(String name) -> Symbol?

schema

Funicular::Model.schema() -> Hash[String, Hash[String, untyped]]

schema=

Funicular::Model.schema=(Hash[String, Hash[String, untyped]] schema) -> Hash[String, Hash[String, untyped]]

storage

Funicular::Model.storage(Symbol kind) ?{ () -> void } -> Symbol

storage_kind

Funicular::Model.storage_kind() -> Symbol

table_name

Funicular::Model.table_name(?(String | Symbol)? explicit) -> String

validate_local_migrations

Funicular::Model.validate_local_migrations() -> void

where

Funicular::Model.where(?Hash[untyped, untyped] | String | nil conditions, *untyped binds) -> Relation

Instance methods

__hydrate_local

instance.__hydrate_local(Hash[untyped, untyped] attrs) -> void

__local_destroy

instance.__local_destroy() -> bool

__local_insert

instance.__local_insert() -> Model

__local_update

instance.__local_update(Hash[untyped, untyped]? attrs) -> bool

__set_local_baseline

instance.__set_local_baseline(Hash[untyped, untyped] attrs) -> void

__sync_from_row

instance.__sync_from_row() -> void

__track_local_change

instance.__track_local_change(String name, untyped value, untyped old) -> void

destroy

instance.destroy() ?{ (bool? success, untyped error) -> void } -> untyped

new_record?

instance.new_record?() -> bool

reload

instance.reload() ?{ (Model? instance, untyped error) -> void } -> untyped

update

instance.update(?Hash[untyped, untyped]? attrs) ?{ (Model? instance, untyped error) -> void } -> untyped

Attr accessors

id (reader)

instance.id -> untyped
Tags: class