On Thursday, 24 July 2014 21:56:11 UTC+3, Michael Bayer wrote:
expunge() is a bug:
https://bitbucket.org/zzzeek/sqlalchemy/issue/3139/expunge-after-delete-fails
it’s supposed to raise (hence can’t fix this til 1.0).
so ignore expunge. if you were to emit session.rollback(), you’d find
On Monday, 25 November 2013 17:27:02 UTC+2, Michael Bayer wrote:
On Nov 25, 2013, at 9:00 AM, George Sakkis george...@gmail.comjavascript:
wrote:
Hi all,
is there a feature or pattern for adding a listener that is to be
executed (at most) once? For example, say you want to send
Hi all,
is there a feature or pattern for adding a listener that is to be executed
(at most) once? For example, say you want to send an email when user is
created and the session is committed. If event.listen() supported a once
boolean parameter, this could be expressed as:
def
On Tuesday, August 13, 2013 12:59:57 AM UTC+3, Ams Fwd wrote:
On 08/12/2013 02:50 PM, George Sakkis wrote:
Hello everyone,
this is more of a code architecture and design question but I'm
wondering what the best practices are regarding declarative models. On
the one extreme, models
Hello everyone,
this is more of a code architecture and design question but I'm wondering
what the best practices are regarding declarative models. On the one
extreme, models are pretty barebone, with little more than the columns,
relationships and possibly a few declared attributes and
On Wednesday, June 19, 2013 9:47:08 PM UTC+1, Michael Bayer wrote:
On Jun 19, 2013, at 4:19 PM, George Sakkis george...@gmail.comjavascript:
wrote:
It seems that hybrid properties are not allowed to be specified as
strings for the order_by parameter of a relationship; attempting
It seems that hybrid properties are not allowed to be specified as strings
for the order_by parameter of a relationship; attempting it fails with
InvalidRequestError: Class ... does not have a mapped column named
'...'. Is this a known limitation or a bug? Sample test case below.
Thanks,
On Jan 30, 3:54 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Jan 30, 2013, at 5:43 AM, George Sakkis wrote:
Hello,
I am in the process of migrating to PyPy and have a handful of unit test
failing due to the different garbage collector and SQLAlchemy's usage of
weak references
Hello,
I am in the process of migrating to PyPy and have a handful of unit test
failing due to the different garbage collector and SQLAlchemy's usage of
weak references in the Session identity map. Most failures are probably
safe to ignore and all of them are fixed after manually calling
On Oct 2, 10:39 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Oct 2, 2012, at 4:29 PM, George Sakkis wrote:
I had the impression that the Session’s unit of work figures out
automatically the potential object dependencies and makes sure that
the insertion order is consistent
Hi,
I found an older thread about using a bindparam with required=True
(http://groups.google.com/group/sqlalchemy/tree/browse_frm/thread/
cc0cafb0241c51da/a5fdd0aeefecd75c) but the example doesn't work for me
on 0.7.4, it still passes None instead of raising an exception. Am I
missing something
Thanks, didn't know that, though in this case I want the keys in the
same column order but keys() doesn't preserve it.
George
On Jun 3, 8:59 pm, Michael Bayer mike...@zzzcomputing.com wrote:
each row has a keys() attribute if that helps...
On Jun 3, 2009, at 8:49 PM, George Sakkis wrote
On Jun 4, 5:09 am, King Simon-NFHD78 simon.k...@motorola.com
wrote:
George Sakkis wrote:
Is there a (public) API for getting the column names of a given Query
instance and other similar introspection needs ? I didn't find
anything related in the docs but after digging in the code I came
Is there a (public) API for getting the column names of a given Query
instance and other similar introspection needs ? I didn't find
anything related in the docs but after digging in the code I came up
with
col_names = [e._result_label for e in q._entities]
but I'm not sure how stable and
:46 PM, George Sakkis george.sak...@gmail.comwrote:
I can't for the life of me figure out how to specify a relation
spanning 3 tables. I think I've tried all combinations of
primaryjoin, secondaryjoin, viewonly, foreign_keys, remote_dest and
all that jazz, to no avail so far
I'm trying to use the primaryjoin/foreign_keys parameters (http://
www.sqlalchemy.org/docs/05/mappers.html#specifying-foreign-keys) to
specify a relation between tables that don't have explicit foreign
keys but apparently it's not enough for join() to figure it out:
from sqlalchemy.orm import
On Jun 1, 3:34 pm, Michael Bayer mike...@zzzcomputing.com wrote:
George Sakkis wrote:
I'm trying to use the primaryjoin/foreign_keys parameters (http://
www.sqlalchemy.org/docs/05/mappers.html#specifying-foreign-keys) to
specify a relation between tables that don't have explicit foreign
I can't for the life of me figure out how to specify a relation
spanning 3 tables. I think I've tried all combinations of
primaryjoin, secondaryjoin, viewonly, foreign_keys, remote_dest and
all that jazz, to no avail so far. If this is possible at all, there
should be a sample usage at the docs
I've been trying to speed up a bulk insert process that currently
seems too slow. I've read the past threads about how to replace the
orm/session based inserts with table.insert().execute(*valuedicts) but
in my case the objects are related (via 1-to-many relations if it
makes a difference). In
On Apr 6, 2:52 am, svilen [EMAIL PROTECTED] wrote:
what's your mappers? many2one/one2many relations etc?
I expected that I can create a parent-child link either from parent
to child (by appending to ranker.results) or from child to parent
(as above), but apparently the latter doesn't
I'm using SA (with Elixir on top) and I have a parent Entity Ranker
that has many children Results; that is, for a Ranker instance rk,
rk.results gives its children and for a Result rs, rs.ranker gives its
parent. When I add new children by providing the parent to the
constructor of the child
Is there a way to call a stored procedure from sqlalchemy and access
the returned result set ? If it makes a difference, I'm specifically
interested in MySQL stored procedures. What I want to do is use this
result set as part of another query, but MySQL doesn't currently allow
treating a stored
Michael Bayer wrote:
the func keyword is used for stored procedures. in the latest
trunk, you can also create table-like elements out of funcs to
support multi-column stored procedures, and you can create the SQL
corresponding to the patterns you describe.
That's pretty cool, too bad I
23 matches
Mail list logo