"SequoiaDB Giant Sequoia Database" close() Overview 2

Example

Insert 10 records

for(i = 0; i < 10; i++) { db.sample.employee.insert( {a: i} ) }

Query all records in the collection sample.employee

var cur = db.sample.employee.find()

Use the cursor to fetch a record

cur.next()
{
  "_id": {
  "$oid": "53b3c2d7bb65d2f74c000000"
  },
  "a": 0
}

Close cursor

cur.close()

Get the next record again, no result is returned

cur.next()

Click on Jushan Database Documentation Center for more information

Guess you like

Origin blog.csdn.net/weixin_45890253/article/details/112984163