Module: Sequel::Plugins
- Defined in:
- lib/sequel/model/plugins.rb,
lib/sequel/plugins/list.rb,
lib/sequel/plugins/tree.rb,
lib/sequel/plugins/touch.rb,
lib/sequel/plugins/schema.rb,
lib/sequel/plugins/caching.rb,
lib/sequel/plugins/sharding.rb,
lib/sequel/plugins/rcte_tree.rb,
lib/sequel/plugins/subclasses.rb,
lib/sequel/plugins/timestamps.rb,
lib/sequel/plugins/composition.rb,
lib/sequel/plugins/active_model.rb,
lib/sequel/plugins/identity_map.rb,
lib/sequel/plugins/serialization.rb,
lib/sequel/plugins/force_encoding.rb,
lib/sequel/plugins/instance_hooks.rb,
lib/sequel/plugins/xml_serializer.rb,
lib/sequel/plugins/association_pks.rb,
lib/sequel/plugins/boolean_readers.rb,
lib/sequel/plugins/defaults_setter.rb,
lib/sequel/plugins/json_serializer.rb,
lib/sequel/plugins/lazy_attributes.rb,
lib/sequel/plugins/string_stripper.rb,
lib/sequel/plugins/instance_filters.rb,
lib/sequel/plugins/typecast_on_load.rb,
lib/sequel/plugins/many_through_many.rb,
lib/sequel/plugins/nested_attributes.rb,
lib/sequel/plugins/hook_class_methods.rb,
lib/sequel/plugins/optimistic_locking.rb,
lib/sequel/plugins/update_primary_key.rb,
lib/sequel/plugins/validation_helpers.rb,
lib/sequel/plugins/association_proxies.rb,
lib/sequel/plugins/prepared_statements.rb,
lib/sequel/plugins/skip_create_refresh.rb,
lib/sequel/plugins/tactical_eager_loading.rb,
lib/sequel/plugins/class_table_inheritance.rb,
lib/sequel/plugins/association_dependencies.rb,
lib/sequel/plugins/prepared_statements_safe.rb,
lib/sequel/plugins/single_table_inheritance.rb,
lib/sequel/plugins/validation_class_methods.rb,
lib/sequel/plugins/association_autoreloading.rb,
lib/sequel/plugins/prepared_statements_with_pk.rb,
lib/sequel/plugins/prepared_statements_associations.rb,
lib/sequel/plugins/serialization_modification_detection.rb
Overview
Empty namespace that plugins should use to store themselves, so they can be loaded via Model.plugin.
Plugins should be modules with one of the following conditions:
-
A singleton method named apply, which takes a model, additional arguments, and an optional block. This is called the first time the plugin is loaded for this model (unless it was already loaded by an ancestor class), before including/extending any modules, with the arguments and block provided to the call to Model.plugin.
-
A module inside the plugin module named InstanceMethods, which will be included in the model class.
-
A module inside the plugin module named ClassMethods, which will extend the model class.
-
A module inside the plugin module named DatasetMethods, which will extend the model’s dataset.
-
A singleton method named configure, which takes a model, additional arguments, and an optional block. This is called every time the Model.plugin method is called, after including/extending any modules.
Defined Under Namespace
Modules: ActiveModel, AssociationAutoreloading, AssociationDependencies, AssociationPks, AssociationProxies, BooleanReaders, Caching, ClassTableInheritance, Composition, DefaultsSetter, ForceEncoding, HookClassMethods, IdentityMap, InstanceFilters, InstanceHooks, JsonSerializer, LazyAttributes, List, ManyThroughMany, NestedAttributes, OptimisticLocking, PreparedStatements, PreparedStatementsAssociations, PreparedStatementsSafe, PreparedStatementsWithPk, RcteTree, Schema, Serialization, SerializationModificationDetection, Sharding, SingleTableInheritance, SkipCreateRefresh, StringStripper, Subclasses, TacticalEagerLoading, Timestamps, Touch, Tree, TypecastOnLoad, UpdatePrimaryKey, ValidationClassMethods, ValidationHelpers, XmlSerializer