Commit Graph

13 Commits

Author SHA1 Message Date
Thomas Goyne 07c40b4517 Reformat list.{hpp,cpp} to match core style 2016-02-03 18:05:44 -08:00
Thomas Goyne 5e71c4178e Merge pull request #17 from realm/tg-multiprocess-schema-init
Fix race condition in multiprocess schema init
2016-01-25 10:04:10 -08:00
Thomas Goyne 016112da8c Merge pull request #20 from realm/tg-read-only-realm
Fix opening read-only Realms in read-only directories
2016-01-25 10:01:45 -08:00
Thomas Goyne 4a971b0102 Merge pull request #35 from realm/tg/cmake-fixes
Add headers and core's CPP flags to cmake
2016-01-25 10:01:34 -08:00
Thomas Goyne 8d10a65088 Make Schema constructable from initializer lists
This enables the following syntax for defining object schemas, which is useful for writing tests:

    Schema schema = {
        {"origin", "", {
            {"array", PropertyTypeArray, "target"}
        }},
        {"target", "", {
            {"prop1", PropertyTypeInt},
            {"prop2", PropertyTypeFloat},
        }},
    };
2016-01-22 11:55:05 -08:00
Thomas Goyne 62a729fbfd Add headers to CMakeLists 2016-01-21 11:06:14 -08:00
Thomas Goyne 4b001e1842 Extract some logic to a helper function to avoid recursion in update_schema() 2016-01-20 16:26:30 -08:00
Thomas Goyne 8d7b5d8d08 Remove the tracking of if any changes were made from update_realm_with_schema()
It was no longer actually used for anything since we now check if any changes
are actually needed before calling it (to avoid beginning a write transaction
when not needed).
2016-01-20 16:26:30 -08:00
Thomas Goyne 9c2d4703ed Reshuffle the updating of m_config in Realm::update_schema() 2016-01-20 16:26:30 -08:00
Thomas Goyne 6c25eeb85c Fix race condition in multiprocess schema init
If the schema was initialized by a different process between when the old
schema was read and the write transaction was began, the schema init code would
see the updated schema version but not re-read the schema, resulting in it
thinking that a migration was required when the schema actually matched.
2016-01-20 16:26:29 -08:00
kishikawa katsumi 0bae415718 Read-only Realm should be opened even in immutable directory Realm files in an app bundle should be opened if marked as read-only 2016-01-20 16:25:10 -08:00
Mark Rowe 548701c2fd Remove a bogus forward-declaration. 2016-01-19 10:41:25 -08:00
Mark Rowe c4191d8af6 Hook the parser tests into the CMake build system. 2016-01-19 10:41:25 -08:00