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

前端 未结 4 1888
醉梦人生
醉梦人生 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:04

    For me, I couldn't get this to return a hash.

    results = ActiveRecord::Base.connection.execute(sql)
    

    But using the exec_query method worked.

    results = ActiveRecord::Base.connection.exec_query(sql)
    

提交回复
热议问题