2015-11-05 58 views
2

在php codeigniter FW中,我可以通过使用get_compiled_select()方法轻松完成。将rails activerecord转换为raw sql

是否有任何方法可以将查询构建通过活动记录转换为原始sql。 例如:

User.find_by_name("abc") 

应返回原查询脚本像

select * from user where name = "abc" 

回答