Hi everybody !!!

I'm looking for a kind of wildcard on selectBy statement

Let's see this clarifying example:

class Person(SQLObject):
        name = StringCol()
        age = IntCol()
        gender = StringCol()

def personFilter(nameFilter=**wildcard**, ageFilter=**wildcard**, 
genderFilter=**wildcard**):
        persons = Person.selectBy(name=nameFilter, age=ageFilter, 
gender=genderFilter)
        return list(persons)


Well, i want a way to call personFilter like this:

personFilter(nameFilter='Joseph')                       # Gets Josephs in Person
personFilter(nameFilter='Joseph', ageFilter='23')       # Gets Josephs aged 23 
in Person
personFilter()                                          # Gets all Persons

So i wonder if it's there any wildcard that i can use in the personFilter 
prototype or any other way to do
the same.

Thanks !!!

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to