Doug, Tables, TMOBJS
Dear Doug, my questions are below your typing:
> On Mar 2, 2018, at 6:02 AM, Doug Easterbrook <email@example.com> wrote:
> We use oldRow extensively in the $update statement to find out what fields have changed for the key purpose of ONLY UPDATING THOSE FIELDS and making the app faster.
HOW do you get the INFORMATION as to WHAT fields changed? I know I have to put old row in the update statement for it to work so I do it faithfully..but I don’t know how to query back what fields changed. Frankly at this point I KNOW what fields changed and I used a SQL UPDATE to list only the one field that needs updating, so I’m with you on only updating the fields that changed for network speed. But how do you get info back from the Omnis $update(old row) combo?
> Thats a clear example where the table class has benefit and the requirement to provide the old row for comparison purposes gives you the opportunity to optimize the SQL with possibility od significant performance gains.
Aha, mention of Table class with the word BENEFIT. You actually don’t say what the table class does (here) that gives the supposed benefit. WHAT does a Table Class do in this scenario that an Object can’t do. I’m ignorant of the benefits of Table classes and posted just now a discussion provoking post to the list asking what are the benefits of table classes. You have to say in clarity WHY, WHAT, it does, that gives benefit over objects say. Some say tables are unnecessary while you and others say they are great, but I don’t know WHY they are great. Please tell this case’s reasoning. Why? What?
> it is for that reason, the TMOBJS xcomp thats out there in the wild and free to all has a static method that will provide you with the update statement containing only changed fields. Its useful.
Please explain what you mean by Provide you with the update statement…. Does it use info returned from somehow and build you a SQL command that you paste into place? Does it work on the fly behind the scenes? Do you know where to download it and is it cross platform?