Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > gadfly and SQL-LIKE

Reply
Thread Tools

gadfly and SQL-LIKE

 
 
Patrick W. Fraley
Guest
Posts: n/a
 
      09-03-2003
Hi Everybuddy,

I am having a little problem I can not find a solution for.

I am trying to use the SQL-LIKE statement in gadfly. After googling
around I found out that it is not supported, and that on is supposed to
use a regular expression. All great, but there is nowhere a reference
to be found on how to do this. No examples, no nothing, just the
comment to use regular expressions.

Could someone here point me into the right direction?

TIA
Patrick W. Fraley
 
Reply With Quote
 
 
 
 
Aaron Watters
Guest
Posts: n/a
 
      09-03-2003
"Patrick W. Fraley" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> Hi Everybuddy,
>
> I am having a little problem I can not find a solution for.
>
> I am trying to use the SQL-LIKE statement in gadfly. After googling
> around I found out that it is not supported, and that on is supposed to
> use a regular expression. All great, but there is nowhere a reference
> to be found on how to do this. No examples, no nothing, just the
> comment to use regular expressions.
>


As it currently stands what you need to do is evaluate the query
using gadfly, pull the query out into "normal" python, and then use
a python loop and string operations (such as regular expressions) to
choose the results you want (and throw out the others).

This will work for analogues of simple positive queries such as

select a,b
from t
where c like '%this%'

but may not for fancy queries involving "not in" and so forth -- which
would require a proper implementation of "like" in gadfly. Sorry.

Probably the "right" way to fix this is to allow the importation of an
arbitrary function into gadfly from python, which wouldn't be too hard
but isn't trivial.
-- Aaron Watters

ps: my copy of MSAccess doesn't support "like" properly either, fwiw...

===
to do is to be -- Sartre
to be is to do -- Marx
do be do be do -- Sinatra
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gadfly ???? Fuzzyman Python 4 03-05-2004 12:42 PM
Gadfly Q Ian Pellew Python 1 02-20-2004 04:00 PM
Problem installing gadfly on Mandrake 9.2 R.Marquez Python 3 12-08-2003 06:51 PM
Gadfly DB in python standard library? Brian O. Bush Python 4 11-16-2003 06:50 PM
gadfly gfplus error Istvan Albert Python 0 09-08-2003 10:51 PM



Advertisments