#1 2015-01-23 22:52:02

DidiL
Member
Registered: 2015-01-06
Posts: 10

Documenting the default REST engine

Hi,

May be you'll find it trivial, but I ended up creating several select services before finding out (as suspected)
that I could retrieve records simply by sending a WHERE parameter to the default REST engine.

Seems the complete list is stated nowhere else than in mormot.pas.
And dealing with strings in the WHERE clause was not so obvious.

May I suggest enhancing the documentation with a few non trivial examples as below?
http://localhost:8080/root/SampleRecord/?SELECT=id,name
http://localhost:8080/root/SampleRecord/?SELECT=id,name,time&STARTINDEX=2&RESULTS=4
http://localhost:8080/root/SampleRecord/?SELECT=id,name,time&WHERE=(name)=:("james"):or(name)like:("T%"):
http://localhost:8080/root/SampleRecord/?SELECT=id,name,time&SORT=name&DIR=desc


Also, a non trivial sample of service (ie returning rows via ORM) would be very helpful.

Thanks for this great framework,
I'm just scratching the surface! :-)

-
Didier

Last edited by DidiL (2015-01-23 22:52:25)

Offline

#2 2015-01-24 09:13:03

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Documenting the default REST engine

Online

Board footer

Powered by FluxBB