question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Queries on list of strings property

See original GitHub issue

Goals

filtered list of strings property

Code Sample

const BookrackSchema = {
    name: 'Bookrack',
    properties: {
        book_names:'string[]',
    }
};

Bookrack1.book_names=['A','B','C'];
Bookrack2.book_names=['B','C','D'];
Bookrack3.book_names=['C','D','E'];


a:realm.objects('Bookrack').filtered(`ANY book_names = $0 `,'B');
b:realm.objects('Bookrack').filtered(`book_names CONTAINS  $0 `,'B');

Expected Results

get Bookrack1 And Bookrack2

Actual Results

a.The keypath following ‘ANY’ or ‘SOME’ must contain a list b.Object type ‘Table’ not supported

Steps to Reproduce

Version of Realm and Tooling

  • Realm JS SDK Version: ?“realm”: “^2.3.0”
  • Node or React Native: ?node 8.4.0
  • Client OS & Version: ?mac 10.13.4
  • Which debugger for React Native: ?/None

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
knethcommented, May 24, 2018

It is currently not supported to query list of strings, only list of objects can be queried.

1reaction
knethcommented, Jul 7, 2020

Realm Core has implemented comparison operators for array of primitive types, and it has been released in Realm JavaScript v10.0.0-beta.1. I suggest that you try out the latest beta (v10.0.0-beta.7).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Query a list of objects that contains any string - Stack Overflow
I'm this expression to search inside a list of objects by a specific property: var result = myObject.Where(o => o.SearchString.
Read more >
Querying a list property with SQL
I have a class that has a list property, which contains a list of other objects, and I want to join against it...
Read more >
C# List<T> Collection - TutorialsTeacher
The List is a collection of strongly typed objects that can be accessed by index and having methods for sorting, searching, and modifying...
Read more >
List functions - Cypher Manual - Neo4j
keys returns a list containing the string representations for all the property names of a node, relationship, or map. Syntax: keys(expression). Returns: ...
Read more >
Using Linq, how to check if value exist in list of objects ... - Reddit
I have a Class with a "Name" property" . Given a List<string> I want to check if List<Class> contains any objects that match...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found