Module: CollectiveIdea::Acts::NestedSet::Columns
- Defined in:
- lib/awesome_nested_set/columns.rb
Overview
:nodoc:
Instance Method Summary collapse
- #counter_cache_column_name ⇒ Object
- #depth_column_name ⇒ Object
- #left_column_name ⇒ Object
- #model_connection ⇒ Object
- #order_column_name ⇒ Object
- #parent_column_name ⇒ Object
- #primary_column_name ⇒ Object
- #quoted_depth_column_name ⇒ Object
- #quoted_left_column_full_name ⇒ Object
- #quoted_left_column_name ⇒ Object
- #quoted_order_column_full_name ⇒ Object
- #quoted_order_column_name ⇒ Object
- #quoted_parent_column_full_name ⇒ Object
- #quoted_parent_column_name ⇒ Object
- #quoted_primary_column_name ⇒ Object
- #quoted_primary_key_column_full_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
#counter_cache_column_name ⇒ Object
34 35 36 |
# File 'lib/awesome_nested_set/columns.rb', line 34 def counter_cache_column_name [:counter_cache] end |
#depth_column_name ⇒ Object
14 15 16 |
# File 'lib/awesome_nested_set/columns.rb', line 14 def depth_column_name [:depth_column] end |
#left_column_name ⇒ Object
6 7 8 |
# File 'lib/awesome_nested_set/columns.rb', line 6 def left_column_name [:left_column] end |
#model_connection ⇒ Object
86 87 88 |
# File 'lib/awesome_nested_set/columns.rb', line 86 def model_connection self.is_a?(Class) ? self.connection : self.class.connection end |
#order_column_name ⇒ Object
26 27 28 |
# File 'lib/awesome_nested_set/columns.rb', line 26 def order_column_name [:order_column] || left_column_name end |
#parent_column_name ⇒ Object
18 19 20 |
# File 'lib/awesome_nested_set/columns.rb', line 18 def parent_column_name [:parent_column] end |
#primary_column_name ⇒ Object
22 23 24 |
# File 'lib/awesome_nested_set/columns.rb', line 22 def primary_column_name [:primary_column] end |
#quoted_depth_column_name ⇒ Object
46 47 48 |
# File 'lib/awesome_nested_set/columns.rb', line 46 def quoted_depth_column_name model_connection.quote_column_name(depth_column_name) end |
#quoted_left_column_full_name ⇒ Object
74 75 76 |
# File 'lib/awesome_nested_set/columns.rb', line 74 def quoted_left_column_full_name "#{quoted_table_name}.#{quoted_left_column_name}" end |
#quoted_left_column_name ⇒ Object
38 39 40 |
# File 'lib/awesome_nested_set/columns.rb', line 38 def quoted_left_column_name model_connection.quote_column_name(left_column_name) end |
#quoted_order_column_full_name ⇒ Object
70 71 72 |
# File 'lib/awesome_nested_set/columns.rb', line 70 def quoted_order_column_full_name "#{quoted_table_name}.#{quoted_order_column_name}" end |
#quoted_order_column_name ⇒ Object
62 63 64 |
# File 'lib/awesome_nested_set/columns.rb', line 62 def quoted_order_column_name model_connection.quote_column_name(order_column_name) end |
#quoted_parent_column_full_name ⇒ Object
82 83 84 |
# File 'lib/awesome_nested_set/columns.rb', line 82 def quoted_parent_column_full_name "#{quoted_table_name}.#{quoted_parent_column_name}" end |
#quoted_parent_column_name ⇒ Object
54 55 56 |
# File 'lib/awesome_nested_set/columns.rb', line 54 def quoted_parent_column_name model_connection.quote_column_name(parent_column_name) end |
#quoted_primary_column_name ⇒ Object
50 51 52 |
# File 'lib/awesome_nested_set/columns.rb', line 50 def quoted_primary_column_name model_connection.quote_column_name(primary_column_name) end |
#quoted_primary_key_column_full_name ⇒ Object
66 67 68 |
# File 'lib/awesome_nested_set/columns.rb', line 66 def quoted_primary_key_column_full_name "#{quoted_table_name}.#{quoted_primary_column_name}" end |
#quoted_right_column_full_name ⇒ Object
78 79 80 |
# File 'lib/awesome_nested_set/columns.rb', line 78 def quoted_right_column_full_name "#{quoted_table_name}.#{quoted_right_column_name}" end |
#quoted_right_column_name ⇒ Object
42 43 44 |
# File 'lib/awesome_nested_set/columns.rb', line 42 def quoted_right_column_name model_connection.quote_column_name(right_column_name) end |
#quoted_scope_column_names ⇒ Object
58 59 60 |
# File 'lib/awesome_nested_set/columns.rb', line 58 def quoted_scope_column_names scope_column_names.collect {|column_name| connection.quote_column_name(column_name) } end |
#right_column_name ⇒ Object
10 11 12 |
# File 'lib/awesome_nested_set/columns.rb', line 10 def right_column_name [:right_column] end |
#scope_column_names ⇒ Object
30 31 32 |
# File 'lib/awesome_nested_set/columns.rb', line 30 def scope_column_names Array([:scope]) end |