Select FOR UPDATE and $update, is there a problem?
There is ”plain SQL” and ”Build in Omnis SQL”. You can use either or both (as I do).
Plain SQL is though more predictable than Omnis built in codes and easier to debug.
Most love table classes. I find them redundant.
Table classes = extra layer of complexity and increase your amount of classes = larger library.
Query classes = a good way to make life harder.
That means that 90% of my SQL code looks like this (in an object class) – which is ”plain SQL”:
Sta: SELECT * FROM user
Sta: WHERE ”USER_ID”=’MO’
Do STATEMENT.$prepare() Returns #F
Do STATEMENT.$execute() Returns #F
Although for inserts I use the “built in Omnis SQL command”:
Do pv_DATA.$insert() Returns #F
as well as for edits:
Do pv_DATA.$update(pv_DATA_OLD) Returns #F
Mostly because it is simpler and cleaner.
Learning to write plain SQL gives a better understanding of how to write SQL code IMHO. Using Omnis built in SQL commands makes it harder to learn.