If we want the API to support SQLite we can look into using this ORM (https://github.com/fiorix/txdbapi), but I am afraid it might make the queries less efficient and/or fire multiple queries in places where postgres can achieve the same result in 1 query.