Adopt core's query parser and update to core v5.1.2 (#1563)

* Adopt core's query parser.
* Realm Core 5.1.2
* Realm Sync 2.2.9
This commit is contained in:
Mark Rowe 2018-01-11 02:52:46 -08:00 committed by Kenneth Geisshirt
parent b5eacfcf16
commit 933b3ad765
13 changed files with 37 additions and 76 deletions

View File

@ -4,15 +4,18 @@ X.Y.Z Release notes
* None. * None.
### Enhancements ### Enhancements
* Added new query features to support a subset of `NSPredicates` for example `LIKE` for string matches, `@count` and `@sum` in lists. See documentation for more details.
* Potential performance enhancements in cases of many writes between queries.
* [Object Server] Added method `Realm.Sync.User.authenticate` to unify authentication of users. * [Object Server] Added method `Realm.Sync.User.authenticate` to unify authentication of users.
* [Object Server] Added JWT authenfication (#1548). * [Object Server] Added JWT authenfication (#1548).
### Bug fixes ### Bug fixes
* Fix a bug where `Realm.open` could unexpectedly raise a "Realm at path ... already opened with different schema version" error. * Fixed a bug where `Realm.open` could unexpectedly raise a "Realm at path ... already opened with different schema version" error.
* Increased request timeout for token refresh requests to 10 seconds. This * Increased request timeout for token refresh requests to 10 seconds. This should help with failing token refreshes on a loaded server.
should help with failing token refreshes on a loaded server.
### Internal ### Internal
* Updated to Realm Sync 2.2.9.
* Updated to Realm Core 5.1.2 (see "Enhancements").
* Explicitly send `register: false` when logging in with `Realm.Sync.User.login` to avoid creating the user if they don't exist. * Explicitly send `register: false` when logging in with `Realm.Sync.User.login` to avoid creating the user if they don't exist.
2.1.1 Release notes (2017-12-15) 2.1.1 Release notes (2017-12-15)

View File

@ -1,5 +1,5 @@
PACKAGE_NAME=realm-js PACKAGE_NAME=realm-js
VERSION=2.1.1 VERSION=2.1.1
REALM_CORE_VERSION=4.0.2 REALM_CORE_VERSION=5.1.2
REALM_SYNC_VERSION=2.1.10 REALM_SYNC_VERSION=2.2.9
REALM_OBJECT_SERVER_VERSION=2.2.0 REALM_OBJECT_SERVER_VERSION=2.2.0

View File

@ -95,6 +95,7 @@
"lzma-native": "^3.0.4" "lzma-native": "^3.0.4"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^4.0.35",
"babel-eslint": "^6.0.4", "babel-eslint": "^6.0.4",
"eslint": "^3.2.2", "eslint": "^3.2.2",
"eslint-plugin-jasmine": "^2.1.0", "eslint-plugin-jasmine": "^2.1.0",

View File

@ -52,9 +52,6 @@ LOCAL_SRC_FILES += src/object-store/src/impl/results_notifier.cpp
LOCAL_SRC_FILES += src/object-store/src/impl/transact_log_handler.cpp LOCAL_SRC_FILES += src/object-store/src/impl/transact_log_handler.cpp
LOCAL_SRC_FILES += src/object-store/src/impl/weak_realm_notifier.cpp LOCAL_SRC_FILES += src/object-store/src/impl/weak_realm_notifier.cpp
LOCAL_SRC_FILES += src/object-store/src/impl/epoll/external_commit_helper.cpp LOCAL_SRC_FILES += src/object-store/src/impl/epoll/external_commit_helper.cpp
LOCAL_SRC_FILES += src/object-store/src/parser/parser.cpp
LOCAL_SRC_FILES += src/object-store/src/parser/query_builder.cpp
LOCAL_SRC_FILES += src/object-store/src/util/format.cpp
LOCAL_SRC_FILES += src/object-store/src/util/uuid.cpp LOCAL_SRC_FILES += src/object-store/src/util/uuid.cpp
LOCAL_SRC_FILES += src/object-store/src/binding_callback_thread_observer.cpp LOCAL_SRC_FILES += src/object-store/src/binding_callback_thread_observer.cpp
LOCAL_SRC_FILES += src/object-store/src/collection_notifications.cpp LOCAL_SRC_FILES += src/object-store/src/collection_notifications.cpp
@ -82,8 +79,6 @@ LOCAL_C_INCLUDES := src
LOCAL_C_INCLUDES += src/jsc LOCAL_C_INCLUDES += src/jsc
LOCAL_C_INCLUDES += src/object-store/src LOCAL_C_INCLUDES += src/object-store/src
LOCAL_C_INCLUDES += src/object-store/src/impl LOCAL_C_INCLUDES += src/object-store/src/impl
LOCAL_C_INCLUDES += src/object-store/src/parser
LOCAL_C_INCLUDES += src/object-store/external/pegtl
LOCAL_C_INCLUDES += vendor LOCAL_C_INCLUDES += vendor
LOCAL_C_INCLUDES += $(JAVA_HOME)/include LOCAL_C_INCLUDES += $(JAVA_HOME)/include
LOCAL_C_INCLUDES += $(JAVA_HOME)/include/darwin LOCAL_C_INCLUDES += $(JAVA_HOME)/include/darwin

View File

@ -59,9 +59,6 @@
"src/object-store/src/impl/results_notifier.cpp", "src/object-store/src/impl/results_notifier.cpp",
"src/object-store/src/impl/transact_log_handler.cpp", "src/object-store/src/impl/transact_log_handler.cpp",
"src/object-store/src/impl/weak_realm_notifier.cpp", "src/object-store/src/impl/weak_realm_notifier.cpp",
"src/object-store/src/parser/parser.cpp",
"src/object-store/src/parser/query_builder.cpp",
"src/object-store/src/util/format.cpp",
"src/object-store/src/util/uuid.cpp", "src/object-store/src/util/uuid.cpp",
"src/object-store/src/binding_callback_thread_observer.hpp", "src/object-store/src/binding_callback_thread_observer.hpp",
@ -93,8 +90,6 @@
"src/object-store/src/object_accessor.hpp", "src/object-store/src/object_accessor.hpp",
"src/object-store/src/object_schema.hpp", "src/object-store/src/object_schema.hpp",
"src/object-store/src/object_store.hpp", "src/object-store/src/object_store.hpp",
"src/object-store/src/parser/parser.hpp",
"src/object-store/src/parser/query_builder.hpp",
"src/object-store/src/property.hpp", "src/object-store/src/property.hpp",
"src/object-store/src/results.hpp", "src/object-store/src/results.hpp",
"src/object-store/src/schema.hpp", "src/object-store/src/schema.hpp",
@ -114,12 +109,10 @@
"src/object-store/src/thread_safe_reference.hpp", "src/object-store/src/thread_safe_reference.hpp",
"src/object-store/src/util/aligned_union.hpp", "src/object-store/src/util/aligned_union.hpp",
"src/object-store/src/util/android/event_loop_signal.hpp", "src/object-store/src/util/android/event_loop_signal.hpp",
"src/object-store/src/util/any.hpp",
"src/object-store/src/util/apple/event_loop_signal.hpp", "src/object-store/src/util/apple/event_loop_signal.hpp",
"src/object-store/src/util/atomic_shared_ptr.hpp", "src/object-store/src/util/atomic_shared_ptr.hpp",
"src/object-store/src/util/compiler.hpp", "src/object-store/src/util/compiler.hpp",
"src/object-store/src/util/event_loop_signal.hpp", "src/object-store/src/util/event_loop_signal.hpp",
"src/object-store/src/util/format.hpp",
"src/object-store/src/util/generic/event_loop_signal.hpp", "src/object-store/src/util/generic/event_loop_signal.hpp",
"src/object-store/src/util/tagged_bool.hpp", "src/object-store/src/util/tagged_bool.hpp",
"src/object-store/src/util/time.hpp", "src/object-store/src/util/time.hpp",
@ -165,7 +158,6 @@
"src/object-store/src", "src/object-store/src",
"src/object-store/src/impl", "src/object-store/src/impl",
"src/object-store/src/impl/apple", "src/object-store/src/impl/apple",
"src/object-store/src/parser",
"src/object-store/external/pegtl" "src/object-store/external/pegtl"
] ]
}, },
@ -184,7 +176,7 @@
] ]
}, },
"link_settings": { "link_settings": {
"libraries": [ "-lrealm<(debug_library_suffix)" ], "libraries": [ "-lrealm-parser<(debug_library_suffix)", "-lrealm<(debug_library_suffix)" ],
}, },
"variables": { "variables": {
"prefix": "<!(node -p \"process.env.REALM_CORE_PREFIX || String()\")" "prefix": "<!(node -p \"process.env.REALM_CORE_PREFIX || String()\")"

View File

@ -10,9 +10,6 @@
02022A581DA476CD000F0C4F /* external_commit_helper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02022A411DA47489000F0C4F /* external_commit_helper.cpp */; }; 02022A581DA476CD000F0C4F /* external_commit_helper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02022A411DA47489000F0C4F /* external_commit_helper.cpp */; };
02022A5A1DA476CD000F0C4F /* weak_realm_notifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02022A4A1DA475A9000F0C4F /* weak_realm_notifier.cpp */; }; 02022A5A1DA476CD000F0C4F /* weak_realm_notifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02022A4A1DA475A9000F0C4F /* weak_realm_notifier.cpp */; };
02022A5B1DA476CD000F0C4F /* placeholder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02022A4C1DA475C0000F0C4F /* placeholder.cpp */; }; 02022A5B1DA476CD000F0C4F /* placeholder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02022A4C1DA475C0000F0C4F /* placeholder.cpp */; };
02022A671DA47BD7000F0C4F /* parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02022A611DA47B8B000F0C4F /* parser.cpp */; };
02022A681DA47BD7000F0C4F /* query_builder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02022A631DA47B8B000F0C4F /* query_builder.cpp */; };
02022A7C1DA47EC8000F0C4F /* format.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02022A731DA47EC8000F0C4F /* format.cpp */; };
022BF1021E7266DF00F382F1 /* binding_callback_thread_observer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 022BF0FF1E7266C800F382F1 /* binding_callback_thread_observer.cpp */; }; 022BF1021E7266DF00F382F1 /* binding_callback_thread_observer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 022BF0FF1E7266C800F382F1 /* binding_callback_thread_observer.cpp */; };
02409DC21BCF11D6005F3B3E /* RealmJSCoreTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 02409DC11BCF11D6005F3B3E /* RealmJSCoreTests.m */; }; 02409DC21BCF11D6005F3B3E /* RealmJSCoreTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 02409DC11BCF11D6005F3B3E /* RealmJSCoreTests.m */; };
02414B881CE68CA200A8669F /* dates-v5.realm in Resources */ = {isa = PBXBuildFile; fileRef = 02414B871CE68CA200A8669F /* dates-v5.realm */; }; 02414B881CE68CA200A8669F /* dates-v5.realm in Resources */ = {isa = PBXBuildFile; fileRef = 02414B871CE68CA200A8669F /* dates-v5.realm */; };
@ -95,17 +92,10 @@
02022A481DA474A7000F0C4F /* weak_realm_notifier.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = weak_realm_notifier.hpp; sourceTree = "<group>"; }; 02022A481DA474A7000F0C4F /* weak_realm_notifier.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = weak_realm_notifier.hpp; sourceTree = "<group>"; };
02022A4A1DA475A9000F0C4F /* weak_realm_notifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = weak_realm_notifier.cpp; sourceTree = "<group>"; }; 02022A4A1DA475A9000F0C4F /* weak_realm_notifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = weak_realm_notifier.cpp; sourceTree = "<group>"; };
02022A4C1DA475C0000F0C4F /* placeholder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = placeholder.cpp; path = src/placeholder.cpp; sourceTree = "<group>"; }; 02022A4C1DA475C0000F0C4F /* placeholder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = placeholder.cpp; path = src/placeholder.cpp; sourceTree = "<group>"; };
02022A611DA47B8B000F0C4F /* parser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = parser.cpp; sourceTree = "<group>"; };
02022A621DA47B8B000F0C4F /* parser.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = parser.hpp; sourceTree = "<group>"; };
02022A631DA47B8B000F0C4F /* query_builder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = query_builder.cpp; sourceTree = "<group>"; };
02022A641DA47B8B000F0C4F /* query_builder.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = query_builder.hpp; sourceTree = "<group>"; };
02022A6D1DA47EC8000F0C4F /* event_loop_signal.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = event_loop_signal.hpp; sourceTree = "<group>"; }; 02022A6D1DA47EC8000F0C4F /* event_loop_signal.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = event_loop_signal.hpp; sourceTree = "<group>"; };
02022A6F1DA47EC8000F0C4F /* event_loop_signal.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = event_loop_signal.hpp; sourceTree = "<group>"; }; 02022A6F1DA47EC8000F0C4F /* event_loop_signal.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = event_loop_signal.hpp; sourceTree = "<group>"; };
02022A701DA47EC8000F0C4F /* atomic_shared_ptr.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = atomic_shared_ptr.hpp; sourceTree = "<group>"; }; 02022A701DA47EC8000F0C4F /* atomic_shared_ptr.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = atomic_shared_ptr.hpp; sourceTree = "<group>"; };
02022A711DA47EC8000F0C4F /* compiler.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = compiler.hpp; sourceTree = "<group>"; };
02022A721DA47EC8000F0C4F /* event_loop_signal.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = event_loop_signal.hpp; sourceTree = "<group>"; }; 02022A721DA47EC8000F0C4F /* event_loop_signal.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = event_loop_signal.hpp; sourceTree = "<group>"; };
02022A731DA47EC8000F0C4F /* format.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = format.cpp; sourceTree = "<group>"; };
02022A741DA47EC8000F0C4F /* format.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = format.hpp; sourceTree = "<group>"; };
02022A761DA47EC8000F0C4F /* event_loop_signal.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = event_loop_signal.hpp; sourceTree = "<group>"; }; 02022A761DA47EC8000F0C4F /* event_loop_signal.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = event_loop_signal.hpp; sourceTree = "<group>"; };
02022A781DA47EC8000F0C4F /* event_loop_signal.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = event_loop_signal.hpp; sourceTree = "<group>"; }; 02022A781DA47EC8000F0C4F /* event_loop_signal.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = event_loop_signal.hpp; sourceTree = "<group>"; };
022BF0FF1E7266C800F382F1 /* binding_callback_thread_observer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = binding_callback_thread_observer.cpp; path = src/binding_callback_thread_observer.cpp; sourceTree = "<group>"; }; 022BF0FF1E7266C800F382F1 /* binding_callback_thread_observer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = binding_callback_thread_observer.cpp; path = src/binding_callback_thread_observer.cpp; sourceTree = "<group>"; };
@ -186,14 +176,12 @@
3FCE2A881F58BDE500D4855B /* primitive_list_notifier.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = primitive_list_notifier.hpp; sourceTree = "<group>"; }; 3FCE2A881F58BDE500D4855B /* primitive_list_notifier.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = primitive_list_notifier.hpp; sourceTree = "<group>"; };
3FCE2A891F58BDE500D4855B /* primitive_list_notifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = primitive_list_notifier.cpp; sourceTree = "<group>"; }; 3FCE2A891F58BDE500D4855B /* primitive_list_notifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = primitive_list_notifier.cpp; sourceTree = "<group>"; };
3FCE2A8C1F58BDFF00D4855B /* aligned_union.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = aligned_union.hpp; sourceTree = "<group>"; }; 3FCE2A8C1F58BDFF00D4855B /* aligned_union.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = aligned_union.hpp; sourceTree = "<group>"; };
3FCE2A8D1F58BDFF00D4855B /* any.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = any.hpp; sourceTree = "<group>"; };
3FCE2A8E1F58BDFF00D4855B /* tagged_bool.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = tagged_bool.hpp; sourceTree = "<group>"; }; 3FCE2A8E1F58BDFF00D4855B /* tagged_bool.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = tagged_bool.hpp; sourceTree = "<group>"; };
3FCE2A8F1F58BDFF00D4855B /* time.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = time.hpp; sourceTree = "<group>"; }; 3FCE2A8F1F58BDFF00D4855B /* time.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = time.hpp; sourceTree = "<group>"; };
3FCE2A901F58BDFF00D4855B /* uuid.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = uuid.hpp; sourceTree = "<group>"; }; 3FCE2A901F58BDFF00D4855B /* uuid.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = uuid.hpp; sourceTree = "<group>"; };
3FCE2A911F58BDFF00D4855B /* uuid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = uuid.cpp; sourceTree = "<group>"; }; 3FCE2A911F58BDFF00D4855B /* uuid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = uuid.cpp; sourceTree = "<group>"; };
3FCE2A941F58BE1D00D4855B /* sync_permission.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = sync_permission.hpp; path = src/sync/sync_permission.hpp; sourceTree = "<group>"; }; 3FCE2A941F58BE1D00D4855B /* sync_permission.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = sync_permission.hpp; path = src/sync/sync_permission.hpp; sourceTree = "<group>"; };
3FCE2A951F58BE1D00D4855B /* sync_permission.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sync_permission.cpp; path = src/sync/sync_permission.cpp; sourceTree = "<group>"; }; 3FCE2A951F58BE1D00D4855B /* sync_permission.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sync_permission.cpp; path = src/sync/sync_permission.cpp; sourceTree = "<group>"; };
3FCE2A981F58BE3600D4855B /* descriptor_ordering.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = descriptor_ordering.hpp; path = "object-store/src/descriptor_ordering.hpp"; sourceTree = SOURCE_ROOT; };
3FCE2A991F58BE3600D4855B /* feature_checks.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = feature_checks.hpp; path = "object-store/src/feature_checks.hpp"; sourceTree = SOURCE_ROOT; }; 3FCE2A991F58BE3600D4855B /* feature_checks.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = feature_checks.hpp; path = "object-store/src/feature_checks.hpp"; sourceTree = SOURCE_ROOT; };
423737AF1F7E333400FAEDFF /* partial_sync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = partial_sync.cpp; path = src/sync/partial_sync.cpp; sourceTree = "<group>"; }; 423737AF1F7E333400FAEDFF /* partial_sync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = partial_sync.cpp; path = src/sync/partial_sync.cpp; sourceTree = "<group>"; };
423737B01F7E333400FAEDFF /* partial_sync.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = partial_sync.hpp; path = src/sync/partial_sync.hpp; sourceTree = "<group>"; }; 423737B01F7E333400FAEDFF /* partial_sync.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = partial_sync.hpp; path = src/sync/partial_sync.hpp; sourceTree = "<group>"; };
@ -325,12 +313,8 @@
02022A751DA47EC8000F0C4F /* generic */, 02022A751DA47EC8000F0C4F /* generic */,
02022A771DA47EC8000F0C4F /* uv */, 02022A771DA47EC8000F0C4F /* uv */,
3FCE2A8C1F58BDFF00D4855B /* aligned_union.hpp */, 3FCE2A8C1F58BDFF00D4855B /* aligned_union.hpp */,
3FCE2A8D1F58BDFF00D4855B /* any.hpp */,
02022A701DA47EC8000F0C4F /* atomic_shared_ptr.hpp */, 02022A701DA47EC8000F0C4F /* atomic_shared_ptr.hpp */,
02022A711DA47EC8000F0C4F /* compiler.hpp */,
02022A721DA47EC8000F0C4F /* event_loop_signal.hpp */, 02022A721DA47EC8000F0C4F /* event_loop_signal.hpp */,
02022A731DA47EC8000F0C4F /* format.cpp */,
02022A741DA47EC8000F0C4F /* format.hpp */,
3FCE2A8E1F58BDFF00D4855B /* tagged_bool.hpp */, 3FCE2A8E1F58BDFF00D4855B /* tagged_bool.hpp */,
3FCE2A8F1F58BDFF00D4855B /* time.hpp */, 3FCE2A8F1F58BDFF00D4855B /* time.hpp */,
3FCE2A911F58BDFF00D4855B /* uuid.cpp */, 3FCE2A911F58BDFF00D4855B /* uuid.cpp */,
@ -529,7 +513,6 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
F63117EA1CEB0BFA00ECB2DE /* impl */, F63117EA1CEB0BFA00ECB2DE /* impl */,
F63117EC1CEB0C8100ECB2DE /* parser */,
02E315CC1DB80DE000555337 /* sync */, 02E315CC1DB80DE000555337 /* sync */,
02022A6B1DA47EC8000F0C4F /* util */, 02022A6B1DA47EC8000F0C4F /* util */,
022BF0FF1E7266C800F382F1 /* binding_callback_thread_observer.cpp */, 022BF0FF1E7266C800F382F1 /* binding_callback_thread_observer.cpp */,
@ -537,7 +520,6 @@
02F59EAE1C88F17D007F774C /* binding_context.hpp */, 02F59EAE1C88F17D007F774C /* binding_context.hpp */,
02414B961CE6AADD00A8669F /* collection_notifications.cpp */, 02414B961CE6AADD00A8669F /* collection_notifications.cpp */,
02414B971CE6AADD00A8669F /* collection_notifications.hpp */, 02414B971CE6AADD00A8669F /* collection_notifications.hpp */,
3FCE2A981F58BE3600D4855B /* descriptor_ordering.hpp */,
5D02C7781E1C83650048C13E /* execution_context_id.hpp */, 5D02C7781E1C83650048C13E /* execution_context_id.hpp */,
3FCE2A991F58BE3600D4855B /* feature_checks.hpp */, 3FCE2A991F58BE3600D4855B /* feature_checks.hpp */,
02F59EAF1C88F17D007F774C /* index_set.cpp */, 02F59EAF1C88F17D007F774C /* index_set.cpp */,
@ -630,18 +612,6 @@
path = apple; path = apple;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
F63117EC1CEB0C8100ECB2DE /* parser */ = {
isa = PBXGroup;
children = (
02022A611DA47B8B000F0C4F /* parser.cpp */,
02022A621DA47B8B000F0C4F /* parser.hpp */,
02022A631DA47B8B000F0C4F /* query_builder.cpp */,
02022A641DA47B8B000F0C4F /* query_builder.hpp */,
);
name = parser;
path = src/parser;
sourceTree = "<group>";
};
F63118421CEBA7A100ECB2DE /* android */ = { F63118421CEBA7A100ECB2DE /* android */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@ -887,7 +857,7 @@
outputPaths = ( outputPaths = (
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = "/bin/sh"; shellPath = /bin/sh;
shellScript = "[ -z \"$NVM_DIR\" ] && export NVM_DIR=\"$HOME/.nvm\"\n\nif [[ -s \"$HOME/.nvm/nvm.sh\" ]]; then\n . \"$HOME/.nvm/nvm.sh\"\nelif [[ -x \"$(command -v brew)\" && -s \"$(brew --prefix nvm)/nvm.sh\" ]]; then\n . \"$(brew --prefix nvm)/nvm.sh\"\nfi\n \nif [[ \"$(command -v nvm)\" ]]; then\n nvm install 7.10.0\nfi\n \n node ../scripts/download-realm.js ios --sync"; shellScript = "[ -z \"$NVM_DIR\" ] && export NVM_DIR=\"$HOME/.nvm\"\n\nif [[ -s \"$HOME/.nvm/nvm.sh\" ]]; then\n . \"$HOME/.nvm/nvm.sh\"\nelif [[ -x \"$(command -v brew)\" && -s \"$(brew --prefix nvm)/nvm.sh\" ]]; then\n . \"$(brew --prefix nvm)/nvm.sh\"\nfi\n \nif [[ \"$(command -v nvm)\" ]]; then\n nvm install 7.10.0\nfi\n \n node ../scripts/download-realm.js ios --sync";
}; };
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
@ -913,7 +883,6 @@
02414BA91CE6ABCF00A8669F /* collection_notifications.cpp in Sources */, 02414BA91CE6ABCF00A8669F /* collection_notifications.cpp in Sources */,
02414BA61CE6ABCF00A8669F /* collection_notifier.cpp in Sources */, 02414BA61CE6ABCF00A8669F /* collection_notifier.cpp in Sources */,
02022A581DA476CD000F0C4F /* external_commit_helper.cpp in Sources */, 02022A581DA476CD000F0C4F /* external_commit_helper.cpp in Sources */,
02022A7C1DA47EC8000F0C4F /* format.cpp in Sources */,
02F59EBF1C88F17D007F774C /* index_set.cpp in Sources */, 02F59EBF1C88F17D007F774C /* index_set.cpp in Sources */,
F63FF2C91C12469E00B3B8E0 /* js_realm.cpp in Sources */, F63FF2C91C12469E00B3B8E0 /* js_realm.cpp in Sources */,
F63FF2C61C12469E00B3B8E0 /* jsc_init.cpp in Sources */, F63FF2C61C12469E00B3B8E0 /* jsc_init.cpp in Sources */,
@ -926,11 +895,9 @@
8507156E1E2CFCD000E548DB /* object_notifier.cpp in Sources */, 8507156E1E2CFCD000E548DB /* object_notifier.cpp in Sources */,
02F59EC11C88F17D007F774C /* object_schema.cpp in Sources */, 02F59EC11C88F17D007F774C /* object_schema.cpp in Sources */,
02F59EC21C88F17D007F774C /* object_store.cpp in Sources */, 02F59EC21C88F17D007F774C /* object_store.cpp in Sources */,
02022A671DA47BD7000F0C4F /* parser.cpp in Sources */,
02022A5B1DA476CD000F0C4F /* placeholder.cpp in Sources */, 02022A5B1DA476CD000F0C4F /* placeholder.cpp in Sources */,
F63FF2E81C159C4B00B3B8E0 /* platform.mm in Sources */, F63FF2E81C159C4B00B3B8E0 /* platform.mm in Sources */,
3FCE2A8B1F58BDEF00D4855B /* primitive_list_notifier.cpp in Sources */, 3FCE2A8B1F58BDEF00D4855B /* primitive_list_notifier.cpp in Sources */,
02022A681DA47BD7000F0C4F /* query_builder.cpp in Sources */,
02F59EE21C88F2BB007F774C /* realm_coordinator.cpp in Sources */, 02F59EE21C88F2BB007F774C /* realm_coordinator.cpp in Sources */,
02F59EC31C88F17D007F774C /* results.cpp in Sources */, 02F59EC31C88F17D007F774C /* results.cpp in Sources */,
02414BA81CE6ABCF00A8669F /* results_notifier.cpp in Sources */, 02414BA81CE6ABCF00A8669F /* results_notifier.cpp in Sources */,
@ -1152,7 +1119,10 @@
"-isystem", "-isystem",
"$(SRCROOT)/../vendor/sync/include", "$(SRCROOT)/../vendor/sync/include",
); );
OTHER_LIBTOOLFLAGS = "$(SRCROOT)/../vendor/realm-ios/librealm-ios-dbg.a"; OTHER_LIBTOOLFLAGS = (
"$(SRCROOT)/../vendor/realm-ios/librealm-parser-ios-dbg.a",
"$(SRCROOT)/../vendor/realm-ios/librealm-ios-dbg.a",
);
PRODUCT_NAME = RealmJS; PRODUCT_NAME = RealmJS;
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
}; };
@ -1174,7 +1144,10 @@
"-isystem", "-isystem",
"$(SRCROOT)/../vendor/sync/include", "$(SRCROOT)/../vendor/sync/include",
); );
OTHER_LIBTOOLFLAGS = "$(SRCROOT)/../vendor/realm-ios/librealm-ios.a"; OTHER_LIBTOOLFLAGS = (
"$(SRCROOT)/../vendor/realm-ios/librealm-parser-ios.a",
"$(SRCROOT)/../vendor/realm-ios/librealm-ios.a",
);
PRODUCT_NAME = RealmJS; PRODUCT_NAME = RealmJS;
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
}; };

