Hello,

I just tried some things I couldn't find out from the documentation, and
I would like to know if my conclusions are correct:

- Table alias
The method addFrom() optionally takes an alias for the table name and
this alias, if present, can and must be used for addFields(), addJoin(),
addWhere() calls. But addJoin() has no place for an alias for the joined
table, right? So I have this in my bizobj code:

def initProperties(self):
    ...
        self.addFrom("mainTable", "mt")
        self.addJoin("lookupTable", "mt.fkid = lookupTable.fkid")
        self.addField("mt.Field1", "mtf1")
        self.addField("lookupTable.NameFld", "lname")
        self.addWhere("mt.Field2 = ?")
        self.addWhere("lookupTable.DateFld > ?")
        ...
        
- Field alias
The alias names used in the addField() calls can be used for DataField
properties in the application windows, but they can't be used in the
SQL, for example in addWhere(), right?

- set...Clause methods
The setWhereClause() method takes a correctly constructed WHERE clause
_without_ the word "WHERE", but the clause used in a setJoinClause()
call _must_ start with "JOIN", right? And here table aliases for the
joined tables can be set and used in other calls building the SQL. Still
correct? How about the other set...Clause methods, do they or don't they
have to start with the appropriate SQL keyword?

Are there any examples for bizobjs with changing queries according to
user input?

Thank you,

Sibylle

-- 
Dr. Sibylle Koczian 


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to