lua-resty-mysql icon indicating copy to clipboard operation
lua-resty-mysql copied to clipboard

Nonblocking Lua MySQL driver library for ngx_lua or OpenResty

Results 57 lua-resty-mysql issues
Sort by recently updated
recently updated
newest added

```lua db:query("select * from t_batch where id = 1") ``` i get a row: where: id, orgid become a string ```mysql drop table if exists `t_batch`; create table `t_batch` (...

there is a error in our lua program which I want to query a infomation in mysql. How do I resolve this problem. database configuration as follows: mysql> SHOW VARIABLES...

mysql驱动的实现方式是构造消息包通过nio发送来达到不阻塞的目的。那就有个问题,如果做两次查询,能否确保先做的查询必然先被mysql服务端处理完毕,并且先返回给客户端呢?

> During the process when I utilized the lib., the below error occurred occasionally. What makes me confused is that the value of variable "packet_no" can be "nil". I have...

Hi @agentzh , According pull request #49 , > Just for the record, we'll redo this atop a new OpenResty builtin API for better performance. We already use the new...

do support mysql's prepare statement. there are two ways for calling: ``` lua -- first way mysql:new db:connect db:run -- another way mysql:new db:connect db:prepare db:execute db:set_keepalive ``` PS: It's...

lua文档: lua_Number typedef double lua_Number; lua源码: #define LUA_NUMBER long double 在代码中看到了这个注释: -- converters[0x08] = tonumber -- long long 请问注释的原因,是因为 lua语言5.3以前的版本不能完整支持64比特位数字导致的吗?如果不是,那具体是什么原因?

ngx.header.content_type="application/json;charset=utf8" local cjson = require("cjson") local mysql = require("resty.mysql") local uri_args = ngx.req.get_uri_args() local id = uri_args["id"] local db,err = mysql:new() if not db then ngx.say("failed to instantiate mysql: ",err)...

What is the best way to check if result returned by :query is empty? Atm I'm doing `if not res or cjson.encode(res) == '{}' then` but I feel that having...