private IEnumerable <Doc> enumOpenCursor(Schema schema, Query query, Connector.Cursor mcursor)
        {
            using (mcursor)
                foreach (var bdoc in mcursor)
                {
                    if (schema == null)
                    {
                        schema = Store.Converter.InferSchemaFromBSONDocument(bdoc);
                    }

                    var ddoc = Doc.MakeDoc(schema, query.ResultDocType);
                    Store.Converter.BSONDocumentToDataDoc(bdoc, ddoc, Store.TargetName);
                    yield return(ddoc);
                }
        }
Ejemplo n.º 2
0
 internal MongoDbCursor(Connector.Cursor cursor, IEnumerable <Doc> source) : base(source)
 {
     m_Cursor = cursor;
 }