/// <summary> /// /// </summary> /// <param name="record"></param> /// <param name="tableSchema"></param> public TableDataRecord(TPSRecord record, TableSchema tableSchema) { RandomAccess ra = new RandomAccess(); ra.OpenStream(new System.IO.MemoryStream(record.RecordData)); _tableID = ra.beLong(); ra.leByte(); //TPSRecord Type _recordID = ra.beLong(); _dataRow = tableSchema.parseRow(_recordID, ref ra); ra = null; }
public TableIndexRecord(TPSRecord record) { RandomAccess ra = new RandomAccess(); ra.OpenStream(new System.IO.MemoryStream(record.RecordData)); _tableID = ra.beLong(); _indexID = ra.leByte(); ra.jumpAbs(ra.fileSize - 4); _recordID = ra.beLong(); ra = null; }
public TableDefinitionRecord(TPSRecord record) { RandomAccess ra = new RandomAccess(); ra.OpenStream(new System.IO.MemoryStream(record.RecordData)); _tableID = ra.beLong(); ra.leByte(); //TPSRecord Type _blockID = ra.leShort(); }
public TableNameRecord(TPSRecord tpsRecord) { RandomAccess ra = new RandomAccess(); ra.OpenStream(new MemoryStream(tpsRecord.RecordData)); ra.jumpRelative(1); //skip the first byte in the header _tableName = ra.fixedLengthString(tpsRecord.HeaderLength - (int)ra.position).Trim(); //the rest of the header is the name _tableID = ra.beLong(); //followed by the table ID if (_tableName == null) { _tableName = "NULL_NAME_" + _tableID.ToString(); } ra = null; }