Пример #1
0
tlib::bson::object Collection::Cursor::CursorImpl::Current() const
{
	assert( More() && "There are no data in cursor" );

	const bson_t* record = mongoc_cursor_current( m_cursor.get() );

	if( !record )
		throw MongoError("Invoke Cursor::Current with bad cursor");

	return tlib::bson::object( record );
}
Пример #2
0
/*
 * Get the current document from cursor.
 */
const BSON*
MongoCursorBson(MONGO_CURSOR* c)
{
	return mongoc_cursor_current(c);
}