Michael Bayer wrote:
matiskiva wrote:
Naturally, the problem is that SA collects the generated id, that is
why every statement is executed alone, and than the generated id is
retrieved.
I was wondering though, is there some kind of a more efficient
mechanism?
At least on MySQL, under
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
On Feb 1, 2010, at 8:31 PM, Manlio Perillo wrote:
Hi.
I have defined a custom type for PostgreSQL ltree support.
[...]
This works, when I create the table and insert some values.
However when I select data from
Hello,
I'm running sqlalchemy on python 2.4.3, with postgresql. My
application is multi-threaded, commits and queries are protected by a
python thread lock. I suspect that when running session.commit(), the
python global interpreter lock (GIL) remains owned by this thread
until the commit
Thanks, that worked like a charm. Look forward to your PyCon
presentation.
On Feb 2, 12:56 am, Michael Bayer mike...@zzzcomputing.com wrote:
On Feb 1, 2010, at 9:24 PM, Andy (Zenom) wrote:
I don't know if my terminology is correct etc. But the basic idea is
the following.
In my model
avdd wrote:
On Feb 2, 2:52 am, Michael Bayer mike...@zzzcomputing.com wrote:
the behavior you first illustrated, that of merge() and add() not acting
the same regarding pending changes, was a behavior that was somewhat in
the realm of a bug. I mentioned the other day it was fixed in r6711.
Le mardi 02 février 2010 à 01:08 -0800, Eyal Gordon a écrit :
Hello,
I'm running sqlalchemy on python 2.4.3, with postgresql. My
application is multi-threaded, commits and queries are protected by a
python thread lock. I suspect that when running session.commit(), the
python global
Mati Skiva wrote:
Thank you for your feedback.
In the case I mentioned, I cannot just dump the 30K items. Because I
need their generated id's for other inserted rows (I have relations)
In more detail, I am inserting resource items, and also mission items,
each mission connects to a resource
Eyal Gordon wrote:
Hello,
I'm running sqlalchemy on python 2.4.3, with postgresql. My
application is multi-threaded, commits and queries are protected by a
python thread lock. I suspect that when running session.commit(), the
python global interpreter lock (GIL) remains owned by this thread
The one thing that is frustrating is it is re-querying the database.
So if I create a simple server side function how would I do that? I am
currently using trunk.
On Feb 2, 8:57 am, Andy andy.hol...@belator.com wrote:
Thanks, that worked like a charm. Look forward to your PyCon
presentation.
Andy (Zenom) wrote:
The one thing that is frustrating is it is re-querying the database.
So if I create a simple server side function how would I do that? I am
currently using trunk.
how to create the server side function or how to use it from SQLA ? the
column_property() thing is where you'd
I got the server side one created in schema cms, function name is
slugify.
I am trying to figure out how to let sqlalchemy know about the
function and the schema its in. On postgresql I can do like SELECT
cms.slugify(title) FROM cms.tablename, and it returns the slugified
title, but to get that
Andy (Zenom) wrote:
I got the server side one created in schema cms, function name is
slugify.
I am trying to figure out how to let sqlalchemy know about the
function and the schema its in. On postgresql I can do like SELECT
cms.slugify(title) FROM cms.tablename, and it returns the
I do this, and the query it spits out in the error works fine in the
postgresql command line, but not in sqlalchemy.
Traceback:
http://pylonshq.com/tracebacks/9b322f31095beda23f5d846e43399d21
query:
'SELECT DISTINCT cms.niches.title AS cms_niches_title,
cms.niches.niche_id AS
Scratch the last, helps if I have my development.ini pointed to the
proper database server :) Its working fine. Thanks for all the help :)
On Feb 2, 11:24 am, Andy (Zenom) stress...@gmail.com wrote:
I do this, and the query it spits out in the error works fine in the
postgresql command line,
Hi Michael,
Thanks for the tip on dialect creation; I have a working connection
and much of the low level library functionality appears to just
work.
I've just started digging into the internals to begin implementing
introspection support. One issue I've encountered is that PyODBC
happens to
Mati Skiva wrote:
I believe I took these issues into account.
But just to be sure, maybe you can highlight something for me.
I assume the followings about the process of session.add:
* after session.add is called, the objects are placed in a to-do pool
(maybe)
* for self-generating-id
Hi All,
The script at the end of this message blows up with:
sqlalchemy.exc.InvalidRequestError: When compiling mapper
Mapper|Employee|employee, expression 'Organisation' failed to locate a
name (name 'Organisation' is not defined). If this is a class name,
consider adding this relation() to
Michael Bayer wrote:
Piecing together a select() construct and compiling to a string is a
relatively inexpensive operation.The vast majority of time in Query is
spent about 1/3rd-half on the database side and the rest in fetching rows
and instantiating/populating objects.
Fair enough.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
I have written a small class in order to support PostgreSQL tsearch type:
class TextSearchVector(UserDefinedType):
Support for full-text search
See
http://www.postgresql.org/docs/8.4/static/datatype-textsearch.html
def
Chris Withers wrote:
Hi All,
The script at the end of this message blows up with:
sqlalchemy.exc.InvalidRequestError: When compiling mapper
Mapper|Employee|employee, expression 'Organisation' failed to locate a
name (name 'Organisation' is not defined). If this is a class name,
consider
Michael Bayer wrote:
Mati Skiva wrote:
I believe I took these issues into account.
But just to be sure, maybe you can highlight something for me.
I assume the followings about the process of session.add:
* after session.add is called, the objects are placed in a to-do pool
(maybe)
* for
Manlio Perillo wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
I have written a small class in order to support PostgreSQL tsearch type:
class TextSearchVector(UserDefinedType):
Support for full-text search
See
Hi. I'm trying to track down a problem, and I'm wondering if the following
two statements are appreciably different? I would have thought they were
equivalent:
(1) result = engine.execute(myQuery)
(2) result = text(myQuery, engine).execute()
myQuery is a string containing a big, hairy SQL
Mati Skiva wrote:
from inspecting mapper.py's _save_obj method, I found that after every
insert the following items are required:
* value_params - used by _postfetch
* params - used by _postfetch
* ResultProxy.last_inserted_params() - used by _postfetch
*
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
[...]
In SQL (tested with PostgreSQL and SQLite, at least) I can do:
INSERT INTO test (text) values(to_tsvector('some text'));
That is, it is possible to specify a scalar select statement for each
value.
Is this
Manlio Perillo wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
[...]
In SQL (tested with PostgreSQL and SQLite, at least) I can do:
INSERT INTO test (text) values(to_tsvector('some text'));
That is, it is possible to specify a scalar select statement for
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
Manlio Perillo wrote:
[...]
OK you mean SQL expression during compilation. This is ticket #1534
which is not yet implemented.
After some tests I got something that works
http://paste.pocoo.org/show/173099/
[...]
Manlio Perillo wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
Manlio Perillo wrote:
[...]
OK you mean SQL expression during compilation. This is ticket #1534
which is not yet implemented.
After some tests I got something that works
avdd wrote:
Something a bit more normal now.
Combining optimistic concurrency control with cascading PK updates is
problematic, if you load the child relation, the session issues
unecessary updates for the children, resulting in
ConcurrentModificationError
this issue is fixed in trunk as
29 matches
Mail list logo