예제 #1
0
 public RowStoreAVLHybrid(Session session, IPersistentStoreCollection manager, TableBase table) : this(session, manager, table, true)
 {
     this._cache = session.sessionData.GetResultCache();
     if (this._cache != null)
     {
         this._isCached = true;
     }
 }
예제 #2
0
 public RowStoreAVLMemory(IPersistentStoreCollection manager, Table table)
 {
     this._database    = table.database;
     base.Manager      = manager;
     base.table        = table;
     base.indexList    = table.GetIndexList();
     base.AccessorList = new ICachedObject[base.indexList.Length];
     manager.SetStore(table, this);
 }
예제 #3
0
        public IPersistentStore NewStore(Session session, IPersistentStoreCollection collection, TableBase table, bool diskBased)
        {
            switch (table.GetTableType())
            {
            case 1:
            case 4:
            case 11:
                return(new RowStoreAVLMemory(collection, (Table)table));

            case 2:
            case 8:
            case 10:
                break;

            case 3:
                diskBased = false;
                break;

            case 5:
            {
                DataFileCache cache = this.GetCache();
                if (cache == null)
                {
                    goto Label_0093;
                }
                RowStoreAVLDisk item = new RowStoreAVLDisk(collection, cache, (Table)table);
                this._createdStores.Add(item);
                return(item);
            }

            case 9:
                if (session != null)
                {
                    return(new RowStoreAVLHybrid(session, collection, table));
                }
                return(null);

            default:
                goto Label_0093;
            }
            if (session == null)
            {
                return(null);
            }
            return(new RowStoreAVLHybrid(session, collection, table, diskBased));

Label_0093:
            throw Error.RuntimeError(0xc9, "Logger");
        }
예제 #4
0
 public RowStoreAVLDisk(IPersistentStoreCollection manager, DataFileCache cache, Table table)
 {
     this._database    = table.database;
     base.Manager      = manager;
     base.table        = table;
     base.indexList    = table.GetIndexList();
     base.AccessorList = new ICachedObject[base.indexList.Length];
     this._cache       = cache;
     if (cache != null)
     {
         this.RowOut = cache.RowOut.Duplicate();
     }
     manager.SetStore(table, this);
     this._database = table.database;
 }
예제 #5
0
 public RowStoreAVLHybrid(Session session, IPersistentStoreCollection manager, TableBase table, bool useCache)
 {
     this._session           = session;
     base.Manager            = manager;
     base.table              = table;
     this._maxMemoryRowCount = session.GetResultMemoryRowCount();
     this._isTempTable       = table.GetTableType() == 3;
     this._useCache          = useCache;
     if (this._maxMemoryRowCount == 0)
     {
         this._useCache = false;
     }
     if (table.GetTableType() == 9)
     {
         base.Timestamp = session.GetActionTimestamp();
     }
     this.ResetAccessorKeys(table.GetIndexList());
     manager.SetStore(table, this);
 }