GetBitIndexes() public method

public GetBitIndexes ( ) : IEnumerable
return IEnumerable
示例#1
0
        public IEnumerable <int> FindRows(string filter)
        {
            WAHBitArray bits = ExecutionPlan(filter, _docs.RecordCount());

            // enumerate records
            return(bits.GetBitIndexes());
        }
示例#2
0
        public IEnumerable <string> FindDocumentFileNames(string filter)
        {
            WAHBitArray bits = ExecutionPlan(filter, _docs.RecordCount());

            // enumerate documents
            foreach (int i in bits.GetBitIndexes())
            {
                if (i > _lastDocNum - 1)
                {
                    break;
                }
                string b = _docs.ReadData(i);
                var    d = (Dictionary <string, object>)fastJSON.JSON.Parse(b);

                yield return(d["FileName"].ToString());
            }
        }
示例#3
0
        public IEnumerable <Document> FindDocuments(string filter)
        {
            WAHBitArray bits = ExecutionPlan(filter, _docs.RecordCount());

            // enumerate documents
            foreach (int i in bits.GetBitIndexes())
            {
                if (i > _lastDocNum - 1)
                {
                    break;
                }
                string   b = _docs.ReadData(i);
                Document d = fastJSON.JSON.ToObject <Document>(b);

                yield return(d);
            }
        }
示例#4
0
        public IEnumerable <T> FindDocuments <T>(string filter)
        {
            checkloaded();
            WAHBitArray bits = ExecutionPlan(filter, _docs.RecordCount());

            // enumerate documents
            foreach (int i in bits.GetBitIndexes())
            {
                if (i > _lastDocNum - 1)
                {
                    break;
                }
                string b = _docs.ReadData(i);
                T      d = fastJSON.JSON.ToObject <T>(b, new fastJSON.JSONParameters {
                    ParametricConstructorOverride = true
                });

                yield return(d);
            }
        }