get_keys(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

πŸ’… get_keys(3) β€” like, the Arcan Lua API one, bestie

okay so real talk, this one lives in the Arcan Lua API section of your manual, and it's the little helper you call when you need to see everything at once. no cap.


✨ NAME ✨

get_keys β€” grab all the keys tied to a target, or to a target + config pair πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

kvtbl
get_keys( targetname, configname )

🌸 DESCRIPTION 🌸

so this function is for those corner cases β€” you know the ones β€” where you genuinely need to explicitly enumerate or filter every single key:value pair associated with a targetname, or with a targetname + configname pair. the vibe is: when plain get_key calls or match_keys calls just wouldn't work. that's the whole gig. 🫢


πŸ”₯ NOTES πŸ”₯

  1. the output kvtbl will always be a table, even if the targetname, or the targetname + configname combo, doesn't resolve to a valid target and config. but like β€” the table itself will just be empty. 😭 so yeah, you literally cannot distinguish between valid and invalid targets here. it's giving "no thoughts, head empty." πŸ’€

πŸ‘‘ EXAMPLE πŸ‘‘

function get_keys0()
      local tbl = list_targets();
      if (#tbl == 0) then
            warning("get_keys test must be run on a database with a valid target");
            return shutdown();
      end
      store_key("test1", "testval", tbl[1]);
      store_key("test2", "testval", tbl[2]);
      for k,v in ipairs(get_keys(tbl[1])) do
            print(k, v);
      end
end

🌈 SEE ALSO 🌈

  • database β€” go look at this one too, bestie, it's the related icon ✨

πŸ’œ fr fr, that's the whole page. go forth and enumerate.

Arcan Lua API Β· October 2026 Β· mwah, ty for reading, ily πŸ“

πŸ“¦ where this page comes from