summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAsbjørn Sloth Tønnesen <ast@2e8.dk>2020-06-03 21:10:34 +0000
committerAsbjørn Sloth Tønnesen <ast@2e8.dk>2020-06-03 21:10:34 +0000
commit7f6472d0eaea30d38ce2002c0dcc96ca9e12a8b7 (patch)
tree02dfcde3faddbc82385295d1f77d3cb7d45b74de
parentfdfecee2044cd1ea80012cdf9f0b4cf96089deb0 (diff)
downloadlem-postgres-7f6472d0eaea30d38ce2002c0dcc96ca9e12a8b7.tar.gz
lem-postgres-7f6472d0eaea30d38ce2002c0dcc96ca9e12a8b7.tar.xz
lem-postgres-7f6472d0eaea30d38ce2002c0dcc96ca9e12a8b7.zip
queued: add missing methodsHEADmaster
Signed-off-by: Asbjørn Sloth Tønnesen <ast@2e8.dk>
-rw-r--r--lem/postgres/queued.lua4
-rwxr-xr-xtest.lua5
2 files changed, 8 insertions, 1 deletions
diff --git a/lem/postgres/queued.lua b/lem/postgres/queued.lua
index f405dc0..bfedd3f 100644
--- a/lem/postgres/queued.lua
+++ b/lem/postgres/queued.lua
@@ -82,6 +82,10 @@ end
QConnection.exec = wrap(Connection.exec)
QConnection.prepare = wrap(Connection.prepare)
QConnection.run = wrap(Connection.run)
+QConnection.get = wrap(Connection.get)
+QConnection.put = wrap(Connection.put)
+QConnection.done = wrap(Connection.done)
+QConnection.reset = wrap(Connection.reset)
local qconnect
do
diff --git a/test.lua b/test.lua
index 80f774f..c570427 100755
--- a/test.lua
+++ b/test.lua
@@ -58,7 +58,8 @@ do
end
local utils = require 'lem.utils'
-local postgres = require 'lem.postgres'
+--local postgres = require 'lem.postgres'
+local postgres = require 'lem.postgres.queued'
local dbconnstr = [[
host=localhost
@@ -69,6 +70,8 @@ dbname=mydb
local db = assert(postgres.connect(dbconnstr))
+assert(db:reset())
+
assert(db:exec(
'CREATE TEMPORARY TABLE mytable (id serial PRIMARY KEY, name TEXT, foo integer)'))