[fpc-pascal] Troubles with SQLDBRESTBridge

Michael Van Canneyt michael at freepascal.org
Tue Jul 2 11:36:34 CEST 2019

On Tue, 2 Jul 2019, Sven Barth via fpc-pascal wrote:

> Michael Van Canneyt <michael at freepascal.org> schrieb am Di., 2. Juli 2019,
> 08:20:
>> On Mon, 1 Jul 2019, Sven Barth via fpc-pascal wrote:
>>> Am 01.07.2019 um 23:18 schrieb Michael Van Canneyt:
>>>>> By the way: is it correct that the sqldbrestdataset currently does
>>>>> not support editing/inserting/deleting entries? Do you plan to change
>>>>> this?
>>>> Ehm, no, of course it is supposed to support that. It would not be
>>>> much good if it didn't :-)
>>>> Do you get errors ?
>>> No. If I use the JSONClient example, list the Users resources, then edit
>>> an entry and commit all looks fine so far. However if I then use Get
>>> Resource Data again the original data will be restored (also a look into
>>> the database showed no change). Same when I add a new entry (btw: is it
>>> normal that all rows in the grid appear to be empty after pressing the
>>> Insert button and if I enter new data the other rows appear to have that
>>> data as well?) or delete one.
>> As far as I know, the JSON client does not apply updates to the server ?
>> Neither does the bufdataset client. That simply has not been coded.
>> I test all GET/PUT/POST/DELETE with curl or wget.
>> and with some pas2js & TMS Web Core clients, with those I know that the
>> updates are coded.
> Well, my plan is a desktop application that uses a web server backend. So I
> had hoped for a ready-made solution. Seems like I'll have to implement that
> in the SQLDBRestClient myself...

Well, a 'RemoteServer' interface for TBufDataset is still on my todo list.

If you look at the pas2js JSON and rest datasets, they have the necessary 
functionality to apply updates on the server.

It should be fairly easy to add that same functionality to the native version 
of the JSONDataset.  (I did the same for the indexes BTW.)

This is also on my todo list (which just reached Sirius A meanwhile). 
But if you (or someone else) want to take a shot at it, go ahead. 
I will gladly provide all the help you need... :)

I think it is safe to say that Rome wasn't built in a day, and neither was
FPC :)


More information about the fpc-pascal mailing list