本文整理汇总了C++中ndbdictionary::Table::setLogging方法的典型用法代码示例。如果您正苦于以下问题:C++ Table::setLogging方法的具体用法?C++ Table::setLogging怎么用?C++ Table::setLogging使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ndbdictionary::Table
的用法示例。
在下文中一共展示了Table::setLogging方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
int
NDBT_TestSuite::createHook(Ndb* ndb, NdbDictionary::Table& tab, int when)
{
if (when == 0) {
if (diskbased)
{
for (int i = 0; i < tab.getNoOfColumns(); i++)
{
NdbDictionary::Column* col = tab.getColumn(i);
if (! col->getPrimaryKey())
{
col->setStorageType(NdbDictionary::Column::StorageTypeDisk);
}
}
}
else if (temporaryTables)
{
tab.setTemporary(true);
tab.setLogging(false);
}
if (tsname != NULL) {
tab.setTablespaceName(tsname);
}
}
return 0;
}
示例2: x
int
create_table(){
NdbDictionary::Dictionary* dict = g_ndb->getDictionary();
assert(dict);
if(g_paramters[P_CREATE].value){
g_ndb->getDictionary()->dropTable(g_tablename);
const NdbDictionary::Table * pTab = NDBT_Tables::getTable(g_tablename);
assert(pTab);
NdbDictionary::Table copy = * pTab;
copy.setLogging(false);
if(dict->createTable(copy) != 0){
g_err << "Failed to create table: " << g_tablename << endl;
return -1;
}
NdbDictionary::Index x(g_indexname);
x.setTable(g_tablename);
x.setType(NdbDictionary::Index::OrderedIndex);
x.setLogging(false);
for (unsigned k = 0; k < copy.getNoOfColumns(); k++){
if(copy.getColumn(k)->getPrimaryKey()){
x.addColumnName(copy.getColumn(k)->getName());
}
}
if(dict->createIndex(x) != 0){
g_err << "Failed to create index: " << endl;
return -1;
}
}
g_table = dict->getTable(g_tablename);
g_index = dict->getIndex(g_indexname, g_tablename);
assert(g_table);
assert(g_index);
if(g_paramters[P_CREATE].value)
{
int rows = g_paramters[P_ROWS].value;
HugoTransactions hugoTrans(* g_table);
if (hugoTrans.loadTable(g_ndb, rows)){
g_err.println("Failed to load %s with %d rows",
g_table->getName(), rows);
return -1;
}
}
return 0;
}
示例3: x
int
create_table() {
NdbDictionary::Dictionary* dict = g_ndb->getDictionary();
assert(dict);
if(g_paramters[P_CREATE].value) {
const NdbDictionary::Table * pTab = NDBT_Tables::getTable(g_table);
assert(pTab);
NdbDictionary::Table copy = * pTab;
copy.setLogging(false);
if(dict->createTable(copy) != 0) {
g_err << "Failed to create table: " << g_table << endl;
return -1;
}
NdbDictionary::Index x(g_ordered);
x.setTable(g_table);
x.setType(NdbDictionary::Index::OrderedIndex);
x.setLogging(false);
for (unsigned k = 0; k < copy.getNoOfColumns(); k++) {
if(copy.getColumn(k)->getPrimaryKey()) {
x.addColumn(copy.getColumn(k)->getName());
}
}
if(dict->createIndex(x) != 0) {
g_err << "Failed to create index: " << endl;
return -1;
}
x.setName(g_unique);
x.setType(NdbDictionary::Index::UniqueHashIndex);
if(dict->createIndex(x) != 0) {
g_err << "Failed to create index: " << endl;
return -1;
}
}
g_tab = dict->getTable(g_table);
g_i_unique = dict->getIndex(g_unique, g_table);
g_i_ordered = dict->getIndex(g_ordered, g_table);
assert(g_tab);
assert(g_i_unique);
assert(g_i_ordered);
return 0;
}