[sqlalchemy] sqlalchemy.exc.InvalidRequestError: Mapper properties (i.e. deferred,column_property(), relationship(), etc.) must be declared as @declared_attr callables on declarative mixin classes.

2016-01-15 Thread Andreas Jung
kotti/lib/python2.7/site-packages/sqlalchemy/ext/declarative/base.py", line 216, in _scan_attributes "Mapper properties (i.e. deferred," sqlalchemy.exc.InvalidRequestError: Mapper properties (i.e. deferred,column_property(), relationship(), etc.) must be declared as @declared_

[sqlalchemy] SA 0.8.0 UnicodeDecodeError with Postgres 9.1.9

2013-04-19 Thread Andreas Jung
vs 0.8.0 - but this does not make a different). Any clue? Andreas File /home/ajung/.buildout/eggs/pyramid-1.4-py2.7.egg/pyramid/tweens.py, line 21, in excview_tween response = handler(request) File /home/ajung/.buildout/eggs/pyramid_tm-0.7-py2.7.egg/pyramid_tm/__init__.py, line 82

[sqlalchemy] Re: SA 0.8.0 UnicodeDecodeError with Postgres 9.1.9

2013-04-19 Thread Andreas Jung
Problem seems to be related how I moved the database (pg_dump + pg_restore). After moving the database files directory I can no longer reproduce this error. -aj On Friday, April 19, 2013 8:36:58 AM UTC+2, Andreas Jung wrote: Hi there, I receive the following weird UnicodeDecodeError after

[sqlalchemy] Storing a two dimensional list structure with different item types in Postgres 9.1

2012-12-20 Thread Andreas Jung
type for this...is there a better option? Right now there are numeric and string values to be stored. I can of course convert numeric values to strings if needed. Any options? Andreas -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To view

[sqlalchemy] Adding method to ORM mapped object

2009-08-09 Thread Andreas
Hi! I was just curious, if it is possible to add a method to an ORM mapped object, because I'd like to assemble a string within that object. Here's what I'd like to do: class page(): def __init__(self, name, title, content): self.name = name self.title = title

[sqlalchemy] Re: Adding method to ORM mapped object

2009-08-09 Thread Andreas
On Aug 10, 3:18 am, Michael Bayer mike...@zzzcomputing.com wrote: On Aug 9, 2009, at 9:00 PM, Andreas wrote: The problem ist that the mapper call overwrites anything, I can't access getRendered the normal way. Is there an easy work'round or do I have to assemble the rendered output

[sqlalchemy] Re: Adding method to ORM mapped object

2009-08-09 Thread Andreas
Arghh... I got it. The problem was that I wasn't querying through a session, but doing a selection without one, so the object wasn't bound to the class ... Some old code fragment. Quite as you said. Thanks for your help :) --~--~-~--~~~---~--~~ You received this

[sqlalchemy] XX and YY are both of the same direction symbol 'ONETOMANY error

2009-04-02 Thread Andreas Jung
two weeks at this point? Andreas - -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: i...@zopyx.com - Phone +49 - 7071 - 793376 Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535 Geschäftsführer/Gesellschafter: ZOPYX Limited

[sqlalchemy] Re: Mapping an existing database

2009-03-29 Thread Andreas Jung
fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:i...@zopyx.com title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1

[sqlalchemy] Re: session of an object

2009-03-25 Thread Andreas Jung
/sqlalchemy?hl=en -~--~~~~--~~--~--~--- begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:i...@zopyx.com title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840

[sqlalchemy] Re: sqlalchemy and json

2009-03-24 Thread Andreas Jung
-~--~~~~--~~--~--~--- begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:i...@zopyx.com title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla

[sqlalchemy] Re: Any one tried to use SqlAlchemy with XML RPC?

2009-03-19 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 19.03.2009 8:32 Uhr, Arthur Pemberton wrote: 2009/3/19 Andreas Jung li...@zopyx.com: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 19.03.2009 6:49 Uhr, Arthur Pemberton wrote: SQLAlchemy needs a concept of Data Transfer Objects so

[sqlalchemy] Re: Any one tried to use SqlAlchemy with XML RPC?

2009-03-18 Thread Andreas Jung
n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:i...@zopyx.com title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard

