Query LIMIT
The LIMIT clause tells RioDB that a query should be automatically removed after its conditions have been met n times.
Each time conditions are met, RioDB triggers the output action. So, a different way of saying the same thing is that the LIMIT clause tells RioDB that a query should be automatically and permanently removed after its output action has been triggered n times.
The LIMIT clause is optional. Without it, queries run indefinitely, which is normally the desired behavior. LIMIT tends to be useful for testing.
Syntax
The limit should be a positive integer indicating how many times the trigger shall be fired before the query is automatically removed.
LIMIT <integer>
Example
SELECT ...
FROM ...
WHEN ...
OUTPUT (...)
SLEEP ...
LIMIT 100;
In the example above, a query will be automatically and permanently removed from RioDB after its output action has been triggered 100 times.
Note, If RioDB service is restarted, this value resets. It will lose track of how many triggers already fired and start over.