diff options
author | pks <pks@pks.rocks> | 2020-09-27 20:55:18 +0200 |
---|---|---|
committer | pks <pks@pks.rocks> | 2020-09-27 20:55:18 +0200 |
commit | 1123b0db81b6057e113f16a1ddea15c36b7b3d79 (patch) | |
tree | b749c4cc5c3a63441ad408d56dd84cc7645a6201 /db-query.rb |
init
Diffstat (limited to 'db-query.rb')
-rwxr-xr-x | db-query.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/db-query.rb b/db-query.rb new file mode 100755 index 0000000..3a3fa70 --- /dev/null +++ b/db-query.rb @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby + +require 'sqlite3' + +def main + db = SQLite3::Database.new ARGV[0] + db.execute("select * from power") do |result| + puts result.to_s + end + db.close +end + + +main |