Yes, there are plans to do this on a future release.
Aki
On 31/01/2025 12:03 EET Andrea Gabellini via dovecot
<dovecot@dovecot.org> wrote:
Hello,
Thank you for your response. Given that there is currently no API to
instantiate dict objects in Lua, I wanted to ask if there are any
plans
to introduce this feature in the future.
Is there a roadmap or any ongoing development efforts regarding this
functionality? It would be very useful for integrating efficient data
storage mechanisms directly within Lua scripts.
Andrea
Il 31/01/25 07:08, Aki Tuomi via dovecot ha scritto:
>> On 30/01/2025 14:43 EET Andrea Gabellini via dovecot
<dovecot@dovecot.org> wrote:
>>
>>
>> Hello,
>>
>> I am using the push_notification_lua plugin and would like to
modify my
>> script to write data into a dictionary configured as follows:
>>
>> dict_server {
>> dict proxy {
>> idle_timeout = 300s
>> name = sql
>> slow_warn = 1s
>> }
>> dict sql {
>> sql_driver = mysql
>> mysql localhost {
>> dbname = xxx
>> password = xxx
>> user = xxx
>> }
>> dict_map "shared/dsync/$user" {
>> sql_table = dsync
>> dict_map_value_field last_event {
>> type = uint
>> }
>> dict_map_key_field userid {
>> value = $user
>> }
>> }
>> }
>> }
>>
>> I am not very familiar with Lua, and I couldn't find any relevant
>> examples in the documentation or online.
>> Would it be possible to provide a sample code snippet
demonstrating how
>> to write to this dictionary using Lua?
>>
>> Thank you!
>>
>>
There is no API yet to instantiate dict objects in Lua,
they have to be provided by the caller.
You can use some Lua MySQL module to update the table.
Aki
_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org
--
TIM San Marino S.p.A.
Andrea Gabellini
Engineering R&D
TIM San Marino S.p.A. - https://www.telecomitalia.sm
Via Ventotto Luglio, 212 - Piano -2
47893 - Borgo Maggiore - Republic of San Marino
Tel: (+378) 0549 886237
Fax: (+378) 0549 886188
--
Informativa Privacy
Questa email ha per destinatari dei contatti presenti negli archivi
di TIM San Marino S.p.A.. Tutte le informazioni vengono trattate e
tutelate nel rispetto della normativa vigente sulla protezione dei
dati personali (Reg. EU 2016/679). Per richiedere informazioni e/
o variazioni e/o la cancellazione dei vostri dati presenti nei nostri
archivi potete inviare una email a priv...@telecomitalia.sm.
Avviso di Riservatezza
Il contenuto di questa e-mail e degli eventuali allegati e'
strettamente confidenziale e destinato alla/e persona/e a cui e'
indirizzato. Se avete ricevuto per errore questa e-mail, vi preghiamo
di segnalarcelo immediatamente e di cancellarla dal vostro computer.
E' fatto divieto di copiare e divulgare il contenuto di questa e-
mail. Ogni utilizzo abusivo delle informazioni qui contenute da parte
di persone terze o comunque non indicate nella presente e-mail potra'
essere perseguito ai sensi di legge.
_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org
_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org