lib/mongo/cursor.rb
# Close the cursor.
#
# Note: if a cursor is read until exhausted (read until OP_QUERY or
# OP_GETMORE returns zero for the cursor id), there is no need to
# close it by calling this method.
Close the cursor.
Note: if a cursor is read until exhausted (read until OP_QUERY or
OP_GETMORE returns zero for the cursor id), there is no need to
close it by calling this method.
Close the cursor . Note : if a cursor is read until exhausted ( read until OP_QUERY or OP_GETMORE returns zero for the cursor id ) there is no need to close it by calling this method .
def close
          @db.send_to_db(KillCursorsMessage.new(@cursor_id)) if @cursor_id
          @cache = []
          @cursor_id = 0
          @closed = true
        end
def close @db . send_to_db ( KillCursorsMessage . new ( @cursor_id ) ) if @cursor_id @cache = [ ] @cursor_id = 0 @closed = true end
Close the cursor.
Close the cursor .