aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2024-06-10 01:13:23 +0000
committerterminaldweller <devi@terminaldweller.com>2024-06-10 01:13:23 +0000
commitd1af44bed4e714799b7dedab7cb2909ec7dffb8b (patch)
treed9349e463203405239956eb66c80ec1a61486ae9 /plugins
parentfixes #33 (diff)
downloadmilla-d1af44bed4e714799b7dedab7cb2909ec7dffb8b.tar.gz
milla-d1af44bed4e714799b7dedab7cb2909ec7dffb8b.zip
added a new lua function, query_db
Diffstat (limited to 'plugins')
-rw-r--r--plugins/test.lua16
1 files changed, 13 insertions, 3 deletions
diff --git a/plugins/test.lua b/plugins/test.lua
index afd998c..fee865e 100644
--- a/plugins/test.lua
+++ b/plugins/test.lua
@@ -5,8 +5,7 @@ local function sleep(n)
while os.clock() - t0 <= n do end
end
-local function printer()
-
+local function test_printer()
local config = milla.toml_config.new()
print(config:IrcServer())
config:IrcServer("irc.libera.chat")
@@ -18,4 +17,15 @@ local function printer()
end
end
-printer()
+local function test_query()
+ local query =
+ "select log from liberanet_milla_us_market_news order by log desc;"
+ local result = milla.query_db(query)
+
+ print(result)
+
+ for _, v in ipairs(result) do print(v) end
+end
+
+-- test_printer()
+test_query()