473,503 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

gadfly and SQL-LIKE

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
Jul 18 '05 #1
1 1837
"Patrick W. Fraley" <pa*****@fraley.de> wrote in message news:<pa****************************@fraley.de>...
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
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2063
by: Brian O. Bush | last post by:
A while ago, I recall hearing that Gadfly might be included into the python standard library. What happened? As I recall, the issue was the license. Brian
3
1431
by: R.Marquez | last post by:
I tried installing gadfly 1.0 on Mandrake 9.2 and got the following: # python setup.py install running install error: invalid Python installation: unable to open...
1
1406
by: Ian Pellew | last post by:
Hi all; Is there a Windows version of gadfly anywhere? All my searching gets me to Linux stuff (not that I have anything against Linux, rather I use Solaris) Regards Ian
3
1502
by: niko | last post by:
Hello, while using gadfly, got an error that i don't understand. Code is as follow : cursor = connection.cursor() cursor.execute('select id_m from mots where nom_m = "%s"' % nom_m) id_m =...
6
1648
by: Ralf Muschall | last post by:
Hello, I just tried the recent gadfly (from SF), using Python 2.4.2 (hand built, since my Suse 8.2 had only 2.2.2). The direct operation of gadfly works. After calling gfserver, I get (in...
0
7204
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7091
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7282
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7342
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5586
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4680
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3162
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
741
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.