From 7f6472d0eaea30d38ce2002c0dcc96ca9e12a8b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= Date: Wed, 3 Jun 2020 21:10:34 +0000 Subject: queued: add missing methods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Asbjørn Sloth Tønnesen --- lem/postgres/queued.lua | 4 ++++ test.lua | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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)')) -- cgit v1.2.1