本文整理汇总了C++中SharedGroup::get_version_of_current_transaction方法的典型用法代码示例。如果您正苦于以下问题:C++ SharedGroup::get_version_of_current_transaction方法的具体用法?C++ SharedGroup::get_version_of_current_transaction怎么用?C++ SharedGroup::get_version_of_current_transaction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SharedGroup
的用法示例。
在下文中一共展示了SharedGroup::get_version_of_current_transaction方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: do_prepare_handover
void ResultsNotifier::do_prepare_handover(SharedGroup& sg)
{
if (!m_tv.is_attached()) {
// if the table version didn't change we can just reuse the same handover
// object and bump its version to the current SG version
if (m_tv_handover)
m_tv_handover->version = sg.get_version_of_current_transaction();
return;
}
REALM_ASSERT(m_tv.is_in_sync());
m_tv_handover = sg.export_for_handover(m_tv, MutableSourcePayload::Move);
add_changes(std::move(m_changes));
REALM_ASSERT(m_changes.empty());
// detach the TableView as we won't need it again and keeping it around
// makes advance_read() much more expensive
m_tv = {};
}