lotusflare/fork-lua-cassandra ? reverse-engineered prompt
Reverse engineered prompt
Build me a pure Lua client library for Apache Cassandra that works with both plain Lua and OpenResty.
I want a simple single host client that can connect to one Cassandra node, run simple, prepared, and batch queries, handle pagination, support SSL and username password auth, and return rows in a nice Lua friendly way. It should work in Lua 5.1 and 5.2, LuaJIT, and OpenResty, using OpenResty’s nonblocking connection handling when available and falling back cleanly when it is not.
I also want an OpenResty only cluster client that can discover the Cassandra cluster, talk to multiple contact points, and support basic load balancing, retries, and reconnection so it feels good in production. Please include clear usage examples, a few tests, and enough documentation so someone can install it with luarocks or use it directly from the lib folder. If you need current Cassandra or OpenResty details, look up the latest docs online.
Are you gonna build this?
make sure you review the code using coderabbit