Description
What about new UnifAce-functions like
string $occprofile2sql({
}}) ; Convert the current profile to a SQL-where clause
string $ucondtion2sql(\"\"{,}) ; Convert a ucondition-string to a SQL-where clause
string $uwhere2sql(\"\"{,}) ; Convert a uwhere string to a SQL-where clause ( superfluous?)
This function should convert the input to the SQL-where-clause on the default database connector or the one give by the term
Use Case
There are so many cases, where a direct SQL is much faster then a UnifAce-RETRIEVE
But to be DBMS independent, you have to build up the necassary SQL with a lot of CASE-statements and proper formating (esp. timestamps)
A function, using the internal proccode of UnifAce will help us to do this job
Importance
Performance is always important
Type
Proc Code
Operating System
Not Applicable
Status
Open
Welcome to the online Uniface Community. The Uniface community site is a global communication channel for professional users of Uniface Enterprise Application Development
I was discussing exactly this with a customer last monday!
$occprofile2ucondition should be last piece of this puzzle.
Voted!
looks like this may need an extension to the “database driver” API which does database specific things like wildcards.
But this will give the chance to provide a couple of switches like:
complete-sql
select-list (inludes painted fields plus PK as comma separated string)
where-clause-only (with all the complicated wildcards and logical operators)
…
As Ingo mentioned: sometimes a SQL call is much faster than doing it the uniface way.
Especially when you can make use of all kind of subselects, this addition will be a real booster.
Voted!