#1 2021-04-14 01:48:12

wxinix
Member
Registered: 2020-09-07
Posts: 121

What is the difference between TSQLRestClientDB, and its server?

What is the difference of

TSQLRestClientDB.Add/Delete/Retrieve

versus

TSQLRestClientDB.Server.Add/Delete/Retrieve?


Also I found
TSQLRestClientDB.Delete(TMySQLRecord, '') doesn't empty the table, while TSQLRestClientDB.Server.Delete(TMySQLRecord, '') empty the table.  Why so?

Offline

#2 2021-04-14 08:30:46

turkerali
Member
Registered: 2021-03-30
Posts: 10

Re: What is the difference between TSQLRestClientDB, and its server?

A similar question was asked before. Please check this link.

Offline

#3 2021-04-14 12:21:08

wxinix
Member
Registered: 2020-09-07
Posts: 121

Re: What is the difference between TSQLRestClientDB, and its server?

turkerali wrote:

A similar question was asked before. Please check this link.

@turkerali

Thank you very much for the heads-up.

I also found the reason why
TSQLRestClientDB.Delete(TMySQLRecord, '') cannot empty the whole table.   The empty SQLWhere cannot be translated to a valid restful DELETE URI.

@ab
So, for best client-server (e.g., postgreSQL server) ORM performance, I should use TSQLRestClientDB.Server to do the Add/Delete/Retrieve/Update?  Or should I use TSQLRestClientDB, for its caching?

Thank you again.

Last edited by wxinix (2021-04-14 12:24:46)

Offline

#4 2021-04-14 12:48:05

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

Re: What is the difference between TSQLRestClientDB, and its server?

There is a cache defined at TSQLRest level, which could be used for client and server classes.
On server side, just use the TSQLRestServerDB instance, properly setting the cache if needed. Forget about TSQLRestClientDB.

Offline

#5 2021-04-14 14:08:12

turkerali
Member
Registered: 2021-03-30
Posts: 10

Re: What is the difference between TSQLRestClientDB, and its server?

Dear @wxinix,

You may have issues if you intend to cache external database tables.
Please check this post for ab's clarifications regarding caching.

Regards.

Offline

#6 2021-04-14 15:20:57

wxinix
Member
Registered: 2020-09-07
Posts: 121

Re: What is the difference between TSQLRestClientDB, and its server?

turkerali wrote:

Dear @wxinix,

You may have issues if you intend to cache external database tables.
Please check this post for ab's clarifications regarding caching.

Regards.

Thank you very much for the kind reminder.

Offline

Board footer

Powered by FluxBB