How to set a max items for a specific table using Trigger, in SQLite?
问题 This is a simple question. Background I'm supposed to have max of 400 rows in some table, based on timestamp field, so old ones will be removed automatically. For here, let's say it's 3 instead. The table has various fields, but the timestamp is what's important here. The problem Even though I've succeeded (looked here), for some reason it got me to a max of an additional item, so I just adjusted it accordingly. This means that instead of 3, I got 4 items. private const val MAX_ITEMS = 3