[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hard of thinking using schemeql



MJ Ray <markj@cloaked.freeserve.co.uk> writes:

> I'm having problems using schemeql on a database I have.  I want to
> extract the name of publications from the London region.  This is
> represented by the "region" field having the value "LONDON".  However,
> if I do...
>
> (find '(publication) '(name region) '((= region LONDON)))
> Executing: SELECT name,region FROM publication WHERE region = 'london'
>
> which isn't what I wanted and gives no results.  I've tried most
> combinations of symbols and haven't got the desired region =
> 'LONDON'.  How can I do this?

Schemeql uses (heavily) format while rewriting queries before passing
them to SrPersist.  As you know, standard parsing in PLT Scheme
down-cases every symbol, and that is the problem your are seeing.

Try doing this:

(read-case-sensitive #t)

before doing your query.  Does that help?

It didn't feel right to do it from inside SchemeQL because that might
break other things, though I can try to do the following:

      (a) check the current case sensitivity parameter,
      (b) set it to #t, execute your query, and 
      (c) return sensitivity to its previous value

it won't be that expensive I think.  Also I will have to check whether
the underlying DBMS supports case sensitivity before sending any
uppercase letter. Ummm I'll think about it and incorporate the changes
real soon, in the mean time, I hope the above option do the trick for
you.

HTH,
--Francisco