当前位置: 首页>>代码示例>>C++>>正文


C++ MojDbQuery::select方法代码示例

本文整理汇总了C++中MojDbQuery::select方法的典型用法代码示例。如果您正苦于以下问题:C++ MojDbQuery::select方法的具体用法?C++ MojDbQuery::select怎么用?C++ MojDbQuery::select使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MojDbQuery的用法示例。


在下文中一共展示了MojDbQuery::select方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetEmailsToDelete

void MojoDatabase::GetEmailsToDelete(Signal::SlotRef slot)
{
	MojErr err;

	MojDbQuery query;
	err = query.from(PopEmailAdapter::POP_EMAIL_KIND);
	ErrorToException(err);

	err = query.select(PopEmailAdapter::ID);
	ErrorToException(err);

	err = query.select(PopEmailAdapter::SERVER_UID);
	ErrorToException(err);

	err = query.select(EmailSchema::FOLDER_ID);
	ErrorToException(err);

	err = query.where("_del", MojDbQuery::OpEq, true);
	ErrorToException(err);

	query.includeDeleted(true);

	slot.cancel();
	err = m_dbClient.find(slot, query);
	ErrorToException(err);
}
开发者ID:Garfonso,项目名称:app-services,代码行数:26,代码来源:MojoDatabase.cpp

示例2: GetEmailsToMove

void MojoDatabase::GetEmailsToMove(Signal::SlotRef slot, const MojObject& accountId)
{
	MojErr err;

	MojDbQuery query;
	err = query.from(PopEmailAdapter::POP_EMAIL_KIND);
	ErrorToException(err);

	err = query.select(PopEmailAdapter::ID);
	ErrorToException(err);

	err = query.select("folderId");
	ErrorToException(err);

	err = query.select("destFolderId");
	ErrorToException(err);

	err = query.select("flags");
	ErrorToException(err);

	err = query.select(PopEmailAdapter::SERVER_UID);
	ErrorToException(err);

	err = query.where("destFolderId", MojDbQuery::OpNotEq, MojObject());
	ErrorToException(err);

	slot.cancel();
	err = m_dbClient.find(slot, query);
	ErrorToException(err);
}
开发者ID:Garfonso,项目名称:app-services,代码行数:30,代码来源:MojoDatabase.cpp

示例3: GetEmailSyncList

void MojoDatabase::GetEmailSyncList(Signal::SlotRef slot, const MojObject& folderId, const MojInt64& rev, bool desc, MojDbQuery::Page& page, MojInt32 limit)
{
	MojErr err;

	MojDbQuery query;
	err = query.from(PopEmailAdapter::POP_EMAIL_KIND);//EmailSchema::Kind::EMAIL);
	ErrorToException(err);

	// Select relevant fields
	err = query.select(PopEmailAdapter::ID);
	ErrorToException(err);

	err = query.select(PopEmailAdapter::SERVER_UID);
	ErrorToException(err);

	err = query.select(EmailSchema::TIMESTAMP);
	ErrorToException(err);

	err = query.where(EmailSchema::FOLDER_ID, MojDbQuery::OpEq, folderId);
	ErrorToException(err);

	if (rev > 0) {
		err = query.where(PopFolderAdapter::LAST_SYNC_REV, MojDbQuery::OpGreaterThan, rev);
		ErrorToException(err);
	}

	query.page(page);

	// Sort by timestamp descending
	err = query.order(EmailSchema::TIMESTAMP);
	ErrorToException(err);
	query.desc(desc);

	// Set limit
	if(limit > 0) {
		query.limit(limit);
	}

	slot.cancel(); // cancel existing slot in case we're in a callback

	err = m_dbClient.find(slot, query);
	ErrorToException(err);
}
开发者ID:Garfonso,项目名称:app-services,代码行数:43,代码来源:MojoDatabase.cpp

示例4: GetDeletedEmails

void MojoDatabase::GetDeletedEmails(Signal::SlotRef slot, const MojObject& folderId, const MojInt64& rev, MojDbQuery::Page& page, MojInt32 limit)
{
	MojErr err;

	MojDbQuery query;
	err = query.from(PopEmailAdapter::POP_EMAIL_KIND);
	ErrorToException(err);

	// Select relevant fields
	err = query.select(PopEmailAdapter::ID);
	ErrorToException(err);

	err = query.select(PopEmailAdapter::SERVER_UID);
	ErrorToException(err);

	err = query.where(EmailSchema::FOLDER_ID, MojDbQuery::OpEq, folderId);
	ErrorToException(err);

	err = query.where("_del", MojDbQuery::OpEq, true);
	ErrorToException(err);

	// Set limit
	if(limit > 0) {
		query.limit(limit);
	}

	// Make sure deleted objects are returned
	query.includeDeleted(true);

	// Set page
	query.page(page);

	slot.cancel(); // cancel existing slot in case we're in a callback
	err = m_dbClient.find(slot, query);
	ErrorToException(err);
}
开发者ID:Garfonso,项目名称:app-services,代码行数:36,代码来源:MojoDatabase.cpp


注:本文中的MojDbQuery::select方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。