@Override
   public boolean next () throws SQLException {
      /*
       * make sure things look sane. The cursor must be
       * positioned in the rowset or before first (0) or
       * after last (numRows + 1)
       */
      // now move and notify
      boolean ret = this.internalNext();
      notifyCursorMoved();

      // it the first document size is 0, it means that the cursor is empty
      if (this.firstDocument != null && this.firstDocument.size() == 0) {
         return false;
      }

      if (!ret) {
         ret = this.cursor.hasNext();
         if (ret) {
            readData();
            internalFirst();
         }
      }
      return ret;
   }
Maps a given class type to a corresponding SQL type.

@param typeString the class type as a string
@return the corresponding SQL type, or {@link java.sql.Types#OTHER} if no corresponding type is found.
src/main/java/org/replicadb/rowset/MongoDBRowSetImpl.java