亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? versionedstorage.cs

?? Perst開源實時數據庫
?? CS
?? 第 1 頁 / 共 4 頁
字號:
                            {
                                keywords.Add(keyword);
                            }
                        }
                        IEnumerator[] occurences = new IEnumerator[keywords.Count];
                        for (int i = 0; i < occurences.Length; i++) 
                        { 
                            Key key = new Key((string)keywords[i]);
                            occurences[i] = root.inverseIndex.GetEnumerator(key, key);
                        }
                        return new SearchResult(root, type, uri, restOfPatterns, kind, timestamp, 
                            new ReferenceIterator(root, (PropDef[])refs.ToArray(typeof(PropDef)), 
                            db.Merge(occurences), kind, timestamp));
                    }
                    break;
            }

            def = (PropDef)root.propDefIndex[prop.name];
            if (def == null) 
            { 
                return new object[0]; // empty selection
            }
            if (val is Range) 
            { 
                Range range = (Range)val;
                if (range.from is double) 
                {
                    Key fromKey = new Key(new object[]{def, range.from}, range.fromInclusive);
                    Key tillKey = new Key(new object[]{def, range.till}, range.tillInclusive);
                    return new SearchResult(root, type, uri, restOfPatterns, kind, timestamp, 
                        new ReferenceIterator(root, (PropDef[])refs.ToArray(typeof(PropDef)), 
                        root.numPropIndex.GetEnumerator(fromKey, tillKey), kind, timestamp));
                } 
                else if (range.from is DateTime) 
                {
                    Key fromKey = new Key(new object[]{def, range.from}, range.fromInclusive);
                    Key tillKey = new Key(new object[]{def, range.till}, range.tillInclusive);
                    return new SearchResult(root, type, uri, restOfPatterns, kind, timestamp, 
                        new ReferenceIterator(root, (PropDef[])refs.ToArray(typeof(PropDef)), 
                        root.timePropIndex.GetEnumerator(fromKey, tillKey), kind, timestamp));
                } 
                else 
                { 
                    Key fromKey = new Key(new object[]{def, range.from}, range.fromInclusive);
                    Key tillKey = new Key(new object[]{def, range.till}, range.tillInclusive);
                    return new SearchResult(root, type, uri, restOfPatterns, kind, timestamp, 
                        new ReferenceIterator(root, (PropDef[])refs.ToArray(typeof(PropDef)), 
                        root.strPropIndex.GetEnumerator(fromKey, tillKey), kind, timestamp));
                }
            } 
            if (val is string) 
            {
                string str = (string)prop.val;
                int wc = str.IndexOf('*');
                if (wc < 0) 
                { 
                    Key key = new Key(new object[]{def, str});
                    return new SearchResult(root, type, uri, restOfPatterns, kind, timestamp, 
                        new ReferenceIterator(root, (PropDef[])refs.ToArray(typeof(PropDef)), 
                        root.strPropIndex.GetEnumerator(key, key), kind, timestamp));
                } 
                else if (wc > 0) 
                { 
                    string prefix = str.Substring(0, wc);
                    Key fromKey = new Key(new object[]{def, prefix});
                    Key tillKey = new Key(new object[]{def, prefix + Char.MaxValue}, false);                        
                    return new SearchResult(root, type, uri, wc == str.Length-1 ? restOfPatterns : patterns, kind, timestamp, 
                        new ReferenceIterator(root, (PropDef[])refs.ToArray(typeof(PropDef)), 
                        root.strPropIndex.GetEnumerator(fromKey, tillKey), kind, timestamp));
                } 
            } 
            else if (val is double) 
            {
                Key key = new Key(new object[]{def, val});
                return new SearchResult(root, type, uri, restOfPatterns, kind, timestamp, 
                    new ReferenceIterator(root, (PropDef[])refs.ToArray(typeof(PropDef)), 
                    root.numPropIndex.GetEnumerator(key, key), kind, timestamp));
            } 
            else if (val is DateTime) 
            {
                Key key = new Key(new object[]{def, (DateTime)val});
                return new SearchResult(root, type, uri, restOfPatterns, kind, timestamp, 
                    new ReferenceIterator(root, (PropDef[])refs.ToArray(typeof(PropDef)), 
                    root.timePropIndex.GetEnumerator(key, key), kind, timestamp));
            } 
            else if (val is NameVal) 
            {
                return SearchReferenceProperty(type, uri, patterns, kind, timestamp, (NameVal)val, compound, def, refs);
            }
            else if (val is NameVal[]) 
            {
                NameVal[] props = (NameVal[])val;
                if (props.Length > 0) 
                {
                    return SearchReferenceProperty(type, uri, patterns, kind, timestamp, props[0], true, def, refs);
                }
            }
            return null;
        }
        
        /// <summary>Close database</summary>
        public void Close() 
        {
            db.Close();
        }

        /// <summary>Commit current transaction</summary>
        public void Commit() 
        {
            db.Commit();
            root.Unlock();
        }

        /// <summary>Rollback current transaction</summary>
        public void Rollback() 
        {
            db.Rollback();
            root.Unlock();
        }

        /// <summary>
        /// Begin new write transction: set exclusive lock
        /// </summary>
        public void BeginTransaction() 
        {
            root.ExclusiveLock();
        }

        class SearchResult:IEnumerable,IEnumerator 
        {
            VersionHistory type;
            string         uri;
            NameVal[]      patterns;
            SearchKind     kind;
            DateTime       timestamp;
            IEnumerator    iterator;
            Thing          currThing;
            int            currVersion;
            Link           currHistory;
            DatabaseRoot   root;

            public IEnumerator GetEnumerator() 
            { 
                return this;
            }
        
            public SearchResult(DatabaseRoot root, VersionHistory type, string uri, NameVal[] patterns, SearchKind kind, DateTime timestamp, IEnumerator iterator) 
            {
                this.root = root;
                this.type = type;    
                this.uri = uri;    
                this.patterns = patterns;    
                this.kind = kind;    
                this.timestamp = timestamp;    
                this.iterator = iterator;    
            }

            public void Reset() 
            { 
                iterator.Reset();
                currThing = null;
                currHistory = null;
            }
 
            public bool MoveNext() 
            { 
                currThing = null;

            Repeat:
                if (currHistory != null) 
                { 
                    while (currVersion < currHistory.Count) 
                    { 
                        Thing thing = (Thing)currHistory[currVersion++];
                        if (Match(thing)) 
                        { 
                            return true;
                        }
                    }
                    currHistory = null;
                }              
                while (iterator.MoveNext()) 
                { 
                    object curr = iterator.Current;
                    if (curr is Thing) 
                    { 
                        if (Match((Thing)curr)) 
                        { 
                            return true;
                        }
                    } 
                    else if (curr is VersionHistory) 
                    { 
                        currHistory = ((VersionHistory)curr).versions;
                        currVersion = 0;
                        goto Repeat;
                    }                    
                }
                return false;
            }

            private static bool MatchString(string str, string pat) 
            { 

                if (pat.IndexOf('*') < 0) 
                { 
                    return  pat.Equals(str); 
                }
                int pi = 0, si = 0, pn = pat.Length, sn = str.Length; 
                int wildcard = -1, strpos = -1;
                while (true) 
                { 
                    if (pi < pn && pat[pi] == '*') 
                    { 
                        wildcard = ++pi;
                        strpos = si;
                    } 
                    else if (si == sn) 
                    { 
                        return pi == pn;
                    } 
                    else if (pi < pn && str[si] == pat[pi]) 
                    {
                        si += 1;
                        pi += 1;
                    } 
                    else if (wildcard >= 0) 
                    { 
                        si = ++strpos;
                        pi = wildcard;
                    } 
                    else 
                    { 
                        return false;
                    }
                }
            }

            private bool Match(Thing thing) 
            { 
        
                if (type != null && !thing.IsInstanceOf(type, kind, timestamp)) 
                {
                    return false;
                }
                switch (kind) 
                { 
                    case SearchKind.LatestVersion:
                        if (!thing.IsLatest()) 
                        { 
                            return false;
                        }
                        break;
                    case SearchKind.LatestBefore:
                        if (thing.timestamp > timestamp || thing.vh.GetLatestBefore(timestamp) != thing) 
                        {
                            return false;
                        }
                        break;
                    case SearchKind.OldestAfter:
                        if (thing.timestamp < timestamp || thing.vh.GetOldestAfter(timestamp) != thing)
                        {
                            return false;
                        }
                        break;
                    default:
                        break;
                }

                if (uri != null) 
                { 
                    if (!MatchString(thing.vh.uri, uri)) 
                    { 
                        return false;
                    }
                }
                for (int i = 0; i < patterns.Length; i++) 
                { 
                    if (!MatchProperty(patterns[i], thing)) 
                    { 
                        return false;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91极品美女在线| 亚洲线精品一区二区三区| 亚洲色图在线视频| 免费看欧美美女黄的网站| 国产精品一区免费在线观看| 欧美日韩国产一级| 国产精品网站在线观看| 日本va欧美va精品| 在线观看日韩高清av| 国产精品素人视频| 精品一区二区在线观看| 欧美天天综合网| 亚洲欧美二区三区| 国产精品一区免费在线观看| 欧美一区二区国产| 婷婷开心激情综合| 色哟哟一区二区在线观看| 国产精品丝袜91| 国产毛片一区二区| 精品嫩草影院久久| 日韩激情一二三区| 91精品国产欧美一区二区18| 亚洲成av人**亚洲成av**| 北条麻妃国产九九精品视频| 国产三级精品视频| 国产精品一品二品| 国产三级三级三级精品8ⅰ区| 蜜桃一区二区三区在线观看| 欧美另类变人与禽xxxxx| 亚洲影院久久精品| 在线免费观看一区| 亚洲永久免费av| 欧美日本一道本| 同产精品九九九| 欧美一区二区三区在线观看| 天天操天天综合网| 制服丝袜成人动漫| 美女被吸乳得到大胸91| 精品美女一区二区三区| 激情综合色综合久久| 久久综合给合久久狠狠狠97色69| 精品在线一区二区三区| 久久精品日韩一区二区三区| 粉嫩aⅴ一区二区三区四区五区 | 美美哒免费高清在线观看视频一区二区| 色94色欧美sute亚洲线路一ni| 亚洲靠逼com| 欧美系列在线观看| 日本不卡视频在线| 精品91自产拍在线观看一区| 国产成人8x视频一区二区| 国产精品黄色在线观看| 色偷偷久久一区二区三区| 亚洲成人在线网站| 久久影院电视剧免费观看| 成人免费看视频| 一区二区三区资源| 欧美挠脚心视频网站| 久草中文综合在线| 欧美激情艳妇裸体舞| 色婷婷香蕉在线一区二区| 天堂va蜜桃一区二区三区| 精品国产一区二区三区忘忧草 | 白白色 亚洲乱淫| 亚洲免费伊人电影| 欧美日韩一区二区三区在线看| 三级影片在线观看欧美日韩一区二区| 51午夜精品国产| 国产成人免费视频网站| 亚洲一卡二卡三卡四卡无卡久久 | 国产欧美日韩卡一| 欧美性videosxxxxx| 国产一区二区三区精品视频| 亚洲男人的天堂一区二区| 在线播放欧美女士性生活| 国产成人精品亚洲午夜麻豆| 亚洲一区免费观看| 久久久高清一区二区三区| 欧美在线免费播放| 国产麻豆午夜三级精品| 午夜伦欧美伦电影理论片| 久久精品亚洲麻豆av一区二区 | 天天综合色天天综合色h| 久久久国产一区二区三区四区小说 | 久久av资源站| 亚洲免费在线视频| 久久久久久综合| 欧美精品免费视频| 99精品国产视频| 国产福利精品一区| 久久国产欧美日韩精品| 亚洲线精品一区二区三区八戒| 欧美高清在线一区| 精品国内二区三区| 日韩一级免费观看| 欧美午夜理伦三级在线观看| 菠萝蜜视频在线观看一区| 精品在线亚洲视频| 免费在线观看日韩欧美| 午夜精品福利一区二区三区av| 亚洲色图丝袜美腿| 国产日产亚洲精品系列| 精品久久国产97色综合| 欧美日韩黄视频| 精品视频一区三区九区| 91精品办公室少妇高潮对白| 不卡大黄网站免费看| 高清av一区二区| 成人一二三区视频| 国产成人a级片| 粉嫩欧美一区二区三区高清影视| 国产一区二区三区蝌蚪| 国产精选一区二区三区| 国产精品一区二区你懂的| 国产一区不卡精品| 国产剧情在线观看一区二区| 国产黑丝在线一区二区三区| 国产黄色成人av| 国产99久久久久| 成人午夜短视频| 丁香六月综合激情| 成人一区二区视频| 99精品热视频| 在线观看三级视频欧美| 欧美日韩一区二区三区高清| 在线亚洲高清视频| 欧美亚洲另类激情小说| 欧美美女bb生活片| 欧美一区三区四区| 欧美一级片免费看| 久久午夜色播影院免费高清| 欧美激情一区三区| 亚洲精品综合在线| 亚洲国产另类精品专区| 奇米888四色在线精品| 国内精品第一页| 99re在线精品| 欧美日本一区二区| 久久蜜桃av一区二区天堂| 中国av一区二区三区| 亚洲国产三级在线| 麻豆国产一区二区| 成人国产精品免费观看视频| 91免费观看国产| 欧美一区二区女人| 中文字幕av不卡| 午夜免费久久看| 国产精品69毛片高清亚洲| 一本大道久久a久久精品综合| 欧美性大战久久久久久久| 日韩欧美成人一区二区| 亚洲色图制服丝袜| 美国十次综合导航| 91看片淫黄大片一级| 欧美一区午夜视频在线观看 | 成人精品在线视频观看| 日本精品视频一区二区三区| 欧美一区在线视频| 亚洲少妇中出一区| 久久疯狂做爰流白浆xx| 91在线免费播放| 欧美xxxxxxxx| 亚洲综合久久久久| 国产精品亚洲第一| 欧美精品三级日韩久久| 国产精品久久二区二区| 蜜桃视频免费观看一区| 一本一本久久a久久精品综合麻豆| 91精品国产欧美一区二区成人| 国产精品欧美一区喷水| 精品在线亚洲视频| 欧美老肥妇做.爰bbww视频| 国产精品欧美久久久久无广告| 日本成人在线视频网站| 色综合久久66| 国产精品乱码人人做人人爱 | 精品久久久久久久人人人人传媒| 亚洲人亚洲人成电影网站色| 蜜臀av一区二区在线免费观看| 91成人网在线| 综合久久综合久久| 国产精品亚洲成人| 精品国产乱码91久久久久久网站| 亚洲综合激情另类小说区| 风间由美一区二区av101| 久久网站最新地址| 看片的网站亚洲| 91精品国产91久久综合桃花| 亚洲综合图片区| 一本一道波多野结衣一区二区| 中文字幕中文字幕在线一区| 国产高清成人在线| 久久久国产综合精品女国产盗摄| 九色|91porny| 日韩欧美国产系列| 秋霞国产午夜精品免费视频| 91精品午夜视频| 欧美96一区二区免费视频| 51精品视频一区二区三区| 天堂影院一区二区|