diff options
author | Asbjørn Sloth Tønnesen <ast@2e8.dk> | 2020-06-03 21:10:34 +0000 |
---|---|---|
committer | Asbjørn Sloth Tønnesen <ast@2e8.dk> | 2020-06-03 21:10:34 +0000 |
commit | 7f6472d0eaea30d38ce2002c0dcc96ca9e12a8b7 (patch) | |
tree | 02dfcde3faddbc82385295d1f77d3cb7d45b74de | |
parent | fdfecee2044cd1ea80012cdf9f0b4cf96089deb0 (diff) | |
download | lem-postgres-7f6472d0eaea30d38ce2002c0dcc96ca9e12a8b7.tar.gz lem-postgres-7f6472d0eaea30d38ce2002c0dcc96ca9e12a8b7.tar.xz lem-postgres-7f6472d0eaea30d38ce2002c0dcc96ca9e12a8b7.zip |
Signed-off-by: Asbjørn Sloth Tønnesen <ast@2e8.dk>
-rw-r--r-- | lem/postgres/queued.lua | 4 | ||||
-rwxr-xr-x | test.lua | 5 |
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 @@ -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)')) |