Class: KSExpression::Context
Instance Attribute Summary collapse
-
#distinct ⇒ Object
readonly
Returns the value of attribute distinct.
-
#joins ⇒ Object
readonly
Returns the value of attribute joins.
-
#limits ⇒ Object
readonly
Returns the value of attribute limits.
-
#select ⇒ Object
readonly
Returns the value of attribute select.
-
#select_table ⇒ Object
readonly
Returns the value of attribute select_table.
-
#sort_fields ⇒ Object
readonly
Returns the value of attribute sort_fields.
-
#tables ⇒ Object
readonly
Returns the value of attribute tables.
Instance Method Summary collapse
-
#initialize(*tables) ⇒ Context
constructor
A new instance of Context.
Constructor Details
#initialize(*tables) ⇒ Context
Returns a new instance of Context.
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/kansas/Expression.rb', line 26 def initialize(*tables) # @select = tables.collect {|t| t.table_name} @select = tables[0].table_name @select_table = tables[0] @tables = [] @joins = [] @sort_fields = [] @limits = [] @distinct = {} end |
Instance Attribute Details
#distinct ⇒ Object (readonly)
Returns the value of attribute distinct.
24 25 26 |
# File 'lib/kansas/Expression.rb', line 24 def distinct @distinct end |
#joins ⇒ Object (readonly)
Returns the value of attribute joins.
24 25 26 |
# File 'lib/kansas/Expression.rb', line 24 def joins @joins end |
#limits ⇒ Object (readonly)
Returns the value of attribute limits.
24 25 26 |
# File 'lib/kansas/Expression.rb', line 24 def limits @limits end |
#select ⇒ Object (readonly)
Returns the value of attribute select.
24 25 26 |
# File 'lib/kansas/Expression.rb', line 24 def select @select end |
#select_table ⇒ Object (readonly)
Returns the value of attribute select_table.
24 25 26 |
# File 'lib/kansas/Expression.rb', line 24 def select_table @select_table end |
#sort_fields ⇒ Object (readonly)
Returns the value of attribute sort_fields.
24 25 26 |
# File 'lib/kansas/Expression.rb', line 24 def sort_fields @sort_fields end |
#tables ⇒ Object (readonly)
Returns the value of attribute tables.
24 25 26 |
# File 'lib/kansas/Expression.rb', line 24 def tables @tables end |