mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-25 02:34:17 +00:00
When we exceed count we should return null.
This commit is contained in:
parent
a34c522ae5
commit
10242f51ee
@ -144,6 +144,8 @@ BEGIN
|
|||||||
IF ( count <= past_repeats ) THEN
|
IF ( count <= past_repeats ) THEN
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END IF;
|
END IF;
|
||||||
|
ELSE
|
||||||
|
count := NULL;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
temp_txt := substring(repeatrule from ''BYSETPOS=([0-9-]+)(;|$)'');
|
temp_txt := substring(repeatrule from ''BYSETPOS=([0-9-]+)(;|$)'');
|
||||||
@ -217,8 +219,11 @@ BEGIN
|
|||||||
EXIT WHEN our_answer >= earliest;
|
EXIT WHEN our_answer >= earliest;
|
||||||
|
|
||||||
-- Give up if we have exceeded the count
|
-- Give up if we have exceeded the count
|
||||||
EXIT WHEN past_repeats > count;
|
IF ( count IS NOT NULL AND past_repeats > count ) THEN
|
||||||
|
RETURN NULL;
|
||||||
|
ELSE
|
||||||
past_repeats := past_repeats + 1;
|
past_repeats := past_repeats + 1;
|
||||||
|
END IF;
|
||||||
|
|
||||||
loopcount := loopcount - 1;
|
loopcount := loopcount - 1;
|
||||||
IF loopcount < 0 THEN
|
IF loopcount < 0 THEN
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user