A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Ruby: Read+write to database


require 'sqlite3'

db = SQLite3::Database.new( "db1" )
db.execute('INSERT INTO table_name (id, text) VALUES (1, "hello")')
db.execute( "SELECT* FROM table_name" ) do |row|
    puts row.inspect
end