[sqlalchemy] Re: Any one tried to use SqlAlchemy with XML RPC?

2009-03-18 Thread Andreas Jung
://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~--- begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:i...@zopyx.com title:CEO tel;work:+49-7071-793376 tel;fax:+49

[sqlalchemy] Re: How to write a self 2 self relationship?

2009-02-16 Thread Andreas Jung
To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~--- begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr

[sqlalchemy] Re: parent/child relationship: what am I doing wrong?

2009-02-01 Thread Andreas Jung
To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~--- begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted

[sqlalchemy] [SA0.5.2/PG] KeyError: pg_expression_2

2009-02-01 Thread Andreas Jung
::text), lower(assistenz_sv::text), lower(fred::text), lower(redakteur_sv::text), lower(fred_sv::text)); Andreas - -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: i...@zopyx.com - Phone +49 - 7071 - 793376 Registergericht: Amtsgericht Stuttgart

[sqlalchemy] Re: INTERVAL 1 DAY in ORM

2009-01-25 Thread Andreas Jung
Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:i...@zopyx.com title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard

[sqlalchemy] Re: How to improve performance of sqlalchemy based application?

2009-01-18 Thread Andreas Jung
/group/sqlalchemy?hl=en -~--~~~~--~~--~--~--- begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:i...@zopyx.com title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071

[sqlalchemy] [Decl. Layer] Multiple mappers for one table?

2009-01-13 Thread Andreas Jung
using a very minimal mapper. However there is no obvious way to configure a non-primary mapper using the declarative layer? Andreas -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

[sqlalchemy] Re: [Decl. Layer] Multiple mappers for one table?

2009-01-13 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13.01.2009 15:52 Uhr, Michael Bayer wrote: On Jan 13, 2009, at 8:19 AM, Andreas Jung wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is it possible to define multiple mappers for one table? Usecase: I have one big table (60 cols

[sqlalchemy] Re: Suggestions for abbreviations

2009-01-11 Thread Andreas Jung
can have multiple mappers for the same table. Citing Guido: explicit is better than implicit. My-2-cent, Andreas -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAklp16AACgkQCJIWIbr9KYzroQCgxVi70Tb7Bf

[sqlalchemy] Re: [SA0.5/Postgres 7.4] SAVEPOINT sent although not supported through Postgres 7.4

2009-01-02 Thread Andreas Jung
On 02.01.2009 18:11 Uhr, Michael Bayer wrote: On Jan 2, 2009, at 4:24 AM, Andreas Jung wrote: Hi there, running SA 0.5rc4, psycopg2 together with Postgres 7.4.22. I am currently migrating a Zope application from SA 0.3 to SA 0.5. While the migration worked for a bigger application I have

[sqlalchemy] Re: Callback on save when value of field has changed?

2008-12-27 Thread Andreas Jung
this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~--- begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable

[sqlalchemy] Re: Updating existing objects

2008-12-26 Thread Andreas Jung
n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:i...@zopyx.com title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard

[sqlalchemy] Re: Efficient dictificationof result sets

2008-12-18 Thread Andreas Jung
On 10.12.2008 20:36 Uhr, Michael Bayer wrote: On Dec 10, 2008, at 2:27 PM, Andreas Jung wrote: Hi there, is there some more efficient way for dictifying a resultset other than lst = list() for row in session.query(...).all(): d = self.__dict__.copy() for k in d.keys

[sqlalchemy] Re: Efficient dictificationof result sets

2008-12-18 Thread Andreas Jung
On 19.12.2008 2:57 Uhr, Michael Bayer wrote: On Dec 18, 2008, at 3:04 PM, Andreas Jung wrote: On 10.12.2008 20:36 Uhr, Michael Bayer wrote: On Dec 10, 2008, at 2:27 PM, Andreas Jung wrote: Hi there, is there some more efficient way for dictifying a resultset other than lst = list

[sqlalchemy] Re: [SA0.5b4/Postgres 7.4] ValueError: 'need more than 0 values to unpack'

2008-12-16 Thread Andreas Jung
There is no relation() involved here. Every relation() related code is commented right now. (see attachment). Andreas On Tue, Dec 16, 2008 at 4:48 PM, Michael Bayer mike...@zzzcomputing.comwrote: your mappers are failing to compile (i.e. if you were to call compile_mappers() manually

[sqlalchemy] [SA0.5b4/Postgres 7.4] ValueError: 'need more than 0 values to unpack'

2008-12-16 Thread Andreas Jung
' mapper or 'fassung' table. Bug or feature? Andreas --- /local/HRS2/Devel/ajung/tb-dev/parts/modules-svn/toolbox/database/tests/test_database.py(61)testSimpleSelects() - rows = session.query(mapper).limit(50).all() /home/ajung/.buildout/eggs/SQLAlchemy-0.5.0rc4-py2.4.egg/sqlalchemy/orm

[sqlalchemy] Setting up a self-referential mapper using the declarative layer

2008-12-11 Thread Andreas Jung
, remote_side=[Foo.id]) Basically using 'Foo' within the relation() does not work within the class definition of Foo itself. Andreas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] Re: Setting up a self-referential mapper using the declarative layer

