From 4f2377f3231f41234add62f94a425b6de6c78323 Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Fri, 15 Dec 2017 15:42:27 -0800 Subject: [PATCH] Update for further changes in core's query parser. --- realm.gypi | 2 +- src/object-store | 2 +- tests/js/query-tests.json | 20 +++++++++++--------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/realm.gypi b/realm.gypi index a4f9e702..ff4ba168 100644 --- a/realm.gypi +++ b/realm.gypi @@ -176,7 +176,7 @@ ] }, "link_settings": { - "libraries": [ "-lrealm<(debug_library_suffix)" ], + "libraries": [ "-lrealm<(debug_library_suffix)", "-lrealm-parser<(debug_library_suffix)" ], }, "variables": { "prefix": " true"], @@ -294,8 +294,7 @@ { "name": "floatCol", "type": "float" }, { "name": "doubleCol", "type": "double" }, { "name": "stringCol", "type": "string" }, - { "name": "dateCol", "type": "date" }, - { "name": "dataCol", "type": "data" } + { "name": "dateCol", "type": "date?" } ] }, { @@ -304,13 +303,15 @@ "properties": [ { "name": "primaryKey", "type": "int" }, { "name": "basicLink", "type": "object", "objectType": "BasicTypesObject" }, - { "name": "linkLink", "type": "object", "objectType": "LinkTypesObject" } + { "name": "linkLink", "type": "object", "objectType": "LinkTypesObject" }, + { "name": "linkList", "type": "BasicTypesObject[]" } ] }], "objects": [ - { "type": "LinkTypesObject", "value": [0, [1, 0.1, 0.001, "1", 1, [1, 10, 100]], null] }, - { "type": "LinkTypesObject", "value": [1, null, [2, [1, 0.1, 0.001, "1", 1, [1, 10, 100]], null]] }, - { "type": "LinkTypesObject", "value": [3, null, [4, [2, 0.2, 0.002, "2", 2, [2, 20, 200]], 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", null], 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": [ ["ObjectSet", [0, 2], "LinkTypesObject", "basicLink.intCol == 1"], @@ -318,7 +319,8 @@ ["ObjectSet", [1, 3], "LinkTypesObject", "linkLink.basicLink.intCol > 0"], ["ObjectSet", [0, 2], "LinkTypesObject", "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"] ] },