Архивирование с быстрым подключением и серверный рендеринг для веб-клиента #15

This commit is contained in:
2026-05-04 15:19:53 +03:00
parent 83ce92afa4
commit 574d0d2e43
7 changed files with 374 additions and 18 deletions
+12
View File
@@ -0,0 +1,12 @@
-module(archive_fetcher).
-include("records.hrl").
-export([fetch/3]).
fetch(CalendarId, Year, Month) ->
Start = {Year, Month, 1, 0, 0, 0},
End = {Year, Month, 31, 23, 59, 59},
mnesia:dirty_select(event, [{#event{calendar_id = CalendarId,
start_time = '$1', _ = '_'},
[{'>=','$1', Start},{'=<','$1', End}],
['$_']}]).