2008-12-11 Thread Andreas Jung
for iteration. The same code implemented as standard mapper using SA 0.3 behaves as it should. I can not see the difference how to make it work with SA 0.5. Andreas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy

[sqlalchemy] Efficient dictificationof result sets

2008-12-10 Thread Andreas Jung
takes pretty long for large result sets and tables with lots of columns. Andreas -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535

[sqlalchemy] Re: any easy way to make a just-out-of-db object readonly?

2008-12-05 Thread Andreas Jung
/sqlalchemy?hl=en -~--~~~~--~~--~--~--- begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:[EMAIL PROTECTED] title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840

[sqlalchemy] ProgrammingError: (ProgrammingError) Feh ler »syntax error« bei »SAVEPOINT«

2008-11-23 Thread Andreas Jung
I am getting the following error with SA 0.5.0rc4 and Postgres 8.1 while trying some integration work with SQLAlchemy and Plone (on top of Zope). Any idea? Andreas get(): Storage RDBMSStorage ATDocument at front-page ab23df631c18ea2c9ae7be8321f647dd 2008-11-23 15:13:39 ERROR root Exception

[sqlalchemy] Re: ProgrammingError: (ProgrammingError) Fehler »syntax error« bei »SAVEPOINT«

2008-11-23 Thread Andreas Jung
Oopps...I was using the wrong database...someone switched the port numbers :- Andreas On 23.11.2008 15:17 Uhr, Andreas Jung wrote: I am getting the following error with SA 0.5.0rc4 and Postgres 8.1 while trying some integration work with SQLAlchemy and Plone (on top of Zope). Any idea

[sqlalchemy] Re: Load capabilities with default pool_size and max_overflow

2008-07-15 Thread Andreas Jung
--On 15. Juli 2008 22:32:35 -0700 Fotinakis [EMAIL PROTECTED] wrote: Hello SQLAlchemists, What is (or what do you think is) the load that SQLAlchemy can handle with the default engine options of pool_size=5 and max_overflow=10? The application I'm working on has the potential for bursts of

[sqlalchemy] Implementation patterns for initializing the model and obtaining the mappers

2008-06-29 Thread Andreas Jung
within the local scope into the global scope (in order to make them importable) and because of this code within main.py: import model model.setup(dsn) from model import MyMapper, Session This there any better pattern for implementing this? Andreas pgp8Sn4MBKtP9.pgp Description: PGP signature

[sqlalchemy] Re: Implementation patterns for initializing the model and obtaining the mappers

