コード例 #1
0
        private SymbolMapColumn CreateSymbolColumn(PartitionTxData tx)
        {
            int fileID = 0;

            _symTestD    = RawFileStub.InMemoryFile(4096, fileID++);
            _symTestK    = RawFileStub.InMemoryFile(4096, fileID++);
            _symTestR    = RawFileStub.InMemoryFile(4096, fileID++);
            _symd        = new BufferBinaryReader(new byte[4096], fileID++);
            _symi        = RawFileStub.InMemoryFile(4096, fileID++);
            _symrk       = RawFileStub.InMemoryFile(4096, fileID++);
            _symrr       = RawFileStub.InMemoryFile(4096, fileID);
            _symbolCatch = new SymbolCache();
            var smc = new SymbolMapColumn(
                0,
                0,
                data: _symTestD.Object,
                datak: _symTestK.Object,
                datar: _symTestR.Object,
                symd: _symd,
                symi: _symi.Object,
                symk: _symrk.Object,
                symr: _symrr.Object,
                propertyName: "symTest",
                capacity: 24,
                recordCountHint: 100,
                maxLen: 56);

            tx.SymbolData[_symTestK.Object.FileID].KeyBlockOffset = 16;
            tx.AppendOffset[_symTestK.Object.FileID]           = 28;
            tx.SymbolData[_symrk.Object.FileID].KeyBlockOffset = 16;
            tx.AppendOffset[_symrk.Object.FileID] = 28;

            return(smc);
        }
コード例 #2
0
        private IndexColumn CreateIndex(int size, PartitionTxData pd)
        {
            int fileID = 0;

            _symrk = RawFileStub.InMemoryFile(size, fileID++);
            _symrr = RawFileStub.InMemoryFile(size, fileID);
            pd.AppendOffset[_symrk.Object.FileID] = 28;
            pd.SymbolData[_symrk.Object.FileID].KeyBlockOffset = 12;
            pd.NextRowID = long.MaxValue;

            return(new IndexColumn(_symrk.Object, _symrr.Object, 100, 1000));
        }
コード例 #3
0
        private FixedColumn CreateCol <T>(EFieldType eFieldType, T value)
        {
            var mockStorage = RawFileStub.RawFile(eFieldType, value);

            return(new FixedColumn(mockStorage, eFieldType));
        }
コード例 #4
0
 private FixedColumn CreateCol(EFieldType eFieldType)
 {
     _mockStorage = RawFileStub.InMemoryFile();
     return(new FixedColumn(_mockStorage.Object, eFieldType));
 }