コード例 #1
0
 public override void Write(IRowOutputInterface output)
 {
     output.WriteInt(base.IBalance);
     output.WriteInt((this._iLeft == -1) ? 0 : this._iLeft);
     output.WriteInt((this._iRight == -1) ? 0 : this._iRight);
     output.WriteInt((this._iParent == -1) ? 0 : this._iParent);
 }
コード例 #2
0
 public override void Write(IRowOutputInterface output, IntLookup lookup)
 {
     output.WriteInt(base.IBalance);
     WriteTranslatePointer(this._iLeft, output, lookup);
     WriteTranslatePointer(this._iRight, output, lookup);
     WriteTranslatePointer(this._iParent, output, lookup);
 }
コード例 #3
0
        public int[] WriteTableToDataFile(Table table)
        {
            IPersistentStore    rowStore = this._database.GetSessionManager().GetSysSession().sessionData.GetRowStore(table);
            IRowOutputInterface output   = this._cache.RowOut.Duplicate();
            DoubleIntIndex      lookup   = new DoubleIntIndex(table.GetPrimaryIndex().SizeUnique(rowStore), false);

            int[] indexRootsArray = table.GetIndexRootsArray();
            long  num             = this._fileOffset;
            int   num2            = 0;

            lookup.SetKeysSearchTarget();
            Error.PrintSystemOut(FwNs.Core.LC.cResources.SR.DataFileDefrag_WriteTableToDataFile_lookup_begins__ + this._stopw.ElapsedTime());
            IRowIterator rowIterator = table.GetRowIterator(rowStore);

            while (rowIterator.HasNext())
            {
                ICachedObject nextRow = rowIterator.GetNextRow();
                lookup.AddUnsorted(nextRow.GetPos(), (int)(num / ((long)this._scale)));
                if ((num2 % 0xc350) == 0)
                {
                    Error.PrintSystemOut(string.Concat(new object[] { FwNs.Core.LC.cResources.SR.DataFileDefrag_WriteTableToDataFile_pointer_pair_for_row_, num2, FwNs.Core.LC.cResources.SR.Single_Space, nextRow.GetPos(), FwNs.Core.LC.cResources.SR.Single_Space, num }));
                }
                num += nextRow.GetStorageSize();
                num2++;
            }
            Error.PrintSystemOut(string.Concat(new object[] { FwNs.Core.LC.cResources.SR.DataFileDefrag_WriteTableToDataFile_table__, table.GetName().Name, FwNs.Core.LC.cResources.SR.DataFileDefrag_WriteTableToDataFile__list_done__, this._stopw.ElapsedTime() }));
            num2        = 0;
            rowIterator = table.GetRowIterator(rowStore);
            while (rowIterator.HasNext())
            {
                ICachedObject nextRow = rowIterator.GetNextRow();
                output.Reset();
                nextRow.Write(output, lookup);
                this._fileStreamOut.Write(output.GetOutputStream().GetBuffer(), 0, output.Size());
                this._fileOffset += nextRow.GetStorageSize();
                if ((num2 % 0xc350) == 0)
                {
                    Error.PrintSystemOut(num2 + FwNs.Core.LC.cResources.SR.DataFileDefrag_WriteTableToDataFile__rows_ + this._stopw.ElapsedTime());
                }
                num2++;
            }
            for (int i = 0; i < table.GetIndexCount(); i++)
            {
                if (indexRootsArray[i] != -1)
                {
                    int num4 = lookup.FindFirstEqualKeyIndex(indexRootsArray[i]);
                    if (num4 == -1)
                    {
                        throw Error.GetError(0x1d2);
                    }
                    indexRootsArray[i] = lookup.GetValue(num4);
                }
            }
            this.SetTransactionRowLookups(lookup);
            Error.PrintSystemOut(FwNs.Core.LC.cResources.SR.DataFileDefrag_WriteTableToDataFile_table__ + table.GetName().Name + FwNs.Core.LC.cResources.SR.DataFileDefrag_WriteTableToDataFile____table_converted);
            return(indexRootsArray);
        }
