Method: OraUtils::OracleAccess#sql

Defined in:
lib/orabase/utils/oracle_access.rb

#sql(command, options = {}) ⇒ Object

Use this function to execute Oracle statements

Parameters:

  • command (String)

    this is the commands to be given



92
93
94
95
96
97
98
# File 'lib/orabase/utils/oracle_access.rb', line 92

def sql( command, options = {})
  options.merge!(:timeout => self[:timeout]) if timeout_specified
  @sql = Sql.new(options)
  sid = @sql.sid
  csv_string = @sql.execute(command)
  add_sid_to(convert_csv_data_to_hash(csv_string, [], :converters=> lambda {|f| f ? f.strip : nil}),sid)
end