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

                    var row = Row.MakeRow(schema, query.ResultRowType);
                    m_Store.Converter.BSONDocumentToRow(doc, row, m_Store.TargetName);
                    yield return(row);
                }
        }
Beispiel #2
0
 internal MongoDBCursor(Connector.Cursor cursor, IEnumerable <Row> source) : base(source)
 {
     m_Cursor = cursor;
 }