orm - Search parameters in REST service (+ database layer) -


what practice rest service params handling?

for example (dummy example):

there resource represents database entity user, has next properties:

id firstname lastname email ...other properties

let's want firstname = make call next url

www.example/users?firstname=nameparam

what should happen if send both firstname , lastname params? should handled select firstname & lastname? or should handled select firstname equals firstnameparam or lastname equals lastnameparam?

and way - how should implemented on db layers (orm or plain database queries - not matter).

should check if params exist 1 one , add conditions query or there better solution? (imagine if there resource has many properties).


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -