Class: Tutuf::VisualQuery::Sql

Inherits:
Common
  • Object
show all
Defined in:
lib/tutuf/visual_query/sql.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Common

connection, #filters_to_a, quote_ident, quote_relation_name

Constructor Details

#initialize(params) ⇒ Sql

Returns a new instance of Sql.



5
6
7
# File 'lib/tutuf/visual_query/sql.rb', line 5

def initialize(params)
  @sql = params['sql']
end

Instance Attribute Details

#sql=(value) ⇒ Object (writeonly)

Sets the attribute sql

Parameters:

  • value

    the value to set the attribute sql to.



9
10
11
# File 'lib/tutuf/visual_query/sql.rb', line 9

def sql=(value)
  @sql = value
end

Instance Method Details

#filtersObject



11
12
13
# File 'lib/tutuf/visual_query/sql.rb', line 11

def filters
  []
end

#queryObject



15
16
17
# File 'lib/tutuf/visual_query/sql.rb', line 15

def query
  @sql
end