Ted Roche wrote:
> On 2/13/07, Ed Leafe <[EMAIL PROTECTED]> wrote:
>>         I don't think that we can or should take care of relatively dumb
>> things like this. Anyone who's programmed for any decent period of
>> time knows about keyword naming conflicts.
> 
> I agree.
> 
>> The fact that you *can*
>> get away with it sometimes does not mean you should be able to all
>> the time.
> 
> I agree, up to a point. Spaces in file names, for example, are justt a
> dumb idea, as far as I am concerned. But some OSes allow them, causing
> trouble for all.

All OS's I know about allow spaces in filenames. Only one that I know 
about actually makes use of them for default directories, which seems 
especially stupid given that that OS doesn't really want the user going 
into or even knowing about r'c:\Program Files'.


> But a lot of my work is recovering other people's apps, and it would
> be handy to work with them, even transiently, even if they named the
> order field 'Order' and the description field 'Desc'

I agree. I believe we can already handle this, though. Just change your 
biz.addField() calls to quote the field using whatever quote character 
the backend uses (backtick for MySQL). Ed, is there a way to specify 
that the field gets quoted explicitly, or will it only work for spaces 
in the field name?


>> If you know you have a database with "bad" names in it,
>> you're going to have problems with any tool, not just Dabo
> 
> Unquestionably. But if you can wrap all table and fieldnames in
> quotes, some people will. I note other tools, like phpMyAdmin, does
> this.
> 
> It might be worth considering, if only to add it as a suggested 'todo' item.

I think it would be a worthy thing to have, especially since we already 
have some of the underlying machinery there, to add backend-specific 
quotes to spaces in field names. The ToDo should be:

+ automatically quote spaces in field names (maybe done)
+ automatically quote spaces in table names (done)
+ automatically quote spaces in database names (maybe not needed)
+ allow for explicit quoting in backend-agnostic way, such as 
biz.addField("customers.order as order", addQuotes=True)

-- 
pkm ~ http://paulmcnett.com


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to