diff --git a/src/object-store/parser/query_builder.cpp b/src/object-store/parser/query_builder.cpp index b924eaa3..f1bbb9d4 100644 --- a/src/object-store/parser/query_builder.cpp +++ b/src/object-store/parser/query_builder.cpp @@ -203,14 +203,6 @@ struct ColumnGetter { } }; -template -struct ColumnGetter { - static Columns convert(TableGetter&& table, const PropertyExpression & expr, Arguments &args) - { - return table()->template column(expr.prop->table_column); - } -}; - template struct ValueGetter; diff --git a/tests/RealmTests.js b/tests/RealmTests.js index 6a65b646..67c7dfec 100644 --- a/tests/RealmTests.js +++ b/tests/RealmTests.js @@ -235,7 +235,7 @@ module.exports = BaseTest.extend({ }, testRealmObjects: function() { - var realm = new Realm({schema: [schemas.PersonObject]}); + var realm = new Realm({schema: [schemas.PersonObject, schemas.DefaultValues, schemas.TestObject]}); realm.write(function() { realm.create('PersonObject', ['Ari', 10, false]); realm.create('PersonObject', ['Tim', 11, false]); @@ -278,6 +278,15 @@ module.exports = BaseTest.extend({ TestCase.assertThrows(function() { realm.objects('PersonObject', 'age > {2} && age < {0}', 13, 10) }); + + realm.write(function() { + realm.create('DefaultValuesObject', {'dateCol': new Date(3)}); + realm.create('DefaultValuesObject', {'dateCol': new Date(4)}); + realm.create('DefaultValuesObject', {'dateCol': new Date(5)}); + }); + + TestCase.assertEqual(realm.objects('DefaultValuesObject', 'dateCol > {0}', new Date(4)).length, 1); + TestCase.assertEqual(realm.objects('DefaultValuesObject', 'dateCol <= {0}', new Date(4)).length, 2); }, testNotifications: function() {