1 2 3 4 5 6 7 8 9 10 11 12 13
-- add assigner, unless they are already in the database -- -- NOTE: might be able to do this more gracefully with an UPSERT in -- sqlite? INSERT INTO assigners(assigner) SELECT :assigner EXCEPT -- exclude existing assigners SELECT assigner FROM assigners WHERE assigner = :assigner;