本文整理汇总了C++中ExplorerCollectionTreeItem::openCurrentCollectionShell方法的典型用法代码示例。如果您正苦于以下问题:C++ ExplorerCollectionTreeItem::openCurrentCollectionShell方法的具体用法?C++ ExplorerCollectionTreeItem::openCurrentCollectionShell怎么用?C++ ExplorerCollectionTreeItem::openCurrentCollectionShell使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExplorerCollectionTreeItem
的用法示例。
在下文中一共展示了ExplorerCollectionTreeItem::openCurrentCollectionShell方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ui_dropIndex
void ExplorerCollectionDirIndexesTreeItem::ui_dropIndex()
{
ExplorerCollectionTreeItem *par = dynamic_cast<ExplorerCollectionTreeItem *>(parent());
if (par) {
par->openCurrentCollectionShell("dropIndex({ \"<field>\" : 1 });", false);
}
}
示例2: ui_viewIndex
void ExplorerCollectionDirIndexesTreeItem::ui_viewIndex()
{
ExplorerCollectionTreeItem *par = dynamic_cast<ExplorerCollectionTreeItem *>(parent());
if (par) {
par->openCurrentCollectionShell("getIndexes()");
}
}
示例3: ui_reIndex
void ExplorerCollectionDirIndexesTreeItem::ui_reIndex()
{
ExplorerCollectionTreeItem *par = dynamic_cast<ExplorerCollectionTreeItem *>(parent());
if (par) {
par->openCurrentCollectionShell("reIndex()", false);
}
}
示例4: ui_addIndex
void ExplorerCollectionDirIndexesTreeItem::ui_addIndex()
{
ExplorerCollectionTreeItem *par = dynamic_cast<ExplorerCollectionTreeItem *>(parent());
if (par) {
par->openCurrentCollectionShell(
"ensureIndex({ \"<field>\" : 1 }); \n"
"\n"
"// options: \n"
"// { unique : true } - A unique index causes MongoDB to reject all documents that contain a duplicate value for the indexed field. \n"
"// { sparse : true } - Sparse indexes only contain entries for documents that have the indexed field. \n"
"// { dropDups : true } - Sparse indexes only contain entries for documents that have the indexed field. \n"
, false);
}
}