Start a new topic
Answered

How to build a "contains" query in iOS Swift?

I'm attempting to build a KCSQuery that performs a "contains" query.


If I have a column called "name" I would like to search on partial entries.


ie:

John

Jane

Julie

June

Jack


Query using "ju" and return records Julie and June.


I can see that other SDK's have a contains capability - but nothing for iOS.  Is there a way?


Best Answer

Hey Ian,

Let me know if this works for you.

let query = KCSQuery(onField: "name", usingConditional: .KCSRegex, forValue: "^[a-z0-9]*ju” )


Thanks,
Pranav
Kinvey Support


Too late.  I gave up and moved to Syncano.

Answer

Hey Ian,

Let me know if this works for you.

let query = KCSQuery(onField: "name", usingConditional: .KCSRegex, forValue: "^[a-z0-9]*ju” )


Thanks,
Pranav
Kinvey Support

Login or Signup to post a comment