Hello,
I'm trying to understand how does table_api_on_fetch work. Sorry, guys,
it is not clear at all.
As for now, I see this function present in mysql, sqlite and procexec
tables. When I need to return just one value - it is clear, according to
table_procexec.c I need just copy the result to dst:
https://github.com/OpenSMTPD/OpenSMTPD-extras/blob/93055be9eb08cb0ffab6c2bdb3bcfd9aeab180f0/extras/tables/table-procexec/table_procexec.c#L282
But how should I return a list of values? The code from mysql table with
dict_poproot, dict_set and dict_iter is not clear at all for me (the
same code is used in sqlite table). Could someone explain it, please?
Best regards,
Peter
On 09/08/2022 14:54, Reio Remma wrote:
Hello!
You'll want to have a look at table-procexec and may write your own
backend.
table-procexec is still a work in process however.
https://poolp.org/posts/2020-05-28/may-2020-opensmtpd-6.7.1p1-release-table-procexec-and-many-pocs/
https://github.com/OpenSMTPD/OpenSMTPD-extras/tree/table-procexec
Good luck
Reio