class RedshiftConnector::SelectAllQuery
Public Class Methods
new(schema:, table:, columns:)
click to toggle source
# File lib/redshift_connector/query.rb, line 26 def initialize(schema:, table:, columns:) @schema = schema @table = table @columns = columns end
Public Instance Methods
description()
click to toggle source
# File lib/redshift_connector/query.rb, line 36 def description "#{table_spec} (#{@columns.join(', ')})" end
table_spec()
click to toggle source
# File lib/redshift_connector/query.rb, line 32 def table_spec "#{@schema}.#{@table}" end
to_sql()
click to toggle source
# File lib/redshift_connector/query.rb, line 40 def to_sql "select #{@columns.map {|c| %Q("#{c}") }.join(', ')}" \ + " from #{table_spec}" end