Skip to content

Commit

Permalink
Expose relaxed schema configuration to C-API configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
rorbech committed Jul 5, 2024
1 parent 4fa4284 commit 73198bc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/realm.h
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,11 @@ RLM_API bool realm_config_get_cached(realm_config_t*) RLM_API_NOEXCEPT;
*/
RLM_API void realm_config_set_automatic_backlink_handling(realm_config_t*, bool) RLM_API_NOEXCEPT;

/**
* Allow realm objects in the realm to have additional properties that are not defined in the schema.
*/
RLM_API void realm_config_set_flexible_schema(realm_config_t*, bool) RLM_API_NOEXCEPT;

/**
* Create a custom scheduler object from callback functions.
*
Expand Down
6 changes: 6 additions & 0 deletions src/realm/object-store/c_api/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,9 @@ RLM_API void realm_config_set_automatic_backlink_handling(realm_config_t* realm_
{
realm_config->automatically_handle_backlinks_in_migrations = enable_automatic_handling;
}

RLM_API void realm_config_set_flexible_schema(realm_config_t* realm_config,
bool flexible_schema) noexcept
{
realm_config->flexible_schema = flexible_schema;
}

0 comments on commit 73198bc

Please sign in to comment.