I have a users table and I want to query the usernames column. I want
my query to ignore the upper/lower casing.
So the following searches should all match John: john, jOhn,
johN, JOhn, and so on.
My query at the moment is a follows:
names = queryselect(users.c.username.startswith(john))
there was some thread about this 2week ago or so, look for ILIKE
On Wednesday 18 April 2007 14:58:41 Disrupt07 wrote:
I have a users table and I want to query the usernames column. I
want my query to ignore the upper/lower casing.
So the following searches should all match John: john,
Being new to sqlalchemy I gave myself an exercise to
test my understanding: duplicating a database through
objects. To my naive understanding, sessions act like
Saran Wrap, they seem to stick to objects when I don't
want them to, and not elsewhere. My toy example:
# An attempt to duplicate a
Disrupt07 ha scritto:
I have a users table and I want to query the usernames column. I want
my query to ignore the upper/lower casing.
So the following searches should all match John: john, jOhn,
johN, JOhn, and so on.
My query at the moment is a follows:
names =
On Apr 18, 2007, at 8:40 AM, Jose Soares wrote:
Disrupt07 ha scritto:
I have a users table and I want to query the usernames column. I
want
my query to ignore the upper/lower casing.
So the following searches should all match John: john, jOhn,
johN, JOhn, and so on.
My query at
On Apr 18, 2007, at 8:29 AM, [EMAIL PROTECTED] wrote:
# Read from one data base
engine = create_engine('sqlite:///Simple.db')
metadata.connect(engine)
session = create_session(bind_to=engine)
objects = session.query(Simple).select()
the objects are persistent (i.e. are represented in the
Hello,
Simple question, I have a column score in a table which is defined as
a property in my model :
@property
def score(self):
weights = dict(high=3, medium=2, likely=2, low=1, unlikely=1)
score = weights.get(self.dispersion_potential, 0)
score +=
On Apr 18, 2007, at 12:21 AM, Chris Shenton wrote:
I'm using SQLAlchemy with Pylons and query my 'system' table and order
by their client_id field like:
from er.models import System, Vendor, Client
sys = self.session.query(System).select(System.c.lastseen
self.this_week,
I know that I could use a mapper extension for this (with before_insert,
before_update, etc) but could it not be possible to do it with my
@property ?
I think when SA apply the mapper (that is, assign), it overrides your property
definition. You can ensure that by tracking if your property
when u want it calculated?
- just after load
- just before save
- if not set
- always???
maybe use another attribute (_score) to store the value, map that one
to table's column (either through mapper's property name or column's
key), and let the score() either return _score if set or calc
Hi Guys,
I am trying to do this simple update query :
s=select([table1.c.mo_id],and_(table1.c.msisdn==123,table2.c.mo_id==table1.c.mo_id))
s2=table2.update(table2.c.mo_id.in_(s),values={Del:tut})
against MySQL. running sqlAlchemy 0.35. I get the following error :
(OperationalError) (1093, You
A little background: In this application I need to match a Dictation
to a Surgery all the surgeries must, by regulation be dictated
within a certain time frame. I need too right a query that will return
a list of all surgeries without a dictation. I would then iterate over
that list matching the
On Apr 18, 2007, at 11:43 AM, [EMAIL PROTECTED] wrote:
Hi Guys,
I am trying to do this simple update query :
s=select([table1.c.mo_id],and_
(table1.c.msisdn==123,table2.c.mo_id==table1.c.mo_id))
s2=table2.update(table2.c.mo_id.in_(s),values={Del:tut})
try calling s.correlate(table2)
On Apr 18, 2007, at 11:43 AM, [EMAIL PROTECTED] wrote:
Hi Guys,
I am trying to do this simple update query :
s=select([table1.c.mo_id],and_
(table1.c.msisdn==123,table2.c.mo_id==table1.c.mo_id))
s2=table2.update(table2.c.mo_id.in_(s),values={Del:tut})
theres a fix in r2515 which will
14 matches
Mail list logo