query1_' :: (P.FromRow r) => DBState -> P.Query -> IO (Maybe r)
query1_' st q =
    P.query_ (db' st) q >>= \case
      []  -> return Nothing
      [r] -> return (Just r)
      _   -> error ("dbQuery1_: query " ++ show q ++ " returned more than 1 row")
query1_' :: (P.FromRow r) => DBState -> P.Query -> IO (Maybe r)
query1_' st q =
    P.query_ (db' st) q >>= \case
      []  -> return Nothing
      [r] -> return (Just r)
      _   -> error ("dbQuery1_: query " ++ show q ++ " returned more than 1 row")
query1_' st q =
    P.query_ (db' st) q >>= \case
      []  -> return Nothing
      [r] -> return (Just r)
      _   -> error ("dbQuery1_: query " ++ show q ++ " returned more than 1 row")