lua-resty-query
convenient wrapper for lua-resty-mysql and pgmoon
$ opm get xiangnanscu/lua-resty-query
lua-resty-query
Wrapper for querying mysql and postgresql database in Openresty. Just config database -> Give sql string -> get data
Requirements
Synopsis
local Query = require"resty.query.postgresql"
-- config your database and get a query function
local query = Query{
HOST = 'localhost',
PORT = 5432,
USER = 'postgres',
PASSWORD = '111111',
DATABASE = 'test',
POOL_SIZE = 50,
}
-- now use this function in your controllers
local res, err = query('select * from "user"')
if err then
return err
end
Authors
Nan Xiang(@xiangnanscu)
License
mit
Dependencies
openresty/lua-resty-mysql, openresty, leafo/pgmoon
Versions
-
convenient wrapper for lua-resty-mysql and pgmoon 2018-03-18 11:38:34
-
convenient wrapper for lua-resty-mysql or pgmoon 2018-03-18 07:24:34