message: A couple of backlink query tests
diff: @@ -2037,4 +2037,85 @@ TEST(BackLink_Query_MultipleLevelsAndTables)
  CHECK_TABLE_VIEW(q.find_all(), {1});
  }
  +TEST(Backlink_Query_IsNull)
  +{
  + /*
  + +---------------+
  + | string | link |
  + +---------------+
  + | hello | A[0] |
  + | null | A[1] |
  + | world | A[2] |
  + +---------------+
  + */
  + Group group;
  +
  + TableRef table = group.add_table("A");
  +
  + table->add_column(type_String, "string", true);
  + table->add_column_link(type_Link, "link", *table);
  +
  + auto add_row = [&](Table& table, StringData value) {
  + size_t row = table.add_empty_row();
  + table.set_string(0, row, value);
  + table.set_link(1, row, row);
  + };
  +
  + add_row(*table, "hello");
  + add_row(*table, realm::null());
  + add_row(*table, "world");
  +
  + auto tableview = (table->backlink(*table, 1).column<String>(0) == realm::null()).find_all();
  + CHECK_EQUAL(1, tableview.size());
  +}
  +
  +TEST(Backlink_Query_LinkList_IsNull)
  +{
  + /*
  + +---------------------+
  + | string | link |
  + +---------------------+
  + | hello | A[0] |
  + | null | A[1], A[0] |
  + | world | A[2] |
  + | null | A[3] |
  + | hello | A[4], A[2] |
  + +---------------------+
  + */
  + Group group;
  +
  + TableRef table = group.add_table("A");
  +
  + table->add_column(type_String, "string", true);
  + table->add_column_link(type_LinkList, "link", *table);
  +
  + auto add_row = [&](Table& table, StringData value) {
  + size_t row = table.add_empty_row();
  + table.set_string(0, row, value);
  + auto links = table.get_linklist(1, row);
  + links->add(row);
  + if (row == 1) {
  + links->add(0);
  + }
  + if (row == 4) {
  + links->add(2);
  + }
  + };
  +
  + add_row(*table, "hello");
  + add_row(*table, realm::null());
  + add_row(*table, "world");
  + add_row(*table, realm::null());
  + add_row(*table, "hello");
  +
  + auto tableview_hello = (table->backlink(*table, 1).column<String>(0) == "hello").find_all();
  + CHECK_EQUAL(3, tableview_hello.size());
  +
  + auto tableview_world = (table->backlink(*table, 1).column<String>(0) == "world").find_all();
  + CHECK_EQUAL(1, tableview_world.size());
  +
  + auto tableview_null = (table->backlink(*table, 1).column<String>(0) == realm::null()).find_all();
  + CHECK_EQUAL(3, tableview_null.size());
  +}
  +
  #endif
  