コード例 #4
0
 private void WriteNodes(IRowOutputInterface _out)
 {
     _out.WriteSize(this.storageSize);
     for (NodeAVL eavl = base.NPrimaryNode; eavl != null; eavl = eavl.nNext)
     {
         eavl.Write(_out);
     }
     this._hasNodesChanged = false;
 }
コード例 #5
0
        private static void WriteTranslatePointer(int pointer, IRowOutputInterface output, IntLookup lookup)
        {
            int i = 0;

            if (pointer != -1)
            {
                i = lookup.LookupFirstEqual(pointer);
            }
            output.WriteInt(i);
        }
コード例 #6
0
 public override void Write(IRowOutputInterface output, IntLookup lookup)
 {
     output.WriteSize(this.storageSize);
     for (NodeAVL eavl = base.NPrimaryNode; eavl != null; eavl = eavl.nNext)
     {
         ((NodeAVLDisk)eavl).Write(output, lookup);
     }
     output.WriteData(base.RowData, base.table.ColTypes);
     output.WriteEnd();
 }
コード例 #7
0
 protected virtual void InitBuffers()
 {
     if ((this.RowOut == null) || (this.RowOut.GetOutputStream().GetBuffer().Length > 0x100))
     {
         this.RowOut = new RowOutputBinaryEncode(this.database.logger.GetCrypto(), 0x100, this.CachedRowPadding);
     }
     if ((this.RowIn == null) || (this.RowIn.GetBuffer().Length > 0x100))
     {
         this.RowIn = new RowInputBinaryDecode(this.database.logger.GetCrypto(), new byte[0x100]);
     }
 }
コード例 #8
0
 public void Write(IRowOutputInterface o, ResultMetaData meta)
 {
     base.BeforeFirst();
     o.WriteLong(base.Id);
     o.WriteInt(base.Size);
     o.WriteInt(0);
     o.WriteInt(base.Size);
     while (base.HasNext())
     {
         object[] next = base.GetNext();
         o.WriteData(meta.GetColumnCount(), meta.ColumnTypes, next, null, null);
     }
     base.BeforeFirst();
 }
コード例 #9
0
ファイル: RowStoreAVLDisk.cs プロジェクト: cwdotson/FwNs
 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;
 }
コード例 #10
0
 public override void Write(IRowOutputInterface output)
 {
     try
     {
         this.WriteNodes(output);
         if (this.hasDataChanged)
         {
             output.WriteData(base.RowData, base.table.ColTypes);
             output.WriteEnd();
             this.hasDataChanged = false;
         }
     }
     catch (IOException)
     {
     }
 }
コード例 #11
0
 public override int GetRealSize(IRowOutputInterface output)
 {
     return(0x10);
 }
コード例 #12
0
 public override int GetRealSize(IRowOutputInterface _out)
 {
     return(_out.GetSize(this) + (base.table.GetIndexCount() * 0x10));
 }
コード例 #13
0
ファイル: NodeAVL.cs プロジェクト: cwdotson/FwNs
 public virtual int GetRealSize(IRowOutputInterface o)
 {
     return(0);
 }
コード例 #14
0
ファイル: NodeAVL.cs プロジェクト: cwdotson/FwNs
 public virtual void Write(IRowOutputInterface o, IntLookup lookup)
 {
 }
コード例 #15
0
ファイル: NodeAVL.cs プロジェクト: cwdotson/FwNs
 public virtual void Write(IRowOutputInterface o)
 {
 }
コード例 #16
0
ファイル: RowSetNavigator.cs プロジェクト: cwdotson/FwNs
 public virtual void WriteSimple(IRowOutputInterface o, ResultMetaData meta)
 {
     throw Error.RuntimeError(0xc9, "RowSetNavigator");
 }