2008-06-29 Thread Andreas Jung
--On 29. Juni 2008 16:57:16 -0400 Michael Bayer [EMAIL PROTECTED] wrote: On Jun 29, 2008, at 12:46 PM, Andreas Jung wrote: This approach is ugly (because of putting the mapper within the local scope into the global scope (in order to make them importable) and because of this code within

[sqlalchemy] Re: text

2008-06-11 Thread Andreas Jung
--On 11. Juni 2008 17:55:44 +0100 King Simon-NFHD78 [EMAIL PROTECTED] wrote: -Original Message- From: sqlalchemy@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jack2318 Sent: 11 June 2008 17:50 To: sqlalchemy Subject: [sqlalchemy] text I tried very simple test: s =

[sqlalchemy] Re: can I set the really default value ?

2008-03-30 Thread Andreas Jung
--On 31. März 2008 01:25:48 +0800 张沈鹏(电子科大 毕/就业倒计时...) [EMAIL PROTECTED] wrote: I just mean default value in the create table's sql . such as CREATE TABLE xxx ( id INTEGER NOT NULL, value INTEGER default 0 ) Table(..., default=xxx) -aj pgpR3GBJhaQEH.pgp Description: PGP

[sqlalchemy] Re: Problems connecting to Postgresql using collective.lead

2008-01-19 Thread Andreas Jung
of the underlying Python driver for Postgres but it is not part of the DSN. Andreas pgpkKYBlPQyN5.pgp Description: PGP signature

[sqlalchemy] Re: Filter by year in datetime column

2008-01-18 Thread Andreas Jung
to the need of your query and/or think about functional indexes (in case your database provides this functionality). Andreas pgpQvohGvKt7k.pgp Description: PGP signature

[sqlalchemy] SA 0.3.11 producing wrong code for func.any()

2008-01-07 Thread Andreas Jung
. Postgres requires: ...where '1234' = any(node.tools). Is there a workaround to get the syntax right through configuration? Andreas pgp38fYgWnK0u.pgp Description: PGP signature

[sqlalchemy] Re: [Postgres/SA 0.3.X] Support for arrays?

2008-01-02 Thread Andreas Jung
--On 2. Januar 2008 11:11:20 -0500 Michael Bayer [EMAIL PROTECTED] wrote: On Jan 2, 2008, at 2:56 AM, Andreas Jung wrote: I have a PG table containing a row tools varchar(256)[][] that stores a list of tuples ('HI1234', 'somestring'). Setting the tools property on Python level leads

[sqlalchemy] Re: Modelling connected trees

2008-01-01 Thread Andreas Jung
itself happen outside (given by the nature of the whole application). Andreas pgplL769T8tEd.pgp Description: PGP signature

[sqlalchemy] [Postgres/SA 0.3.X] Support for arrays?

2008-01-01 Thread Andreas Jung
would resolve this issue..however the code base is too big right for doing the switch to SA 0.4 now. Andreas pgp0VUVvgWAuo.pgp Description: PGP signature

[sqlalchemy] Modelling connected trees

2007-12-30 Thread Andreas Jung
', not 'B' and 'C'. So the node 'C' should be replaced with the node 'N' and its subtree. Any idea how to model this in a sane way using SA? Tnx, Andreas pgp8wdoCUqrR1.pgp Description: PGP signature

[sqlalchemy] Readonly objects/protecting objects from modifications

2007-12-21 Thread Andreas Jung
than by using a dedicated read-only DB connection where the user has only select grants)? Andreas pgpyUaTts2Z4U.pgp Description: PGP signature

[sqlalchemy] Re: SQLAlchemy 0.4 beta5 (OperationalError) database table is locked '\nDROP TABLE os' () sqlite 3.4.2

2007-09-16 Thread Andreas Jung
--On 14. September 2007 10:07:27 -0700 jason kirtland [EMAIL PROTECTED] wrote: jean-marc pouchoulon wrote: helo, I don't understand why my sqlite database is locked on a drop ( the code is following) thanks for your explanation. [...snip...] ordinateurs =

[sqlalchemy] [SA 0.4] Getting a mapper class from a mapper class

2007-08-14 Thread Andreas Jung
I've been using the following code for obtaining a mapper class from some other mapper. class_mapper(self.__class__).props[name].mapper.class 'props' is no longer available however I found '_Mapper__props'. Is this the right replacement or is there a smarter way? Andreas pgpLkaS4WLfE3.pgp

[sqlalchemy] AW: [sqlalchemy] Insert through ORM performance (was: Performance question)

2007-07-19 Thread Andreas Kostyrka
can achieve a magnitude of speedup by using COPY FROM STDIN; But the kinds hacks are out of scope for sqlalchemy. Andreas -- Urspr�ngl. Mitteil. -- Betreff:[sqlalchemy] Insert through ORM performance (was: Performance question) Von:Gaetan de Menten [EMAIL PROTECTED] Datum

[sqlalchemy] Re: query date field

