Funicular::Model class of PicoRuby
Include
Singleton methods
__apply_schema_associations
Funicular::Model.__apply_schema_associations(untyped associations) -> nil
__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_skipped
Funicular::Model.__association_skipped(Symbol key, String reason) -> 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
__carried_model
Funicular::Model.__carried_model(String class_name) -> untyped
__delete_record
Funicular::Model.__delete_record(String path, untyped id) ?{ (bool? success, untyped error) -> void } -> untyped
__derive_association
Funicular::Model.__derive_association(Symbol kind, Symbol key, untyped target, String foreign_key, Symbol origin) -> nil
__endpoint
Funicular::Model.__endpoint(String name) -> Hash[String, String]
__expand_path
Funicular::Model.__expand_path(String path, Hash[untyped, untyped]? source, untyped identifier, String context) -> [String, Array[String]]
__fetch_collection
Funicular::Model.__fetch_collection(String path, bool conditional) ?{ (Array[Model]? instances, untyped error) -> void } -> untyped
__fetch_record
Funicular::Model.__fetch_record(String path, singleton(Model) klass, bool conditional) ?{ (Model? instance, untyped error) -> void } -> untyped
__forget_http_cache_entry
Funicular::Model.__forget_http_cache_entry(String path) -> void
__http_cache_db
Funicular::Model.__http_cache_db() -> untyped
__http_cache_entry
Funicular::Model.__http_cache_entry(String path) -> Hash[String, untyped]?
__instances_from_replica
Funicular::Model.__instances_from_replica(Array[untyped] ids) -> Array[Model]?
__log_not_modified
Funicular::Model.__log_not_modified(String path) -> void
__path_segment
Funicular::Model.__path_segment(untyped value) -> String
__path_value
Funicular::Model.__path_value(Hash[untyped, untyped]? source, String name) -> untyped
__pluralize
Funicular::Model.__pluralize(String name) -> String
__query_params
Funicular::Model.__query_params(Hash[untyped, untyped]? params, Array[String] consumed) -> Hash[untyped, untyped]
__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
__server_errors
Funicular::Model.__server_errors(HTTP::Response response) -> Errors?
__singularize
Funicular::Model.__singularize(String name) -> String
__store_http_cache_entry
Funicular::Model.__store_http_cache_entry(String path, HTTP::Response response, Array[untyped] ids) -> void
__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
absorb
Funicular::Model.absorb(Array[untyped]? rows) -> nil
all
Funicular::Model.all(?Hash[untyped, untyped] params, ?endpoint_name: String) ?{ (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, **untyped path_params) ?{ (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), **untyped path_params) ?{ (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
__path_source
instance.__path_source() -> Hash[String, untyped]
__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