No commit activity in last 3 years
No release in over 3 years
Alternative to single and class table inheritance plugins for sequel
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.9
~> 10.0
>= 0

Runtime

~> 4.22
 Project Readme

NOT MAINTAINED¶ ↑

The functionality of this plugin was integrated into Sequel 4.24. Use that instead.

Sequel Hybrid Table Inheritance¶ ↑

This is a sequel plugin that combines the functionality of the single and class table inheritance plugins. This plugin uses the single_table_inheritance plugin and should work as a drop in replacement for the class_table_inheritance plugin. This allows using new tables for subclasses only when need for additional columns or possibly referential integrity to exclusively subclassed rows.

Additional features over the class table inheritance plugin¶ ↑

For class table inheritance use this provides additional functionality beyond the standard class_table_inheritance plugin including the following:

  • Eager loading in addition to lazy loading of subclasses.

  • Use RETURNING * on insert if available avoiding a select query after new model saves

  • Features found in the single_table_inheritance not in class_table_inheritance Notably the key_map, key_chooser options and accepting a proc in addition to a hash for model_map option

Using sequel-table_inheritance¶ ↑

Include the sequel-hybrid_table gem in your Gemfile

gem "sequel-table_inheritance"

run “bundle install” if needed

The hybrid_table_inheritance plugin should now work like any other sequel plugin. You should be able to use in place of the class_table_inheritance plugin.

Full documentation available at www.rubydoc.info/gems/sequel-table_inheritance/Sequel/Plugins/HybridTableInheritance