rails模型中的资料库语法

  • where
  • select
  • group
  • order
  • limit
  • offset
  • joins
  • includes
  • lock
  • readonly
  • from
  • Client.find(10) == SELECT * FROM clients WHERE (clients.PRIMARY_KEY = 10)
http://guides.ruby.tw/rails3/active_record_querying.html

你可能感兴趣的:(rails模型中的资料库语法)