Ed Leafe wrote:
On Feb 3, 2006, at 1:10 AM, Echo wrote:
I have an idea that could work. I wanted to put dTable into bizobj
somehow. If the bizobj had access to the dTable definition of the
table, would it then have all the info it needed?
You'd have to do that through the cursor object. dTable is
definitely a data-tier class.
Do we by any chance already have an API for telling the dCursor instance
what the field information is, overriding the current behavior of
dCursor trying to come up with it automatically?
Then the primary use of dTable would be so the bizobj knows about the
table. And as a feature, it could create the table if it doesn't exist
and if it has access.
There are already methods in the backend classes for obtaining the
table structure. The problem is with SQLite, which doesn't seem to
supply the same information in its dbapi cursors.
But even with MySQL, how do you get the field information for derived
fields. Given the query:
select customers.cname,
invoices.cnumber,
concat(customers.cname, "-", invoices.cnumber) as test
from customers
inner join invoices
on invoices.custid = customers.id
where ...
How do we find out, *from MySQL*, the datatype of the test result
column, when the query happens to return zero records? I know that the
result column should be char, but currently our dCursor has no idea.
--
Paul
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users