liquid_feedback_frontend
view model/event_processed.lua @ 1725:4a5a79a37db1
Render links in unit and area description, updated layout of unit and area box
author | bsw |
---|---|
date | Tue Sep 28 09:43:58 2021 +0200 (2021-09-28) |
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