How do you manually execute SQL commands in Ruby On Rails using NuoDB

前端 未结 4 1925
醉梦人生
醉梦人生 2020-12-22 19:38

I\'m trying to manually execute SQL commands so I can access procedures in NuoDB.

I\'m using Ruby on Rails and I\'m using the following command:

Acti         


        
4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-22 20:12

    Reposting the answer from our forum to help others with a similar issue:

    @connection = ActiveRecord::Base.connection
    result = @connection.exec_query('select tablename from system.tables')
    result.each do |row|
    puts row
    end
    

提交回复
热议问题