本文整理汇总了C++中CField::GetString方法的典型用法代码示例。如果您正苦于以下问题:C++ CField::GetString方法的具体用法?C++ CField::GetString怎么用?C++ CField::GetString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CField
的用法示例。
在下文中一共展示了CField::GetString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DetachRecord
uint32 CRdbPrefixIndex::DetachRecord(CRecord* pRecord)
{
CField* pField;
uint32 nFieldNo = m_pIdxDef->m_pFields[0];
char* sStr = NULL;
uint32 nStrLen = 0;
pField = pRecord->GetField(nFieldNo);
sStr = pField->GetString(&nStrLen);
uint64 nRowId = pRecord->m_nRowId;
if(m_oTree.RemoveNode((const uint8*)sStr, nStrLen, FOCP_NAME::IsEqualRowId, &nRowId))
{
uint64 nTreeThis = m_oTree.GetThis();
if(!nTreeThis)
{
uint64 pAddr[2] = {nTreeThis, m_oAllocator.GetThis()};
vcommit(m_nThis, (char*)pAddr, 16);
}
return RDB_SUCCESS;
}
return RDB_RECORD_NOT_EXIST;
}
示例2: AttachRecord
uint32 CRdbPrefixIndex::AttachRecord(CRecord* pRecord)
{
CField* pField;
uint32 nFieldNo = m_pIdxDef->m_pFields[0];
char* sStr = NULL;
uint32 nStrLen = 0;
pField = pRecord->GetField(nFieldNo);
sStr = pField->GetString(&nStrLen);
bool bConflict;
int32 bMemory = 1;
if(m_pTabDef->m_pBaseAttr->nStorage == RDB_FILE_TABLE)
bMemory = 0;
uint64 nNode;
uint64 nRowId = pRecord->m_nRowId;
uint64 nTreeThis = m_oTree.GetThis();
TNTreeNode* pNode = m_oTree.InsertNode((const uint8*)sStr, nStrLen, nRowId, bMemory, nNode, bConflict);
if(!pNode)
{
if(bConflict)
return RDB_UNIQUE_INDEX_CONFLICT;
return RDB_LACK_STORAGE;
}
m_oTree.ReleaseNode(nNode, pNode);
uint64 nTreeThis2 = m_oTree.GetThis();
if(nTreeThis != nTreeThis2)
{
uint64 pAddr[2] = {nTreeThis2, m_oAllocator.GetThis()};
vcommit(m_nThis, (char*)pAddr, 16);
}
return RDB_SUCCESS;
}