Adopt core's query parser.
This commit is contained in:
parent
517c165c12
commit
1ade98122f
|
@ -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"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
||||||
|
|
|
@ -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 fa382511a8e3163a7ce1c2e21b03ebbd6781cb03
|
Loading…
Reference in New Issue