2007-07-07 Thread Andreas Jung
--On 6. Juli 2007 23:27:30 + jose [EMAIL PROTECTED] wrote: I've got a question that I can't find the answer to. I have a table called seminars with a date field in it to hold the seminar dates. I want to query the table to find all the dates for a specific year. I tried

[sqlalchemy] Re: SA trying to update read-only views in Postgres

2007-07-06 Thread Andreas Jung
Clear()ing the session before the mandatory commit resolved the issue (more a workaround than a solution :-). Andreas --On 6. Juli 2007 12:25:25 +0200 Andreas Jung [EMAIL PROTECTED] wrote: I have a self-referential mapper where a view is involved within a primaryjoin of a relation

[sqlalchemy] Re: SA trying to update read-only views in Postgres

2007-07-06 Thread Andreas Jung
--On 6. Juli 2007 11:15:38 -0400 Michael Bayer [EMAIL PROTECTED] wrote: On Jul 6, 2007, at 6:25 AM, Andreas Jung wrote: I have a self-referential mapper where a view is involved within a primaryjoin of a relation. Traversing a tree represented through the mapper generates a bunch

[sqlalchemy] Mapper based on a select generates wrong and unnecessary INSERTs

2007-07-02 Thread Andreas Jung
I have a case where SA 0.3.8 create wrong SQL code and an unneeded and unwanted INSERT statement. My code inserts a new Arbeitsmittel into the DB using: Arbeitsmittel = wrapper.getMapper('arbeitsmittel') d = {'hidx' : hidx, 'zodb_path' : zodb_path, 'versionsnr' : 0,

[sqlalchemy] Re: How to lock using sqlalchemy

2007-06-29 Thread Andreas Jung
At least the select() method has an optional parameter 'lockmode'. You might check the docs and the release notes. -aj --On 29. Juni 2007 08:23:16 + mc [EMAIL PROTECTED] wrote: Hi, I need to lock a table for WRITE. The scenario is that I have a SELECT followed by an INSERT, where the

[sqlalchemy] Re: Group by? Still a problem

2007-06-27 Thread Andreas Jung
--On 27. Juni 2007 12:00:13 -0700 voltron [EMAIL PROTECTED] wrote: I´m guessing a bit because I still could not find the group_by entry in the docs This works: user.select(links.c.id 3, order_by=[user.c.id]).execute() but this does not user.select(links.c.id

[sqlalchemy] Checking for number of related items

2007-06-19 Thread Andreas Jung
expensive for a has_tools property. It would be enough to check for only one tools (LIMIT 1) and return True/False. Is there any way to achieve that? Andreas pgp0EZ1gaasmp.pgp Description: PGP signature

[sqlalchemy] SA returning indentical instances for distinct rows.

2007-06-15 Thread Andreas Jung
a different ArbeitsmittelHierarchy instance when idhierarchy=10 but SA returns the instance from the previous query. Bug or feature? Andreas -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376

[sqlalchemy] Re: Sequences

2007-06-15 Thread Andreas Jung
--On 15. Juni 2007 12:55:43 + voltron [EMAIL PROTECTED] wrote: Could someone point me to the documentation about declaring and using Sequence fields in Sqlalchemy? Check yourself with the SA docs on sqlalchemy.org under defining sequences. -aj pgpWMRtJ1NwMS.pgp Description: PGP

[sqlalchemy] Re: SA returning indentical instances for distinct rows.

2007-06-15 Thread Andreas Jung
--On 15. Juni 2007 09:46:27 -0400 Michael Bayer [EMAIL PROTECTED] wrote: On Jun 15, 2007, at 3:19 AM, Andreas Jung wrote: Bug or feature? I cant speak authoritatively here at all since youve given me no information about your schema, ive no idea what AMH_View represents, but AFAICT

[sqlalchemy] Re: [RESOLVED]Re: SA returning indentical instances for distinct rows.

2007-06-15 Thread Andreas Jung
--On 15. Juni 2007 16:09:32 +0200 Andreas Jung [EMAIL PROTECTED] wrote: --On 15. Juni 2007 09:46:27 -0400 Michael Bayer [EMAIL PROTECTED] wrote: On Jun 15, 2007, at 3:19 AM, Andreas Jung wrote: Bug or feature? I cant speak authoritatively here at all since youve given me

[sqlalchemy] engine.base._convert_key() fails with long col names

2007-06-14 Thread Andreas Jung
From: Andreas Jung [EMAIL PROTECTED] To: sqlalchemy@googlegroups.com Subject: engine.base._convert_key() fails with long col names Date-Sent: 14. Juni 2007 15:14:37 Hi, I am getting the following traceback * Module toolbox.product.export_bauplan2, line 96, in export_bauplan * Module

[sqlalchemy] Re: engine.base._convert_key() fails with long col names

2007-06-14 Thread Andreas Jung
--On 14. Juni 2007 14:13:47 -0400 Michael Bayer [EMAIL PROTECTED] wrote: On Jun 14, 2007, at 9:16 AM, Andreas Jung wrote: This happens when _convert_key() is called with key='arbeitsmittelhierarchy_arbeitsmittel_view.stammdatenverwaltung_ta uglich' im confused. are you passing

[sqlalchemy] [MySQL] Checking if commit() is available

2007-06-08 Thread Andreas Jung
is there a way to determine if the underlying MySQL DB is able to perform a commit() operation? The following code fails (likely because the underlying MySQL db is pretty old, V3ish). Andreas -- dsn = 'mysql://' e = create_engine(dsn) c=e.connect() t = c.begin() t.commit

[sqlalchemy] Re: [MySQL] Checking if commit() is available

2007-06-08 Thread Andreas Jung
--On 8. Juni 2007 14:05:39 -0400 Rick Morrison [EMAIL PROTECTED] wrote: try: t.commit() except: print 'Holy cow, this database is lame' This code is also lame :-) The code should work for arbitrary DSNs and swallowing an exception while committing is evil, evil, evil. -aj

[sqlalchemy] Re: stress tests / multithreading on SQLAlchemy 0.3.6

2007-05-28 Thread Andreas Jung
--On 27. Mai 2007 23:27:30 -0700 Alchemist [EMAIL PROTECTED] wrote: I developed my web application in TurboGears 1.0.1 (Python 2.4, CherryPy 2.2.1 and SQLAlchemy 0.3.6) and used Postgresql 8.2 as my backend. Also, I am using psycopg2. I am running stress tests (using tools such as WAPT and

[sqlalchemy] Re: stress tests / multithreading on SQLAlchemy 0.3.6

2007-05-28 Thread Andreas Jung
--On 27. Mai 2007 23:45:43 -0700 Alchemist [EMAIL PROTECTED] wrote: @Andreas Jung What SA configurations did you set/unset for your Zope application? Nothing special. I am using my own z3c.sqlalchemy framework (Google, search on Cheeseshop). Which SA files should I modify in order

[sqlalchemy] Re: cascade='all, delete-orphan' causing error about unsaved, pending instances

2007-05-17 Thread Andreas Jung
--On 16. Mai 2007 13:45:21 -0400 Michael Bayer [EMAIL PROTECTED] wrote: new to the FAQ: http://www.sqlalchemy.org/trac/wiki/ FAQ#FlushError:instancesomeinstanceisanunsavedpendinginstanceandisanorph an The FAQ does not explain the problem. Look at the real code: def

[sqlalchemy] Re: Problem with using global metadata/connection in a threaded context

2007-05-17 Thread Andreas Jung
--On 17. Mai 2007 00:28:35 +0200 David Anderson [EMAIL PROTECTED] wrote: I am guessing that somewhere in the mix the engine information is severed from the metadata when jumping to the other thread, but I have no idea how to fix this problem. Can anyone give me pointers on how to get my

[sqlalchemy] Re: cascade='all, delete-orphan' causing error about unsaved, pending instances

2007-05-17 Thread Andreas Jung
--On 17. Mai 2007 10:16:17 +0200 Andreas Jung [EMAIL PROTECTED] wrote: --On 16. Mai 2007 13:45:21 -0400 Michael Bayer [EMAIL PROTECTED] wrote: This code causes the trouble. There is no save() operation involved - just a flush() operation driven by the Zope transaction integration of SA

[sqlalchemy] cascade='all, delete-orphan' causing error about unsaved, pending instances

2007-05-16 Thread Andreas Jung
? Andreas -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535 Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK

[sqlalchemy] Getting hold of a mapper class from within another mapper class?

2007-05-12 Thread Andreas Jung
itself. Is there a way to get hold of depending mapper classes - in this case the History mapper - directly from the Media mapper class (since it knows that it depends on the History mapper)? Andreas pgpXBK8hyHyTr.pgp Description: PGP signature

[sqlalchemy] Duplicating a row?

2007-05-09 Thread Andreas Jung
Hi, what is the common pattern to duplicate a row? I have several cases where I obtain a row and need to insert it with some slightly modifications back into the table. I've written a small copy method for that but it is ugly code. What's the common way to do that? Andreas pgpOYYmiHG4WV.pgp

[sqlalchemy] [ANN] z3c.sqlalchemy 1.0.0 released - Integration of SQLAlchemy with Zope 2/3

2007-05-06 Thread Andreas Jung
or higher Installation: = - either download z3c.sqlalchemy from Cheeseshop http://cheeseshop.python.org/pypi/z3c.sqlalchemy/ - or use easy_install: easy_install z3c.sqlalchemy Andreas Jung -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web

[sqlalchemy] Informations about the connection state

2007-04-30 Thread Andreas Jung
. sometimes necessary when you need to drop a database without closing down a Zope instances; keep in mind that Zope can be clustered and a Zope instance can have connections to multiple databases). Andreas pgptwtlq5634V.pgp Description: PGP signature

[sqlalchemy] Executing SQL directly inside a thread local transaction?

2007-04-30 Thread Andreas Jung
? Andreas pgpGrJOQyXlqy.pgp Description: PGP signature

[sqlalchemy] Re: Executing SQL directly inside a thread local transaction?

2007-04-30 Thread Andreas Jung
() [(1, 'ian', 'charnas')] note that metadata keeps track of tables, and session keeps track of instances of mapped classes, so to do this you don't need to use metadata or session whatsoever. Creating/re-using a connection on a pre-Zope-transaction basis resolved my problem. Andreas

[sqlalchemy] Re: sqlalchemy introspection How?

2007-04-28 Thread Andreas Jung
--On 27. April 2007 12:57:06 -0700 johnny [EMAIL PROTECTED] wrote: Does this create a Object Mappers for those tables, so I can do the following: Lets say I have a table called user with columns user_name and password. ed = User() ed.user_name = 'Ed' ed.password = 'edspassword' You might

[sqlalchemy] Re: sqlalchemy introspection How?

2007-04-28 Thread Andreas Jung
--On 28. April 2007 09:00:36 -0700 johnny [EMAIL PROTECTED] wrote: What I was trying to get was, there isn't a python command line option, that will create Object Mapper Classes for the tables, What should that be? so I can import them within my applications. I guess, I have to code

[sqlalchemy] Re: Generated slow JOIN sql statement/specifying a left JOIN

2007-04-26 Thread Andreas Jung
arbeitsmittelhierarchy_arbeitsmittel_view = some_id I would expect something like select ...from hierarchy H left join arbeitsmittelheirarchy_arbeitsmittel_view AMH on AMH.idhierarchy = H.id where H.id = current id Andreas pgpglXzX3XZZ4.pgp Description: PGP signature

[sqlalchemy] Re: RESOLVED Re: Generated slow JOIN sql statement/specifying a left JOIN

2007-04-26 Thread Andreas Jung
I resolved this issue. Choosing a different mapper class as first arg of the relation() call solved this issue and everything is working perfectly. -aj --On 26. April 2007 08:44:22 +0200 Andreas Jung [EMAIL PROTECTED] wrote: --On 25. April 2007 07:13:19 -0400 Michael Bayer [EMAIL PROTECTED

[sqlalchemy] Re: Generated slow JOIN sql statement/specifying a left JOIN

2007-04-24 Thread Andreas Jung
--On 24. April 2007 08:54:55 -0400 Michael Bayer [EMAIL PROTECTED] wrote: On Apr 24, 2007, at 4:27 AM, Andreas Jung wrote: Because both tables are big the query takes forever. Using a LEFT JOIN would definitely be faster. Is there a way to configure the 'tools' property in a smarter

[sqlalchemy] ValueError: second must be in 0..59 error?

2007-04-23 Thread Andreas Jung
/egg/sqlalchemy/engine/base.py, line 971, in fetchall ValueError: second must be in 0..59 Any idea where this is coming from? Andreas pgpUc8bkg6qON.pgp Description: PGP signature

[sqlalchemy] Re: ValueError: second must be in 0..59 error?

2007-04-23 Thread Andreas Jung
Additional info: using SA 0.3.6, Postgres 7.4.6, psycopg 2.0.4 Andreas --On 23. April 2007 08:09:30 +0200 Andreas Jung [EMAIL PROTECTED] wrote: During a select() I get the following error: 2007-04-23 08:02:24,447 INFO sqlalchemy.engine.base.Engine.0x..94 {'table': 24892275} class

[sqlalchemy] Re: ValueError: second must be in 0..59 error?

2007-04-23 Thread Andreas Jung
--On 23. April 2007 08:18:54 +0200 Andreas Jung [EMAIL PROTECTED] wrote: Additional info: using SA 0.3.6, Postgres 7.4.6, psycopg 2.0.4 Andreas File build/bdist.linux-i686/egg/sqlalchemy/engine/base.py, line 971, in fetchall ValueError: second must be in 0..59 Any idea where

[sqlalchemy] Re: ValueError: second must be in 0..59 error?

2007-04-23 Thread Andreas Kostyrka
* Andreas Jung [EMAIL PROTECTED] [070423 09:49]: --On 23. April 2007 08:18:54 +0200 Andreas Jung [EMAIL PROTECTED] wrote: Additional info: using SA 0.3.6, Postgres 7.4.6, psycopg 2.0.4 Andreas File build/bdist.linux-i686/egg/sqlalchemy/engine/base.py, line 971, in fetchall

[sqlalchemy] Re: Is ILIKE supported?

2007-04-04 Thread Andreas Kostyrka
Normally, like is case sensitive. if you want to query something case insensitive, one can use all kinds of expressions, one that comes to mind would be lower(col) like 'lowercase%' creating indexes on lower(col) would speed that up. Andreas * Paul Kippes [EMAIL PROTECTED] [070404 20:07

[sqlalchemy] Re: Is ILIKE supported?

2007-04-04 Thread Andreas Kostyrka
/current/static/functions-matching.html#FUNCTIONS-LIKE Andreas --~--~-~--~~~---~--~~ 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 unsubscribe from

[sqlalchemy] Calling SQL directly through a Session instance?

2007-03-25 Thread Andreas Jung
I know that it is possible to pass a SQL statement directly to engine.execute(). Is there a similar API for executing q SQL statement through a Session instance? Andreas pgpYtd9cx8rNT.pgp Description: PGP signature

[sqlalchemy] Re: Eager loading self referential mapper

2007-03-23 Thread Andreas Jung
--On 23. März 2007 16:14:26 + Koen Bok [EMAIL PROTECTED] wrote: Could anyone please explain me a little why self referantial mappers cannot be eager-loading. Is this not yet integrated in SQLAlchemy or theoratically impossible or impractical? Do you really want to load a possibly

[sqlalchemy] Dealing with uncommited data

2007-03-20 Thread Andreas Jung
Zope commits the transaction. A solution might be to flush the session explicitly in such a case however I don't think that this is a smart idea. Any better idea? Andreas pgp3WFPsVJhgb.pgp Description: PGP signature

[sqlalchemy] [Postgres] BIT support?

2007-03-09 Thread Andreas Jung
Hi, are there any plans to support the BIT type of Postgres? Andreas pgp5Z1roj65VK.pgp Description: PGP signature

[sqlalchemy] table.tometadata() not working with UNIQUE constraints

2007-02-17 Thread Andreas Jung
I have a Table instance with a UniqueConstraint. SA fails while creating a copy of the table using table.tometadata(). Is there a workaround? Andreas - Traceback (most recent call last): File schema.py, line 77, in ? M.createTables() File schema.py, line 35, in createTables

[sqlalchemy] Probleming specifying a schema for Table() and using relations

2007-02-04 Thread Andreas Jung
MapperFactory is called with schema='public'. As soon as you define a table with schema != None I am running into this error. Is there any way out (especially when you have to deal with different schemas)? Andreas - python2.4 07_shop2.py Traceback (most recent call last): File