Module: TinySupport::ActiveRecord::NestedSet::Columns
- Defined in:
- lib/tiny_support/active_record/nested_set.rb
Overview
Mixed into both classes and instances to provide easy access to the column names
Instance Method Summary collapse
- #depth_column_name ⇒ Object
- #left_column_name ⇒ Object
- #order_column ⇒ Object
- #parent_column_name ⇒ Object
- #quoted_depth_column_name ⇒ Object
- #quoted_left_column_full_name ⇒ Object
- #quoted_left_column_name ⇒ Object
- #quoted_parent_column_full_name ⇒ Object
- #quoted_parent_column_name ⇒ Object
- #quoted_right_column_full_name ⇒ Object
- #quoted_right_column_name ⇒ Object
- #quoted_scope_column_names ⇒ Object
- #right_column_name ⇒ Object
- #scope_column_names ⇒ Object
Instance Method Details
#depth_column_name ⇒ Object
770 771 772 |
# File 'lib/tiny_support/active_record/nested_set.rb', line 770 def depth_column_name [:depth_column] end |
#left_column_name ⇒ Object
762 763 764 |
# File 'lib/tiny_support/active_record/nested_set.rb', line 762 def left_column_name [:left_column] end |
#order_column ⇒ Object
778 779 780 |
# File 'lib/tiny_support/active_record/nested_set.rb', line 778 def order_column [:order_column] || left_column_name end |
#parent_column_name ⇒ Object
774 775 776 |
# File 'lib/tiny_support/active_record/nested_set.rb', line 774 def parent_column_name [:parent_column] end |
#quoted_depth_column_name ⇒ Object
794 795 796 |
# File 'lib/tiny_support/active_record/nested_set.rb', line 794 def quoted_depth_column_name connection.quote_column_name(depth_column_name) end |
#quoted_left_column_full_name ⇒ Object
806 807 808 |
# File 'lib/tiny_support/active_record/nested_set.rb', line 806 def quoted_left_column_full_name "#{quoted_table_name}.#{quoted_left_column_name}" end |
#quoted_left_column_name ⇒ Object
786 787 788 |
# File 'lib/tiny_support/active_record/nested_set.rb', line 786 def quoted_left_column_name connection.quote_column_name(left_column_name) end |
#quoted_parent_column_full_name ⇒ Object
814 815 816 |
# File 'lib/tiny_support/active_record/nested_set.rb', line 814 def quoted_parent_column_full_name "#{quoted_table_name}.#{quoted_parent_column_name}" end |
#quoted_parent_column_name ⇒ Object
798 799 800 |
# File 'lib/tiny_support/active_record/nested_set.rb', line 798 def quoted_parent_column_name connection.quote_column_name(parent_column_name) end |
#quoted_right_column_full_name ⇒ Object
810 811 812 |
# File 'lib/tiny_support/active_record/nested_set.rb', line 810 def quoted_right_column_full_name "#{quoted_table_name}.#{quoted_right_column_name}" end |
#quoted_right_column_name ⇒ Object
790 791 792 |
# File 'lib/tiny_support/active_record/nested_set.rb', line 790 def quoted_right_column_name connection.quote_column_name(right_column_name) end |
#quoted_scope_column_names ⇒ Object
802 803 804 |
# File 'lib/tiny_support/active_record/nested_set.rb', line 802 def quoted_scope_column_names scope_column_names.collect {|column_name| connection.quote_column_name(column_name) } end |
#right_column_name ⇒ Object
766 767 768 |
# File 'lib/tiny_support/active_record/nested_set.rb', line 766 def right_column_name [:right_column] end |
#scope_column_names ⇒ Object
782 783 784 |
# File 'lib/tiny_support/active_record/nested_set.rb', line 782 def scope_column_names Array([:scope]) end |