View File

@ -27,8 +27,6 @@
#include "shared_realm.hpp" #include "shared_realm.hpp"
#include "list.hpp" #include "list.hpp"
#include "parser.hpp"
#include "query_builder.hpp"
namespace realm { namespace realm {
namespace js { namespace js {

View File

@ -20,7 +20,6 @@
#include "object_accessor.hpp" #include "object_accessor.hpp"
#include "object_store.hpp" #include "object_store.hpp"
#include "util/format.hpp"
#include "js_class.hpp" #include "js_class.hpp"
#include "js_types.hpp" #include "js_types.hpp"

View File

@ -25,8 +25,9 @@
#include "results.hpp" #include "results.hpp"
#include "list.hpp" #include "list.hpp"
#include "object_store.hpp" #include "object_store.hpp"
#include "parser.hpp"
#include "query_builder.hpp" #include <realm/parser/parser.hpp>
#include <realm/parser/query_builder.hpp>
namespace realm { namespace realm {
namespace js { namespace js {
@ -155,7 +156,7 @@ typename T::Object ResultsClass<T>::create_filtered(ContextType ctx, const U &co
parser::Predicate predicate = parser::parse(query_string); parser::Predicate predicate = parser::parse(query_string);
NativeAccessor<T> accessor(ctx, realm, object_schema); NativeAccessor<T> accessor(ctx, realm, object_schema);
query_builder::ArgumentConverter<ValueType, NativeAccessor<T>> converter(accessor, &args.value[1], args.count - 1); query_builder::ArgumentConverter<ValueType, NativeAccessor<T>> converter(accessor, &args.value[1], args.count - 1);
query_builder::apply_predicate(query, predicate, converter, realm->schema(), object_schema.name); query_builder::apply_predicate(query, predicate, converter);
return create_instance(ctx, collection.filter(std::move(query))); return create_instance(ctx, collection.filter(std::move(query)));
} }

View File

@ -23,8 +23,6 @@
#include "js_types.hpp" #include "js_types.hpp"
#include "schema.hpp" #include "schema.hpp"
#include "util/format.hpp"
namespace realm { namespace realm {
namespace js { namespace js {

View File

@ -20,7 +20,6 @@
#include "execution_context_id.hpp" #include "execution_context_id.hpp"
#include "property.hpp" #include "property.hpp"
#include "util/format.hpp"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>

@ -1 +1 @@
Subproject commit 3eb19c014fdfa0f02a03d4acf71d046d29a6dfa6 Subproject commit 21e671a155989f4e34e279fc8a7ace5817495de0

View File

@ -45,9 +45,9 @@
["QueryCount", 1, "BoolObject", "boolCol == $0", false], ["QueryCount", 1, "BoolObject", "boolCol == $0", false],
["QueryCount", 0, "BoolObject", "boolCol == true && boolCol == false"], ["QueryCount", 0, "BoolObject", "boolCol == true && boolCol == false"],
["QueryCount", 3, "BoolObject", "boolCol == true || boolCol == false"], ["QueryCount", 3, "BoolObject", "boolCol == true || boolCol == false"],
["QueryCount", 1, "BoolObject", "boolCol == 0"],
["QueryCount", 2, "BoolObject", "boolCol == 1"],
["QueryThrows", "BoolObject", "boolCol == 0"],
["QueryThrows", "BoolObject", "boolCol == 1"],
["QueryThrows", "BoolObject", "boolCol == 'not a bool'"], ["QueryThrows", "BoolObject", "boolCol == 'not a bool'"],
["QueryThrows", "BoolObject", "boolCol == $0", "not a bool"], ["QueryThrows", "BoolObject", "boolCol == $0", "not a bool"],
["QueryThrows", "BoolObject", "boolCol > true"], ["QueryThrows", "BoolObject", "boolCol > true"],
@ -294,8 +294,7 @@
{ "name": "floatCol", "type": "float" }, { "name": "floatCol", "type": "float" },
{ "name": "doubleCol", "type": "double" }, { "name": "doubleCol", "type": "double" },
{ "name": "stringCol", "type": "string" }, { "name": "stringCol", "type": "string" },
{ "name": "dateCol", "type": "date" }, { "name": "dateCol", "type": "date?" }
{ "name": "dataCol", "type": "data" }
] ]
}, },
{ {
@ -304,13 +303,15 @@
"properties": [ "properties": [
{ "name": "primaryKey", "type": "int" }, { "name": "primaryKey", "type": "int" },
{ "name": "basicLink", "type": "object", "objectType": "BasicTypesObject" }, { "name": "basicLink", "type": "object", "objectType": "BasicTypesObject" },
{ "name": "linkLink", "type": "object", "objectType": "LinkTypesObject" } { "name": "linkLink", "type": "object", "objectType": "LinkTypesObject" },
{ "name": "linkList", "type": "BasicTypesObject[]" }
] ]
}], }],
"objects": [ "objects": [
{ "type": "LinkTypesObject", "value": [0, [1, 0.1, 0.001, "1", 1, [1, 10, 100]], null] }, { "type": "LinkTypesObject", "value": [0, [1, 0.1, 0.001, "1", null], null, []] },
{ "type": "LinkTypesObject", "value": [1, null, [2, [1, 0.1, 0.001, "1", 1, [1, 10, 100]], null]] }, { "type": "LinkTypesObject", "value": [1, null, [2, [1, 0.1, 0.001, "1", null], null, []], []] },
{ "type": "LinkTypesObject", "value": [3, null, [4, [2, 0.2, 0.002, "2", 2, [2, 20, 200]], null]] } { "type": "LinkTypesObject", "value": [3, null, [4, [2, 0.2, 0.002, "2", null], null, []], []] },
{ "type": "LinkTypesObject", "value": [5, null, null, [[3, 0.3, 0.003, "3", null]]] }
], ],
"tests": [ "tests": [
["ObjectSet", [0, 2], "LinkTypesObject", "basicLink.intCol == 1"], ["ObjectSet", [0, 2], "LinkTypesObject", "basicLink.intCol == 1"],
@ -318,7 +319,8 @@
["ObjectSet", [1, 3], "LinkTypesObject", "linkLink.basicLink.intCol > 0"], ["ObjectSet", [1, 3], "LinkTypesObject", "linkLink.basicLink.intCol > 0"],
["ObjectSet", [0, 2], "LinkTypesObject", "basicLink.floatCol == 0.1"], ["ObjectSet", [0, 2], "LinkTypesObject", "basicLink.floatCol == 0.1"],
["ObjectSet", [1], "LinkTypesObject", "linkLink.basicLink.floatCol == 0.1"], ["ObjectSet", [1], "LinkTypesObject", "linkLink.basicLink.floatCol == 0.1"],
["ObjectSet", [1, 3], "LinkTypesObject", "linkLink.basicLink.floatCol > 0"] ["ObjectSet", [1, 3], "LinkTypesObject", "linkLink.basicLink.floatCol > 0"],
["ObjectSet", [5], "LinkTypesObject", "linkList.intCol == 3"]
] ]
}, },