diff options
author | Patrick Simianer <pks@pks.rocks> | 2019-01-27 00:27:21 +0100 |
---|---|---|
committer | Patrick Simianer <pks@pks.rocks> | 2019-01-27 00:27:21 +0100 |
commit | 843bb50c48a8b11c572c1e64e0237d09d635e1f0 (patch) | |
tree | 60fe62048b80ef392b275e77df69748e41fd81df /query-db.rb |
init
Diffstat (limited to 'query-db.rb')
-rwxr-xr-x | query-db.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/query-db.rb b/query-db.rb new file mode 100755 index 0000000..2418c7d --- /dev/null +++ b/query-db.rb @@ -0,0 +1,20 @@ +#!/usr/bin/env ruby + +require 'sqlite3' + +db = SQLite3::Database.new("weather.db") + +db.execute("select * from rain") do |result| + puts result.to_s +end + +#db.execute("select * from wind") do |result| +# puts result.to_s +#end + +#db.execute("select * from temp") do |result| +# puts result.to_s +#end + +db.close + |