Skip to content

Instantly share code, notes, and snippets.

@practicingruby
Created May 31, 2012 14:18
Show Gist options
  • Select an option

  • Save practicingruby/2843677 to your computer and use it in GitHub Desktop.

Select an option

Save practicingruby/2843677 to your computer and use it in GitHub Desktop.
articles = BrokenRecord::Table.new(:name => "articles",
:db => BrokenRecord.database)
articles.insert(:body => "Hey joe", :title => "blah")
articles.delete(:id => 10)
articles.columns
(return array of hashes)
articles.all
(select * from articles), returns an array of hashes
articles.where(:id => 10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment