如何使用Room Persistence库“创建触发器”
- CREATE TRIGGER IF NOT EXISTS delete_till_10 INSERT ON user WHEN (select count(*) from user)>9
- BEGIN
- DELETE FROM user WHERE id IN (SELECT id FROM user ORDER BY id limit (select count(*) -9 from user));
- END