Mike,
Very helpful! Seems to work great.
Wanna give me a tip on how to make the user's table join to this query
via the user_id so that I can access the user's information at
something like q.user.email?
Seth
On Aug 26, 9:22 pm, Mike Conley mconl...@gmail.com wrote:
or should be a little
Hi,
I have a problem with such program (available at
http://filip.math.uni.lodz.pl/relation_problem.py):
=
Fails with Python-2.5.4 and SQLAlchemy-0.5.5
import sqlalchemy
import sqlalchemy.ext.declarative
'''
This program
Tefnet Developers wrote:
class Location(PhysObject):
Id = sqlalchemy.Column(sqlalchemy.types.Integer,
sqlalchemy.ForeignKey(PhysObject.Id), primary_key=True)
description = sqlalchemy.Column( sqlalchemy.types.String(128))
PhysObject.location = sqlalchemy.orm.relation(
Xavian wrote:
1) Is there a way to give SqlSoup hints on how to handle the lack of a
primary key so that the selection and mapping magic will work
correctly instead of raising a PKNotFoundError exception?
SQLSoup tables are all mapped classes. a mapper() always needs a primary
key. so at
why not use a high speed database like an in-memory SQLite db for running
your tests ?
一首诗 wrote:
I am using SqlAlchemy and I used to access database directly from
business layer directly by calling SqlAlchemy API.
But then I found that would cause too much time to run all my test
cases
On Aug 26, 6:01 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Aug 26, 2009, at 8:53 PM, chris e wrote:
I just checked the trunk, it the same reflection code is in place, as
far as the column length is concerned.
To me the question is, should sqlalchemy be aware of Char vs Byte
Hi all,
I'm having a problem with a non primary key sequence involved in a
relation. The failing environment is sqlalchemy 0.5.5 on ms sql server
2005 with pymssql 0.8.
I have a parent table with its own pk and a sequence field and a
child table with a pk composed by the parent's sequence (NOT
On Aug 27, 9:05 pm, Michael Bayer mike...@zzzcomputing.com wrote:
Y3s wrote:
It seems that the child instances are not updated with the right
sequence number. Moreover, if I turn the parent's id column into the
primary key, the error disappears.
Is it a known issue? Can i fix it in
If we prefer it to be characters, then we should probably use
CHAR_LENGTH instead of DATA_LENGHT when reflecting, and add the CHAR
specifier to the column generators. I can put together a patch if that
helps.
On Aug 27, 10:02 am, jek jason.kirtl...@gmail.com wrote:
On Aug 26, 6:01 pm,
Hi all,
We're hitting a weird bug here. I'm doing a standard query with
filters, and this is appended to the end:
resultObj = resultObj.order_by(Member.lastname,
Member.firstname,
Member.middleinitial,
Y3s wrote:
It seems that the child instances are not updated with the right
sequence number. Moreover, if I turn the parent's id column into the
primary key, the error disappears.
Is it a known issue? Can i fix it in some way (except for normalize
the db schema)?
I dont believe MSSQL
OK, I can mostly answer my own question
q1=session.query(P1.userid,P1.extra,P1.title,P1.body)
q2=session.query(P2.userid,'X',P2.title,P2.body)
q3=session.query(P3.userid,'X',P3.title,P3.body)
subq=q1.union_all(q2,q3).subquery()
q = session.query(USER.email, subq).join((subq,
Yes, I'm using this in a CherryPy threaded web app. One request could
take a long time, based on search criteria. But each query runs in
it's own thread, with it's own isolated session.
I have a sessionmaker in my constructor:
def __init__(self,dsn):
self.engine =
OK, so is the solution to run these in separate processes instead?
Is this a GIL limitation?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to
Hi,
I'm trying to create a custom/derived attribute on a table class. This
is what I have defined:
class Plate(Base):
__tablename__ = 'plate'
__table_args__ = {'autoload' : True}
class Design(Base):
__tablename__ = 'design'
__table_args__ = {'autoload' : True}
OK, so is the solution to run these in separate processes instead?
Is this a GIL limitation?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to
Wow, my browser is posting multiple times when I have something else
refreshing another screen in FF. Weird!
On Aug 27, 7:16 pm, Gloria strang...@comcast.net wrote:
Fantastic! I'll do this and respknd again tomorrow. Thanks for your
help,
--~--~-~--~~~---~--~~
Fantastic! I'll do this and respknd again tomorrow. Thanks for your
help,
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To
Fantastic! I'll do this and respknd again tomorrow. Thanks for your
help,
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To
Assuming a declarative based class USER exists, then you can join each of
the queries q1, q2, q3 to USER like this:
q1 = session.query(P1.userid,P1.extra,P1.title,P1.body,USER.email)
q1 = q1.join((USER,USER.userid==P1.userid))
q2 = session.query(P2.userid,'X',P2.title,P2.body,USER.email)
q2 =
Here is the problem
I have two mapped classes (A and B) and want to create a union_all query.
q1 = session.query(A.data, '\'A\'') # includes a literal 'A' in the result
q2 = session.query(B.data, '\'B\'')
qry = q1.union_all(q2)
generates this SQL:
SELECT anon_1.data, 'A'
FROM (SELECT a.data AS
Gloria W wrote:
Hi all,
We're hitting a weird bug here. I'm doing a standard query with
filters, and this is appended to the end:
resultObj = resultObj.order_by(Member.lastname,
Member.firstname,
Member.middleinitial,
Gloria wrote:
Yes, I'm using this in a CherryPy threaded web app. One request could
take a long time, based on search criteria. But each query runs in
it's own thread, with it's own isolated session.
right but, a set of threads could be hanging for a long time, is my point.
like if hitting
Yes, I'm using this in a CherryPy threaded web app. One request could
take a long time, based on search criteria. But each query runs in
it's own thread, with it's own isolated session.
I have a sessionmaker in my constructor:
def __init__(self,dsn):
self.engine =
Yes, I'm using this in a CherryPy threaded web app. One request could
take a long time, based on search criteria. But each query runs in
it's own thread, with it's own isolated session.
I have a sessionmaker in my constructor:
def __init__(self,dsn):
self.engine =
Gloria wrote:
OK, so is the solution to run these in separate processes instead?
Is this a GIL limitation?
not at all. you would need to a. determine that you do in fact have
queries that are taking exceedingly long to complete and then b. repair
those queries so that they return in a
Yes, I'm using this in a CherryPy threaded web app. One request could
take a long time, based on search criteria. But each query runs in
it's own thread, with it's own isolated session.
I have a sessionmaker in my constructor:
def __init__(self,dsn):
self.engine =
OK, so is the solution to run these in separate processes instead?
Is this a GIL limitation?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to
Fantastic! I'll do this and respknd again tomorrow. Thanks for your
help,
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To
On Aug 27, 2009, at 7:55 PM, Mike Conley wrote:
Here is the problem
I have two mapped classes (A and B) and want to create a union_all
query.
q1 = session.query(A.data, '\'A\'') # includes a literal 'A' in the
result
q2 = session.query(B.data, '\'B\'')
qry = q1.union_all(q2)
OK, so is the solution to run these in separate processes instead?
Is this a GIL limitation?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to
31 matches
Mail list logo