[Zope] ZRDB
Brian Lloyd
Brian@digicool.com
Wed, 29 Mar 2000 14:11:42 -0500
This should probably be posted as a feature request to the Collector
(http://classic.zope.org:8080/Collector/) to ensure that it doesn't
swirl away in the currents of the list...
> browsing thru Shared.DC.ZRDB.Results i found this construct:
>
> -------- line 117 ------------
> if not name:
> raise ValueError, 'Empty column name, %s' % name
>
> ------------------------------
>
> This looks a bit silly, because if name is empty, %s will be replaced
> with
> nothing...
> Furthermore, would it not be better to provide a generic name for the
> empty column? Sure, it is difficult to provide such a name
> who does not
> collide with others in namespace, but it would be very helpful, if the
> underlying database-adaptor does not provide full names under certain
> circumstances, such as ODBC with CenturaSQLBase always returns
> empty column names to Zope with the count() Operator. Even if
> used "as"
> to rename.
> How about something like:
> if not name:
> name='column%d' % i
>
> or such?
> Next there is always some hassle with those 'table.column' columns
> returning from databases who do not support column renaming.
>
> Would it be a way to rename them automatically to something like
> table_column? Yes, I know there could be a column already beeing
> called so. But if one knows she can use table.table_column in such
> circumstances.
> May be as alias?
Brian Lloyd brian@digicool.com
Software Engineer 540.371.6909
Digital Creations http://www.digicool.com