{--
   fetchSections conn >>= \presects ->
   let memtable = MT.start (map ix2tup presects)
       (ids,arts) = unzip (map ix2tup ixarts)
       stat = execState (zipWithM_ MT.triageM ids (map sectionf arts))
                                   (memtable,Map.empty)
       substate = Set.toList (MT.newValues (fst stat))
   in  insertSections conn substate >>= \ixsec ->
   let table = MT.update (zip (map idx ixsec) substate) (fst stat)
   in  void (executeMany conn insertArtSectPivotStmt
                 (evalState buildPivots (table, snd stat)))
      where sectionf = map Sect . sections

--}

insertSectionStmt :: Query
insertSectionStmt = [sql|INSERT INTO section (section) VALUES (?) returning id|]
insertSectionStmt :: Query
insertSectionStmt = [sql|INSERT INTO section (section) VALUES (?) returning id|]
insertSectionStmt = [sql|INSERT INTO section (section) VALUES (?) returning id|]