aboutsummaryrefslogtreecommitdiff
path: root/dbstore/sql/feed/insert-assigner.sql
blob: c21f51d0c3c35220a188c420128d76302c0fe955 (plain)
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;