コード例 #1
0
ファイル: IndexManager.cs プロジェクト: morecraf/Siaqodb
        internal void BuildIndexes(SqoTypeInfo ti)
        {
            if (ti.Type == typeof(IndexInfo2) || ti.Type == typeof(RawdataInfo))
            {
                return;
            }
            Dictionary <FieldSqoInfo, IBTree> dict = new Dictionary <FieldSqoInfo, IBTree>();

            foreach (FieldSqoInfo f in ti.IndexedFields)
            {
                IBTree index = this.GetIndex(f, ti);
                dict.Add(f, index);
            }
            if (dict.Count > 0)
            {
                if (cacheIndexes == null)
                {
                    cacheIndexes = new Cache.CacheForIndexes();
                }
                cacheIndexes.Add(ti, dict);
            }
        }
コード例 #2
0
ファイル: IndexManager.cs プロジェクト: morecraf/Siaqodb
        internal async Task BuildIndexesAsync(SqoTypeInfo ti)
        {
            if (ti.Type == typeof(IndexInfo2) || ti.Type == typeof(RawdataInfo))
            {
                return;
            }
            Dictionary <FieldSqoInfo, IBTree> dict = new Dictionary <FieldSqoInfo, IBTree>();

            foreach (FieldSqoInfo f in ti.IndexedFields)
            {
                IBTree index = await this.GetIndexAsync(f, ti).ConfigureAwait(false);

                dict.Add(f, index);
            }
            if (dict.Count > 0)
            {
                if (cacheIndexes == null)
                {
                    cacheIndexes = new Cache.CacheForIndexes();
                }
                cacheIndexes.Add(ti, dict);
            }
        }
コード例 #3
0
ファイル: IndexManager.cs プロジェクト: morecraf/Siaqodb
 internal void Close()
 {
     this.cacheIndexes = null;
 }
コード例 #4
0
ファイル: IndexManager.cs プロジェクト: morecraf/Siaqodb
 internal void DeleteAllIndexInfo()
 {
     cacheIndexes  = null;
     storedIndexes = null;
 }