19#ifndef CPPREALM_FLEXIBLE_SYNC_HPP
20#define CPPRALM_FLEXIBLE_SYNC_HPP
25#include <cpprealm/internal/bridge/obj.hpp>
26#include <cpprealm/internal/bridge/ 쿼리.hpp>
27#include <cpprealm/internal/bridge/schema.hpp>
28#include <cpprealm/internal/bridge/realm.hpp>
29#include <cpprealm/internal/bridge/utils.hpp>
31#include <cpprealm/macros.hpp>
32#include <cpprealm/results.hpp>
33#include <cpprealm/rbool.hpp>
41 클래스 MutableSubscriptionSet;
43 클래스 SubscriptionStore;
53 std::optional<std::string> 이름;
55 std::chrono::time_point<std::chrono::system_clock> created_at;
57 std::chrono::time_point<std::chrono::system_clock> updated_at;
59 std::string query_string;
61 std::string object_class_name;
86 oid add(
const std::string &name ,
87 std::optional<std::function<
rbool(
managed<T> &)>> &&query_fn = std::nullopt) {
88 static_assert(
sizeof(
managed<T>),
"Must explain schema for T");
91 자동 그룹 = m_realm.get().read_group();
92 auto table_ref = group.get_table(schema.table_key());
98 auto full_query = (*query_fn)(query_object).q;
99 insert_or_assign(name, full_query);
101 insert_or_assign(name, root_query);
107 무효 제거(
const std::string& name);
111 std::optional<sync_subscription> find(
const std::string& name);
118 std::enable_if_t<std::is_base_of_v< 객체<T>, T>>
119 update_subscription(
const std::string& name, std::optional<std::function<
rbool(T&)>>&& query_fn = std::nullopt) {
121 add(name, std::move(query_fn));
129 update_subscription (
const std::string& name,
130 std::optional<std::function<
rbool(
managed<T>&)>>&& query_fn = std::nullopt) {
132 add(name, std::move(query_fn));
140#ifdef CPPRALM_HAVE_GENERATED_BRIDGE_TYPES
141 internal::bridge:: 저장::MutableSyncSubscriptionSet m_subscription_set[1];
143 std::shared_ptr<sync::MutableSubscriptionSet> m_subscription_set;
145 std::reference_wrapper<internal::bridge::realm> m_realm;
147 동기화::MutableSubscriptionSet get_subscription_set();
160 [[nodiscard]]
size_t size()
const;
164 std::optional<sync_subscription> find(
const std::string& name);
171#ifdef CPPRALM_HAVE_GENERATED_BRIDGE_TYPES
172 internal::bridge:: 저장::SyncSubscriptionSet m_subscription_set[1];
174 std::shared_ptr<sync::SubscriptionSet> m_subscription_set;
176 std::reference_wrapper<internal::bridge::realm> m_realm;
size_t size() const
세트의 총 구독 수입니다.
정의: flex_sync.cpp:134