liquid_feedback_frontend

view model/event_processed.lua @ 1800:b87997219042

Updated spanish translation
author bsw
date Thu Oct 21 15:22:29 2021 +0200 (2021-10-21)
parents 32cc544d5a5b
children
line source
1 EventProcessed = mondelefant.new_class()
2 EventProcessed.table = 'event_processed'
4 function EventProcessed:get_last_id()
6 local event_processed = self:new_selector()
7 :optional_object_mode()
8 :for_update()
9 :exec()
11 local last_event_id = 0
12 if event_processed then
13 last_event_id = event_processed.event_id
14 end
16 return last_event_id
18 end
20 function EventProcessed:set_last_id(id)
21 db:query{ "INSERT INTO event_processed (event_id) VALUES (?) ON CONFLICT ((1)) DO UPDATE SET event_id = EXCLUDED.event_id", id }
22 end

Impressum / About Us