On Wed, Feb 10, 2010 at 08:48, Chris chris.g@gmail.com wrote:
Hi All
Have just upgraded to this version and am having the following issue.
I use a the execute method on a ScopedSession to run generic SQL
Statements in a TextClause, in the resulting BufferedRowResultProxy
object their
On Wed, Feb 10, 2010 at 09:04, Gaetan de Menten gdemen...@gmail.com wrote:
On Wed, Feb 10, 2010 at 08:48, Chris chris.g@gmail.com wrote:
Hi All
Have just upgraded to this version and am having the following issue.
I use a the execute method on a ScopedSession to run generic SQL
Hi all,
I have a lot of integer fields in a mysql db and when I query them I get
always a long python type instead of an integer python type.
Is quite annoying to convert long to int every time... how can I get rid
of this?
I remember that with mysql-python you can pass an instance of
Thanks for the ticket 1681 consideration. Though my understanding of
the software isn't strong enough to recommend (or understand) what you
are suggesting in 1681, I can observe the behavior enough to wonder
why do we need to go back to the database again?
(Also, wondering if some databases
Thanks, Micheal for your help
On Wed, Feb 10, 2010 at 9:53 AM, Michael Trier mtr...@gmail.com wrote:
hello all,
I am newbie in sqlalchemy.I am thrilled by the sqlachemy features. But i
got struck in the how to write the not null for the following:
create table organisation(orgcode
hello all,
I want to create view based on the following tables
from sqlalchemy import create_engine
from sqlalchemy import Table, Column, Integer, String, MetaData, ForeignKey
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import
restored in r6742.
On Feb 10, 2010, at 2:48 AM, Chris wrote:
Hi All
Have just upgraded to this version and am having the following issue.
I use a the execute method on a ScopedSession to run generic SQL
Statements in a TextClause, in the resulting BufferedRowResultProxy
object their
On Feb 10, 2010, at 5:12 AM, Simone Orsi wrote:
Hi all,
I have a lot of integer fields in a mysql db and when I query them I get
always a long python type instead of an integer python type.
Is quite annoying to convert long to int every time... how can I get rid
of this?
I remember
On Feb 10, 2010, at 8:36 AM, Kent wrote:
I've researched this in the past and they don't. I will look into
re-introducing allow_null_pks as a new flag allow_partial_pks,
defaults to True, will be honored by merge(), you set yours to False.
this is 0.6 only.
Thanks for your
Let's say I've got simple structure Order--Item--Detail.
class Detail(Base):
...
class Order(Base):
...
class Item(Base):
...
detail = relation(Detail, uselist=False, lazy=False)
order = relation(Order, uselist=False, backref='items')
Of course I can specify order_by for Order.items
On Feb 10, 2010, at 10:17 AM, Andrija Zarić wrote:
Let's say I've got simple structure Order--Item--Detail.
class Detail(Base):
...
class Order(Base):
...
class Item(Base):
...
detail = relation(Detail, uselist=False, lazy=False)
order = relation(Order, uselist=False,
On Feb 10, 2010, at 5:35 AM, anusha kadambala wrote:
hello all,
I want to create view based on the following tables
from sqlalchemy import create_engine
from sqlalchemy import Table, Column, Integer, String, MetaData, ForeignKey
from sqlalchemy.ext.declarative import declarative_base
On Feb 10, 2010, at 10:34 AM, Michael Bayer wrote:
Maybe, I haven't tried this, you could make an alternate (non primary)
mapping to Item that was a join of Item and Detail, i.e. like:
itemdetail = mapper(Item.__table__.join(Detail.__table__), non_primary=True)
Order.items =
I`m interesting in one question (I didn`t find answer in docs): Is
sqlalchemy designed to work with gc turned on only or not (in other
words: Does the sqlalchemy free unused objects itself if gc turned off
or not) ?
--
You received this message because you are subscribed to the Google Groups
On Feb 10, 2010, at 11:12 AM, redfox wrote:
I`m interesting in one question (I didn`t find answer in docs): Is
sqlalchemy designed to work with gc turned on only or not (in other
words: Does the sqlalchemy free unused objects itself if gc turned off
or not) ?
All Python libraries I am
Hi All,
With SA 0.5.8 on Python 2.5, the attached test_with_default blows up with:
Traceback (most recent call last):
File test_default_arg_sqlite.py, line 46, in test_with_default
peterb2 = session.query(PersonWITH).filter_by(name='PeterB').first()
File
not sure if this is obvious, its the sqlite3.PARSE_DECLTYPES. The SQLite date
types don't expect this to be turned on. That is a handy feature which I'm
not sure was available in such a simple form when I first wrote against the
pysqlite dialect in Python 2.3.
A workaround is to use a
After merge() returns, is there a way for me to pair each object in
the returned merge_obj with the object it was created from?
For example:
merged_obj = session.merge(object)
At the top level, it is trivial, merged_obj was created because of the
instance object
For single RelationProperties
First spin though, I get these errors/warnings:
/home/zope/.buildout/eggs/SQLAlchemy-0.6-py2.5.egg/sqlalchemy/engine/reflection.py:40:
SAWarning: Did not recognize type 'ROWID' of column 'objid'
ret = fn(self, con, *args, **kw)
On Feb 10, 2010, at 2:49 PM, Kent wrote:
After merge() returns, is there a way for me to pair each object in
the returned merge_obj with the object it was created from?
For example:
merged_obj = session.merge(object)
At the top level, it is trivial, merged_obj was created because of the
BTW, this is using 0.6 beta1 build 6743 on Grok, reflecting a view from an
Oracle (10.2) 10g DB.
--
Jeffrey D Peterson
Webmaster
Crary Industries, Inc.
From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On
Behalf Of Jeff Peterson
Sent: Wednesday, February 10, 2010 2:29 PM
On Feb 10, 2010, at 3:28 PM, Jeff Peterson wrote:
First spin though, I get these errors/warnings:
/home/zope/.buildout/eggs/SQLAlchemy-0.6-py2.5.egg/sqlalchemy/engine/reflection.py:40:
SAWarning: Did not recognize type 'ROWID' of column 'objid'
ret = fn(self, con, *args, **kw)
If I understand you correctly, you are saying
object.list[0] will always cause creation (or fetch) of merged.list[0]
object.list[1] will always cause creation (or fetch) of merged.list[1]
etc.
There may be also more merged.list[2], [3], etc...
Correct?
This is the merge code 0.5.8:
if
Thanks
On 10 Feb, 14:55, Michael Bayer mike...@zzzcomputing.com wrote:
restored in r6742.
On Feb 10, 2010, at 2:48 AM, Chris wrote:
Hi All
Have just upgraded to this version and am having the following issue.
I use a the execute method on a ScopedSession to run generic SQL
--
Jeffrey D Peterson
Webmaster
Crary Industries, Inc.
From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On
Behalf Of Michael Bayer
Sent: Wednesday, February 10, 2010 2:38 PM
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] Warnings take a really long time /
From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On
Behalf Of Michael Bayer
Sent: Wednesday, February 10, 2010 2:38 PM
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] Warnings take a really long time / NotImplementedError
On Feb 10, 2010, at 3:28 PM, Jeff
On Feb 10, 2010, at 3:52 PM, Kent wrote:
If I understand you correctly, you are saying
object.list[0] will always cause creation (or fetch) of merged.list[0]
object.list[1] will always cause creation (or fetch) of merged.list[1]
etc.
There may be also more merged.list[2], [3], etc...
On Feb 10, 2010, at 4:13 PM, Jeff Peterson wrote:
The first time I render that view, the reflection takes place and it takes
the 30-40 seconds to load the page (during which time the warnings are being
generated), once it’s mapped it is very fast.
You should probably have reflection
Very good, thanks.
Although, I'm pretty sure I understand what you are saying, what
exactly do you mean by pending/transients?
On Feb 10, 4:13 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Feb 10, 2010, at 3:52 PM, Kent wrote:
If I understand you correctly, you are saying
Further, if I inspect the returned object *directly* after the call to
merge(), then aren't I guaranteed any Relations with use_list=True
have will have the same length, since that is the point of merge in
the first place?
That being the case, I can always simply correspond the merged index
with
Having collations on a per-column basis in MySQL and SQLite, I'd like
to specify the collation when creating tables/views. I have been
trying google and source for some hours now, and it seems there's just
no way to handle it easily with SA.
MySQL has support via private VARCHAR, but SQLite has
Hi,
I am using this pattern to execute a simple query on a database:
def execute(sqluri, query):
engine = create_engine(sqluri)
connection = engine.connect()
try:
connection.execute(query)
finally:
connection.close()
I was wondering if this was the best pattern,
--
Jeffrey D Peterson
Webmaster
Crary Industries, Inc.
From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On
Behalf Of Michael Bayer
Sent: Wednesday, February 10, 2010 3:18 PM
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] Warnings take a really long time /
I am constructing queries involving MSTimeStamp fields in MySQL and am
being receiving Incorrect datetime value warnings even in
situations where my queries are valid in MySQL.
How do I modify the following query so that sqlalchemy will accept it
without warning:
On Feb 10, 2010, at 4:28 PM, Kent wrote:
Very good, thanks.
Although, I'm pretty sure I understand what you are saying, what
exactly do you mean by pending/transients?
see the description here:
http://www.sqlalchemy.org/docs/session.html#quickie-intro-to-object-states
On Feb 10,
I am constructing queries involving MSTimeStamp fields in MySQL and am
being receiving Incorrect datetime value warnings even in
situations where my queries are valid in MySQL.
How do I modify the following query so that sqlalchemy will accept it
without warning:
On Feb 10, 2010, at 4:36 PM, Kent wrote:
Further, if I inspect the returned object *directly* after the call to
merge(), then aren't I guaranteed any Relations with use_list=True
have will have the same length, since that is the point of merge in
the first place?
you can assume the lengths
When I do something simple like this script:
o=Order()
o.orderid = 'KBORDE'
ol=OrderDetail()
ol.lineid=1 # exists in database
o.orderdetails=[ol]
mo=DBSession.merge(o)
mo.orderdetails[0] in DBSession.new
mo.orderdetails[0].saleprice = 65
DBSession.flush()
(output pasted below)=
I
On Feb 10, 6:59 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Feb 10, 2010, at 4:36 PM, Kent wrote:
Further, if I inspect the returned object *directly* after the call to
merge(), then aren't I guaranteed any Relations with use_list=True
have will have the same length, since that
On Feb 10, 2010, at 6:05 PM, Jeff Peterson wrote:
It’s touching a ton of tables, hundreds…if I had to guess I’d say every table
in the schema. The reasons for this are unknown to me, certainly all those
tables are not related specifically to the single view I am attempting to
reflect.
On Feb 10, 2010, at 5:04 PM, Christoph Burgmer wrote:
Having collations on a per-column basis in MySQL and SQLite, I'd like
to specify the collation when creating tables/views. I have been
trying google and source for some hours now, and it seems there's just
no way to handle it easily with
On Feb 10, 2010, at 5:24 PM, Tarek Ziadé wrote:
Hi,
I am using this pattern to execute a simple query on a database:
def execute(sqluri, query):
engine = create_engine(sqluri)
connection = engine.connect()
try:
connection.execute(query)
finally:
On Feb 10, 2010, at 6:52 PM, Bobby Impollonia wrote:
I am constructing queries involving MSTimeStamp fields in MySQL and am
being receiving Incorrect datetime value warnings even in
situations where my queries are valid in MySQL.
How do I modify the following query so that sqlalchemy will
Hello,
First of all, I'll apologize if this is a really basic question. I've not been
using SQLAlchemy for long, and I've only very recently picked up Python. Even
though I've looked everywhere I can think of for an answer to this question,
I'm almost certain that it is not a difficult one.
Hi,
On Feb 10, 2010, at 6:54 PM, David Ressman wrote:
Hello,
First of all, I'll apologize if this is a really basic question. I've not
been using SQLAlchemy for long, and I've only very recently picked up Python.
Even though I've looked everywhere I can think of for an answer to this
On Feb 10, 2010, at 7:38 PM, Michael Trier wrote:
What you likely want to dig into is Query enabled properties
(http://www.sqlalchemy.org/docs/mappers.html?highlight=property%20association#building-query-enabled-properties).
I used this a lot of times to tie what appears to be a relationship
On Feb 10, 2010, at 7:10 PM, Kent wrote:
When I do something simple like this script:
o=Order()
o.orderid = 'KBORDE'
ol=OrderDetail()
ol.lineid=1 # exists in database
o.orderdetails=[ol]
mo=DBSession.merge(o)
mo.orderdetails[0] in DBSession.new
mo.orderdetails[0].saleprice = 65
Hi, 0.4 doesn't seem to support correlate() on a Query object. I have
a subquery (which is actually just another Query object), so at no
point can I actually do a correlate(). Any other good options other
than upgrading to 0.5 or using a select ?
Cheers
--
You received this message because you
48 matches
Mail list logo