[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: [ANN] cqueues-pgsql 0.1 release
- From: Daurnimator <quae@...>
- Date: Mon, 29 Aug 2016 02:08:31 +1000
This is a project of mine that has been sitting without a release for
a long time now.
With luapgsql recently getting the last fixes I was waiting for, I
figured it's time to do a proper release.
cqueues-pgsql is a library that wraps luapgsql to be non-blocking when
in a cqueues managed thread.
The API should be the same as luapgsql; if it diverges, file a bug with me :)
Available on luarocks: https://luarocks.org/modules/daurnimator/cqueues-pgsql/
Q. What is luapgsql?
A. Bindings to libpq, i.e. a postgresql client.
Q. What is cqueues?
A. A library for cooperative threading in lua.
Q. When do I want to use cqueues-pgsql?
A. When you want to talk to postgres without blocking your entire
Q. So I can only use it in a cqueues managed thread/application?
A. No! if used outside of a cqueues managed thread, cqueues-pgsql will
appear to operate in a blocking manner.
i.e. it will look and behave just like luapgsql.
Q. Show me an example!
A. That's not a question, but okay:
Lua 5.3.3 Copyright (C) 1994-2016 Lua.org, PUC-Rio
> require"cqueues_pgsql".connectdb"":exec("SELECT 42"):getvalue(1,1)