summaryrefslogtreecommitdiff
path: root/db-query.rb
diff options
context:
space:
mode:
authorpks <pks@pks.rocks>2020-09-27 20:55:18 +0200
committerpks <pks@pks.rocks>2020-09-27 20:55:18 +0200
commit1123b0db81b6057e113f16a1ddea15c36b7b3d79 (patch)
treeb749c4cc5c3a63441ad408d56dd84cc7645a6201 /db-query.rb
init
Diffstat (limited to 'db-query.rb')
-rwxr-xr-xdb-query.rb14
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