std::string TableTuple::debug(const std::string& tableName) const { assert(m_schema); assert(m_data); std::ostringstream buffer; if (tableName.empty()) { buffer << "TableTuple(no table) ->"; } else { buffer << "TableTuple(" << tableName << ") ->"; } if (isActive() == false) { buffer << " <DELETED>"; } else { for (int ctr = 0; ctr < m_schema->columnCount(); ctr++) { buffer << "("; if (isNull(ctr)) { buffer << "<NULL>"; } else { buffer << getNValue(ctr).debug(); } buffer << ")"; } } uint64_t addressNum = (uint64_t)address(); buffer << " @" << addressNum; std::string ret(buffer.str()); return ret; }
std::string TableTuple::debug(const std::string& tableName, bool skipNonInline) const { assert(m_schema); assert(m_data); std::ostringstream buffer; if (tableName.empty()) { buffer << "TableTuple(no table) ->"; } else { buffer << "TableTuple(" << tableName << ") ->"; } if (isActive() == false) { buffer << " <DELETED> "; } for (int ctr = 0; ctr < m_schema->columnCount(); ctr++) { buffer << "("; const TupleSchema::ColumnInfo *colInfo = m_schema->getColumnInfo(ctr); if (isVariableLengthType(colInfo->getVoltType()) && !colInfo->inlined && skipNonInline) { StringRef* sr = *reinterpret_cast<StringRef**>(getWritableDataPtr(colInfo)); buffer << "<non-inlined value @" << static_cast<void*>(sr) << ">"; } else { buffer << getNValue(ctr).debug(); } buffer << ")"; } if (m_schema->hiddenColumnCount() > 0) { buffer << " hidden->"; for (int ctr = 0; ctr < m_schema->hiddenColumnCount(); ctr++) { buffer << "("; const TupleSchema::ColumnInfo* colInfo = m_schema->getHiddenColumnInfo(ctr); if (isVariableLengthType(colInfo->getVoltType()) && !colInfo->inlined && skipNonInline) { StringRef* sr = *reinterpret_cast<StringRef**>(getWritableDataPtr(colInfo)); buffer << "<non-inlined value @" << static_cast<void*>(sr) << ">"; } else { buffer << getHiddenNValue(ctr).debug(); } buffer << ")"; } } buffer << " @" << static_cast<const void*>(address()); return buffer.str(); }
std::string TableTuple::debugNoHeader() const { assert(m_schema); assert(m_data); std::ostringstream buffer; buffer << "TableTuple(notable) ->"; for (int ctr = 0; ctr < m_schema->columnCount(); ctr++) { if (isNull(ctr)) { buffer << "<NULL>"; } else { buffer << "(" << getNValue(ctr).debug() << ")"; } } std::string ret(buffer.str()); return ret; }
std::string TableTuple::debug(const std::string& tableName) const { assert(m_schema); assert(m_data); std::ostringstream buffer; if (tableName.empty()) { buffer << "TableTuple(no table) ->"; } else { buffer << "TableTuple(" << tableName << ") ->"; } if (isActive() == false) { buffer << " <DELETED> "; } for (int ctr = 0; ctr < m_schema->columnCount(); ctr++) { buffer << "("; if (isNull(ctr)) { buffer << "<NULL>"; } else { buffer << getNValue(ctr).debug(); } buffer << ")"; } if (m_schema->hiddenColumnCount() > 0) { buffer << " hidden->"; for (int ctr = 0; ctr < m_schema->hiddenColumnCount(); ctr++) { buffer << "("; if (isHiddenNull(ctr)) { buffer << "<NULL>"; } else { buffer << getHiddenNValue(ctr).debug(); } buffer << ")"; } } buffer << " @" << static_cast<const void*>(address()); std::string ret(buffer.str()); return ret; }