I try to figure out how to use index.queryLuaObjects() but I hit a brick wall:
It works fine with the given example local tasks = index.queryLuaObjects("mytask", {limit=3})
, but I can’t get it to do much more.
Especially select
and where
would be interesting. I found promising hints in the source, but I can’t put the pieces together.
How can I write a lua live query like below with queryLuaObjects()
? How to use _
in the query
argument of the function?
query[[from index.tag "task"
where _.deadline and _.deadline > "2025-01-01"
order by deadline
limit 10
select {deadline=_.deadline, ref="[[".._.ref.."]]", task=name}
]]