#app.rb
DB = Sequel.sqlite # memory database, requires sqlite3
DB.create_table :items do
primary_key :id
String :name
Float :price
end
#this is the database that needs to populated
items = DB[:items] # Create a dataset
# Populate the table
items.insert(:name => 'URL')
items.insert(:name => 'sign in requirements')
# Print out the number of records
puts "Item count: #{items.count}"
# Print out the database
puts "{items.list(:name)}"
end
return message
end
Click to Expand
Content Rating
Is this a good/useful/informative piece of content to include in the project? Have your say!
You must login before you can post a comment. .