class DataImp::Tds::Table
Attributes
client[R]
schema[R]
table[R]
Public Class Methods
new(client, table, schema: @client = client)
click to toggle source
# File lib/data_imp/tds/table.rb, line 3 def initialize client, table, schema: @client = client @table = table @schema = schema end
Public Instance Methods
each(&block)
click to toggle source
# File lib/data_imp/tds/table.rb, line 21 def each &block result.each &block end
result()
click to toggle source
# File lib/data_imp/tds/table.rb, line 17 def result @result ||= client.execute(sql) end
sql()
click to toggle source
# File lib/data_imp/tds/table.rb, line 9 def sql if schema "select * from [#{schema}].[#{table}]" else "select * from [#{table}]" end end