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
Post a Comment