Page 1 of 1

How to query with constraint with “like” SQL way?

Posted: Mon Sep 09, 2013 7:08 pm
by Helsen

Hello,

I have a Collection called FRIENDS with two fields: Name | LastName

If app user search names and type: < maria I want get all names that contains maria inside, for example, I want expect:

  • maria

  • mariana

  • mariano

  • anamaria

    in SQL database, I will use:
    SELECT Name, LastName from FRIENDS where Name like '%maria%', how can I do this with appery.io backend services?

    Thanks


How to query with constraint with “like” SQL way?

Posted: Mon Sep 09, 2013 7:16 pm
by maxkatz

How to query with constraint with “like” SQL way?

Posted: Mon Sep 09, 2013 7:30 pm
by Helsen

Thanks Max,

my where works nice in this way:

where: {"Name":{"$regex":"maria", "$options":"i"}}