Guest User

Untitled

a guest
Oct 15th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. articles = BrokenRecord::Table.new(:name => "articles",
  2. :db => BrokenRecord.database)
  3.  
  4. articles.insert(:body => "Hey joe", :title => "blah")
  5. articles.delete(:id => 10)
  6. articles.columns
  7. (return array of hashes)
  8.  
  9. articles.all
  10. (select * from articles), returns an array of hashes
  11.  
  12. articles.where(:id => 10)
Add Comment
Please, Sign In to add comment