On 2/10/06, Mike Orr <[EMAIL PROTECTED]> wrote:
So far what I've learned is:
>
> 1) SQLObject has three "levels".
> * Col.get(), Col.byName(), etc, are the most OO but can only
> represent simple queries.
> * Col.select() can do more complicated joins and WHEREs but you're
> still getting entire records back; that is, all the fields in one
> table with the usual access to related tables, but not some fields
> from one table and some from another.
> * Select() with connection.queryAll(sql) can return arbitrary
> values rather than entire sqlobjects, and also handle unsupported
> queries. connection.query(sql) does backend-specific commands, can
> create/drop databases, etc.
... but .queryAll() returns returns strings for UnicodeCols, so you
have to convert them to unicode yourself:
value = unicode(value, 'utf-8')
or to be pedantic:
encoding = THE_TABLE.sqlmeta.columns[col_name].dbEncoding
value = unicode(value, encoding)
Or face the wrath of Kid if you dare to pass it a string with
high-byte "ascii" characters.
--
Mike Orr <[EMAIL PROTECTED]>
([EMAIL PROTECTED] address is semi-reliable)
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss