Class: Mssql

Inherits:
Object
  • Object
show all
Defined in:
lib/adapters/mssql.rb

Instance Method Summary collapse

Constructor Details

#initialize(details) ⇒ Mssql

Returns a new instance of Mssql.



5
6
7
# File 'lib/adapters/mssql.rb', line 5

def initialize(details)
  @client = TinyTds::Client.new(details)
end

Instance Method Details

#fields(table) ⇒ Object



13
14
15
# File 'lib/adapters/mssql.rb', line 13

def fields(table)
  query('select * from ' + table.to_s).fields
end

#query(sql) ⇒ Object



9
10
11
# File 'lib/adapters/mssql.rb', line 9

def query(sql)
 @client.execute(sql)
end