borrowCopy :: String -> Connection -> IO (Maybe Int64)
borrowCopy isbn_ = handleViolations (update templ isbn_)
  where templ = "UPDATE books SET available = available - 1 \
                \ WHERE isbn = ? AND available > 0"
borrowCopy :: String -> Connection -> IO (Maybe Int64)
borrowCopy isbn_ = handleViolations (update templ isbn_)
  where templ = "UPDATE books SET available = available - 1 \
                \ WHERE isbn = ? AND available > 0"
borrowCopy isbn_ = handleViolations (update templ isbn_)
  where templ = "UPDATE books SET available = available - 1 \
                \ WHERE isbn = ? AND available > 0"