Subject | Re: [Firebird-Java] Re: decision help needed |
---|---|
Author | David Jencks |
Post date | 2002-10-17T02:59:22Z |
I think we're getting close to confusing two issues here. Unless there is
some new escaping code I haven't seen, all sql is passed pretty much
directly to the engine. If you use double quotes, they will get to the
engine.
We're talking here about the code that figures out the column number of a
result set column from its name, so you can get a column value by column
name. Any manipulations here don't go the the engine, they are entirely
client side.
What I proposed means if you use explicit (escaped) double quotes you will
definitely get the case sensitive col name, and if you don't the client
will first try case sensitive, and if no match, case insensitive.
david jencks
some new escaping code I haven't seen, all sql is passed pretty much
directly to the engine. If you use double quotes, they will get to the
engine.
We're talking here about the code that figures out the column number of a
result set column from its name, so you can get a column value by column
name. Any manipulations here don't go the the engine, they are entirely
client side.
What I proposed means if you use explicit (escaped) double quotes you will
definitely get the case sensitive col name, and if you don't the client
will first try case sensitive, and if no match, case insensitive.
david jencks
On 2002.10.16 19:41:08 -0400 Helen Borrie wrote:
> At 07:12 PM 16-10-02 -0400, you wrote:
> >On 2002.10.16 17:04:59 -0400 Roman Rokytskyy wrote:
> > > > Hmmm thinking about it marginally more... does the spec have
> > > > instructions for this? I'd prefer actually to start by trying an
> > > > exact match, and if that fails then try converting the input to
> > > > uppercase and trying again. I don't think we should need to
> > > > escape-quote case sensitive column names to get them to work.
> > >
> > > +1 for your idea but only if we strip starting and ending double
> > > quotes. Consider the case of auto-generated statements from some text
> > > description (like JBoss jaws.xml). They will have double quotes
> > > everywhere if configuration has them.
> >
> >too many choices....
> >
> >Well, if someone goes to the trouble of explicitly including the
> >double-quote I think it means they KNOW they want that case...
> >
> >how about this:
> >
> >If there are double quotes, remove and look only for exact match:
> >
> >if there are no double quotes, look first for exact match, and if it
> fails
> >uppercase and look for exact match.
> >
> >I guess even with this someone could argue that if they defined a column
> as
> >"COL1" they might not want col1 (no "") to match, but I'm not going to
> >argue that.
>
>
> Consider, though, if double quotes were used, not primarily for the
> purpose
> of case-sensitivity, but to permit use of "illegal characters" (such as
> blanks) or reserved keywords as identifiers. I think the driver should
> not
> mess around with double quotes but submit them exactly as presented.
>
> Helen
>
>
>
>
> To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>