Skip to content

Commit

Permalink
Add missing namespace to quick start snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
dacharyc committed May 6, 2024
1 parent 207bd47 commit 0594ebc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/cpp/sync/quick-start.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ struct Local_Todo {
std::string status;
};
REALM_SCHEMA(Local_Todo, _id, name, status);
} // namespace realm

// :snippet-start: model
namespace realm {
struct Sync_Todo {
realm::primary_key<realm::object_id> _id{realm::object_id::generate()};
std::string name;
Expand All @@ -31,8 +33,8 @@ struct Sync_Todo {
std::string ownerId;
};
REALM_SCHEMA(Sync_Todo, _id, name, status, ownerId);
// :snippet-end:
} // namespace realm
// :snippet-end:

TEST_CASE("non-sync quick start", "[realm][write]") {
auto relative_realm_path_directory = "quick-start/";
Expand Down
2 changes: 2 additions & 0 deletions source/examples/generated/cpp/quick-start.snippet.model.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
namespace realm {
struct Todo {
realm::primary_key<realm::object_id> _id{realm::object_id::generate()};
std::string name;
Expand All @@ -7,3 +8,4 @@ struct Todo {
std::string ownerId;
};
REALM_SCHEMA(Todo, _id, name, status, ownerId);
} // namespace realm

0 comments on commit 0594ebc

Please sign in to comment.