Permalink
Browse files

add in demonstration of primary_key method

  • Loading branch information...
1 parent f29cfff commit 7c0583f2a5d7b11adceb8eb129e1301404141ee8 @jackdempsey jackdempsey committed with Dec 2, 2008
Showing with 2 additions and 1 deletion.
  1. +1 −0 README
  2. +1 −1 www/pages/index
View
1 README
@@ -41,6 +41,7 @@ If you have any comments or suggestions please post to the Google group.
DB = Sequel.sqlite # memory database
DB.create_table :items do # Create a new table
+ primary_key :id
column :name, :text
column :price, :float
end
View
@@ -15,7 +15,7 @@
<span class='comment'># create an items table</span>
<span class='constant'>DB</span><span class='punct'>.</span><span class='ident'>create_table</span> <span class='symbol'>:items</span> <span class='keyword'>do</span>
-
+ <span class='ident'>primary_key</span> <span class='symbol'>:id</span>
<span class='ident'>column</span> <span class='symbol'>:name</span><span class='punct'>,</span> <span class='symbol'>:text</span>
<span class='ident'>column</span> <span class='symbol'>:price</span><span class='punct'>,</span> <span class='symbol'>:float</span>
<span class='keyword'>end</span>

0 comments on commit 7c0583f

Please sign in to comment.