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

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -