473,563 Members | 2,867 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 1841
"Patrick W. Fraley" <pa*****@fraley .de> wrote in message news:<pa******* *************** ******@fraley.d e>...
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
2066
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
1434
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 /usr/lib/python2.3/config/Makefile (No such file or directory) # Of course, the error is correct in that there is no such file. There is not even a python2.3/ config...
1
1407
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
1508
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 = cursor.fetchall() Error message : File "C:\Python24\Lib\site-packages\gadfly\kjParser.py", line 567, in getmember
6
1650
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 addition to a complete users manual dumped on the screen) the following error message:
0
7665
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7583
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1200
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.