Option[Word] = { val stmt = connection.prepareStatement("select * from word where word=?") stmt.setString(1, word) val rs = stmt.executeQuery() if(rs.next()) { Some(Word( rs.getInt(1), rs.getString(2), rs.getInt(3), rs.getString(4)) ) } else { None } } https://github.com/cupperservice/LT-Document/tree/main/20201225