You are not logged in.
I'm currently dveloping a WEB based client/mORMot server solution, and don't seem to have any options for generating CreateAndFillPrepare type queries on the Client side.
The current requirement is to return one or more detail table result sets to the Client based on the master table's primary key (and also limit the result set where a detail field table field matches some parameter). I'd prefer not to use SQL if possible.
I'm thinking along the lines of some kind of remote procedure call from the Client, and I'd really like to keep as much of the ORM functionality as possible.
One important constraint is that the HTTPServer will need to also support a standard Delphi client performing CreateAndFilPrepare statements against TSQL tables.
Can anyonee point me in the right direction for solving this problem?
Many thanks
Horbs
Offline
For a good client/server design, don't call the ORM from the client side.
Encapsulate them into simple interface-based services on the server side.
Use either RawJSON or array of TSQLRecord output parameters.
Offline
Thanks ab.
For generating the query, what technique should I use. I'm guessing SQL is not an ideal option.
Cheers
Horbs
Offline
Oh - should have said - using standard SQLite Server - TSQLModel.
Offline
It's OK - think I've got it - Sample 16 ?
Offline
For the query, you set the WHERE clause of the ORM parameters to the proper SQL-like expression.
See https://synopse.info/files/html/Synopse … ml#TITL_36
Some complex queries can be found in sample 31 (MVC Blog).
Offline
Thats VERY helpful AB - big thankyou.
Horbs
Offline