本文整理汇总了C++中TableTuple::freeObjectColumns方法的典型用法代码示例。如果您正苦于以下问题:C++ TableTuple::freeObjectColumns方法的具体用法?C++ TableTuple::freeObjectColumns怎么用?C++ TableTuple::freeObjectColumns使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TableTuple
的用法示例。
在下文中一共展示了TableTuple::freeObjectColumns方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: deleteNVMEvictedTuple
void NVMEvictedTable::deleteNVMEvictedTuple(TableTuple source) {
if(source.address() == NULL)
return;
source.freeObjectColumns();
deleteTupleStorage(source);
}
示例2: TableTuple
// helper to make a schema, a tuple and calculate EL size
size_t
TableTupleExportTest::maxElSize(std::vector<uint16_t> &keep_offsets,
bool useNullStrings)
{
TableTuple *tt;
TupleSchema *ts;
char buf[1024]; // tuple data
ts = TupleSchema::createTupleSchema(m_schema, keep_offsets);
tt = new TableTuple(buf, ts);
// if the tuple includes strings, add some content
// assuming all Export tuples were allocated for persistent
// storage and choosing set* api accordingly here.
if (ts->columnCount() > 6) {
NValue nv = ValueFactory::getStringValue("ABCDEabcde"); // 10 char
if (useNullStrings)
{
nv.free(); nv.setNull();
}
tt->setNValueAllocateForObjectCopies(6, nv, NULL);
nv.free();
}
if (ts->columnCount() > 7) {
NValue nv = ValueFactory::getStringValue("abcdeabcdeabcdeabcde"); // 20 char
if (useNullStrings)
{
nv.free(); nv.setNull();
}
tt->setNValueAllocateForObjectCopies(7, nv, NULL);
nv.free();
}
// The function under test!
size_t sz = tt->maxExportSerializationSize();
// and cleanup
tt->freeObjectColumns();
delete tt;
TupleSchema::freeTupleSchema(ts);
return sz;
}
示例3: io
// helper to make a schema, a tuple and serialize to a buffer
size_t
TableTupleExportTest::serElSize(std::vector<uint16_t> &keep_offsets,
uint8_t *nullArray, char *dataPtr, bool nulls)
{
TableTuple *tt;
TupleSchema *ts;
char buf[1024]; // tuple data
ts = TupleSchema::createTupleSchema(m_schema, keep_offsets);
tt = new TableTuple(buf, ts);
// assuming all Export tuples were allocated for persistent
// storage and choosing set* api accordingly here.
switch (ts->columnCount()) {
// note my sophisticated and clever use of fall through
case 8:
{
NValue nv = ValueFactory::getStringValue("abcdeabcdeabcdeabcde"); // 20 char
if (nulls) { nv.free(); nv.setNull(); }
tt->setNValueAllocateForObjectCopies(7, nv, NULL);
nv.free();
}
case 7:
{
NValue nv = ValueFactory::getStringValue("ABCDEabcde"); // 10 char
if (nulls) { nv.free(); nv.setNull(); }
tt->setNValueAllocateForObjectCopies(6, nv, NULL);
nv.free();
}
case 6:
{
NValue nv = ValueFactory::getDecimalValueFromString("-12.34");
if (nulls) { nv.free(); nv.setNull(); }
tt->setNValueAllocateForObjectCopies(5, nv, NULL);
nv.free();
}
case 5:
{
NValue nv = ValueFactory::getTimestampValue(9999);
if (nulls) nv.setNull();
tt->setNValueAllocateForObjectCopies(4, nv, NULL);
nv.free();
}
case 4:
{
NValue nv = ValueFactory::getBigIntValue(1024);
if (nulls) nv.setNull();
tt->setNValueAllocateForObjectCopies(3, nv, NULL);
nv.free();
}
case 3:
{
NValue nv = ValueFactory::getIntegerValue(512);
if (nulls) nv.setNull();
tt->setNValueAllocateForObjectCopies(2, nv, NULL);
nv.free();
}
case 2:
{
NValue nv = ValueFactory::getSmallIntValue(256);
if (nulls) nv.setNull();
tt->setNValueAllocateForObjectCopies(1, nv, NULL);
nv.free();
}
case 1:
{
NValue nv = ValueFactory::getTinyIntValue(120);
if (nulls) nv.setNull();
tt->setNValueAllocateForObjectCopies(0, nv, NULL);
nv.free();
}
break;
default:
// this is an error in the test fixture.
EXPECT_EQ(0,1);
break;
}
// The function under test!
ExportSerializeOutput io(dataPtr, 2048);
tt->serializeToExport(io, 0, nullArray);
// and cleanup
tt->freeObjectColumns();
delete tt;
TupleSchema::freeTupleSchema(ts);
return io.position();
}