xyproto / algernon

Small self-contained pure-Go web server with Lua, Teal, Markdown, Ollama, HTTP/2, QUIC, Redis, SQLite and PostgreSQL support ++
https://algernon.roboticoverlords.org
BSD 3-Clause "New" or "Revised" License
2.81k stars 138 forks source link

Bolt Cursor or redis keys? #45

Open TBortels opened 4 years ago

TBortels commented 4 years ago

Is there any mechanism to scan the database key space in lua? ie. the equivalent of a Bolt Cursor or "keys *" in redis? I'm also looking at redis pub/sub as something it'd be nice to post to but is missing from the built-in api.

If there was some sort of api passthru maybe that'd work. Dunno.

PS. We need to find a better way to socialize this awesome bit of code. I've been looking for it (or something like it - a standalone go-based lua app server) for months.

xyproto commented 4 years ago

Thanks for reporting! I'm glad you like it. I will try to add a way to list keys.

xyproto commented 3 years ago

One possible workaround is to keep separate a list of keys. This may also give better performance, depending on the use case.