Sha256: 14164ac785ee448a6c363cb6a82be6acc9dcf40d6510d225962d15368e03d176

Contents?: true

Size: 759 Bytes

Versions: 22

Compression:

Stored size: 759 Bytes

Contents

class DatabaseMethods
  def self.execute_select (schema,sql)
    case $db_type.to_sym
      when :sql_server then
        conn = IFD_Connections.get_sql_server_db_connection(schema)
        conn.execute sql
      when :mysql then
        conn = IFD_Connections.get_mysql_db_connection(schema)
        conn.query sql
      else
        raise "*** ERROR: schema type (#{$db_type}) is not supported (SQL SERVER, MY SQL)."
    end
  end

  def self.close_connection (schema)
    case $db_type.to_sym
      when :sql_server then
        conn = IFD_Connections.get_sql_server_db_connection(schema)
        conn.close
      when :mysql then
        conn = IFD_Connections.get_mysql_db_connection(schema)
        conn.close
    end
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
Ifd_Automation-1.6.0 lib/Ifd_Automation/methods/database_methods.rb
Ifd_Automation-1.5.0 lib/Ifd_Automation/methods/database_methods.rb
Ifd_Automation-1.4.0 lib/Ifd_Automation/methods/database_methods.rb
Ifd_Automation-1.3.0 lib/Ifd_Automation/methods/database_methods.rb
Ifd_Automation-1.2.0 lib/Ifd_Automation/methods/database_methods.rb
Ifd_Automation-1.1.0 lib/Ifd_Automation/methods/database_methods.rb
Ifd_Mobile-1.0.0 lib/Ifd_Mobile/methods/database_methods.rb
Ifd_Automation-1.0 lib/Ifd_Automation/methods/database_methods.rb
Ifd_Mobile-0.1.8 lib/Ifd_Mobile/methods/database_methods.rb
Ifd_Automation-0.1.8 lib/Ifd_Automation/methods/database_methods.rb
Ifd_Automation-0.1.7 lib/Ifd_Automation/methods/database_methods.rb
Ifd_Automation-0.1.6 lib/Ifd_Automation/methods/database_methods.rb
Ifd_Automation-0.1.5 lib/Ifd_Automation/methods/database_methods.rb
Ifd_Automation-0.1.4 lib/Ifd_Automation/methods/database_methods.rb
Ifd_Automation-0.1.3 lib/Ifd_Automation/methods/database_methods.rb
Ifd_Automation-0.1.2 lib/Ifd_Automation/methods/database_methods.rb
Ifd_Automation-0.1.1 lib/Ifd_Automation/methods/database_methods.rb
Ifd_Automation-0.1.0 lib/Ifd_Automation/methods/database_methods.rb
anhpham-0.1.4 lib/anhpham/methods/database_methods.rb
anhpham-0.1.3 lib/anhpham/methods/database_methods.rb