Sequel::Model is an object relational mapper built on top of
Sequel core. Each model class is backed by a dataset instance, and many dataset methods can be called directly on the class.
Model datasets return rows as model instances, which are wrappers around the underlying hash that allow easily updating or deleting the individual row.
Sequel::Model is built completely out of plugins.
Plugins can override any class, instance, or dataset method defined by a previous plugin and call super to get the default behavior. By default,
Sequel::Model loads two plugins,
Sequel::Model (which is itself a plugin) for the base support, and
Sequel::Model::Associations for the associations support.
You can set the
SEQUEL_NO_ASSOCIATIONS constant or environment variable to make
Sequel not load the associations plugin by default.
Classes and Modules
|HOOKS||=||[ :after_create, :after_destroy, :after_save, :after_update, :after_validation, :before_create, :before_destroy, :before_save, :before_update, :before_validation ].freeze||
Empty instance methods to create that the user can override. Just like any other method defined by
The setter methods (methods ending with =) that are never allowed to be called automatically via