[sqlalchemy] SQLAlchemy redis mysql, max_user_connection

2014-11-07 Thread Enrico Bottani
to deal with this problem? My thought is to finally move out from sqlalchemy, or at least using just the CORE, but I was willing to try to use sqlalchemy till I really have no other choice. Thanks for your support, Enrico -- You received this message because you are subscribed to the Google

[sqlalchemy] BaseClass.query.filter only base class

2014-01-21 Thread Enrico Bottani
to put a condition in this method: questionUnits = [i.serialize for i in QuestionUnit.query.filter(QuestionUnit.brand_id == brandID).all()] I have tried a lot of different things but never succeed,can someone please point me in the right direction? Best, Enrico -- You received

Re: [sqlalchemy] Multiple inheritance issue

2014-01-10 Thread Enrico Bottani
Thank you very much MichaeI was in fact thinking that it was possible to not found support for that feature. But as you said, the compiler didn't shout at me and the application was running fine so I was thinking that I was doing things right. I'll go for the JOIN. Best, Enrico On Thursday

[sqlalchemy] Multiple inheritance issue

2014-01-09 Thread Enrico Bottani
} @property def serialize_questions(self): return [item.serialize for item in self.questions] Thanks in advance, Enrico -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from

Re: [sqlalchemy] Query for date between a range

2013-10-09 Thread Enrico Morelli
On Fri, 4 Oct 2013 23:58:38 +0300 Ofir Herzas herz...@gmail.com wrote: Enrico, It should be available on 0.7.10 Simon, you are right. The expression is indeed a must. class Plan(Base): @hybrid_property def calculated_date(self): return date(self.year, self.month

[sqlalchemy] Query for date between a range

2013-10-04 Thread Enrico Morelli
( Plan.data, Plan.month, Plan.instrument_id ).order_by('month', 'instrument_id').all() Where I'm wrong? Thanks to all -- - Enrico Morelli System Administrator | Programmer | Web Developer CERM - Polo Scientifico

Re: [sqlalchemy] Query for date between a range

2013-10-04 Thread Enrico Morelli
tail. -Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Enrico Morelli Sent: Friday, October 04, 2013 4:05 PM To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Query for date between a range On Fri, 4 Oct 2013 15:55:07

Re: [sqlalchemy] Query for date between a range

2013-10-04 Thread Enrico Morelli
On Fri, 4 Oct 2013 16:03:18 +0200 Enrico Morelli more...@cerm.unifi.it wrote: On Fri, 4 Oct 2013 16:25:00 +0300 Ofir Herzas herz...@gmail.com wrote: I'm sorry, you should use hybrid_property: from sqlalchemy.ext.hybrid import hybrid_property class Plan(Base

[sqlalchemy] ManyToMany query

2012-07-24 Thread Enrico Morelli
Windows si pianta da solo. (/)_ V_/_ +--+ | ENRICO MORELLI | email: more...@cerm.unifi.it | | * * * *| phone: +39 055 4574269 | | University of Florence| fax : +39 055 4574253

[sqlalchemy] Association Object creation

2011-11-23 Thread Enrico Morelli
is the problem? Thanks -- --- (o_ (o_//\ Coltivate Linux che tanto Windows si pianta da solo. (/)_ V_/_ +--+ | ENRICO MORELLI | email: more

Re: [sqlalchemy] Association Object creation

2011-11-23 Thread Enrico Morelli
On Wed, 23 Nov 2011 10:59:03 +0100 Enrico Morelli more...@cerm.unifi.it wrote: These are the mappers: mapper(Ligand, ligand_table, properties={ 'ligand':relationship(LigandLigand, primaryjoin=and_(ligand_table.c.id==ligand_ligand_table.c.ligand_id1

[sqlalchemy] SA remove related fields

2011-09-20 Thread Enrico Morelli
-- --- (o_ (o_//\ Coltivate Linux che tanto Windows si pianta da solo. (/)_ V_/_ +--+ | ENRICO MORELLI | email: more...@cerm.unifi.it | | * * * *| phone: +39 055

Re: [sqlalchemy] SA remove related fields

2011-09-20 Thread Enrico Morelli
On Tue, 20 Sep 2011 09:14:20 -0400 Michael Bayer mike...@zzzcomputing.com wrote: On Sep 20, 2011, at 3:24 AM, Enrico Morelli wrote: Dear all, I'm using SA 0.6.7 on a RHEL 6 with Python 2.6 and PostgreSQL 8.4.7. These are some table of my DB: pdb_table = Table('pdb', metadata

Re: [sqlalchemy] SA remove related fields

2011-09-20 Thread Enrico Morelli
On Tue, 20 Sep 2011 09:32:09 -0400 Michael Bayer mike...@zzzcomputing.com wrote: On Sep 20, 2011, at 9:28 AM, Enrico Morelli wrote: Thanks, I tried to put passive_deletes='all' in the relationships: sorry, 'pdb':relationship(Pdb, backref=backref('metal', passive_deletes='all

Re: [sqlalchemy] Dynamic query

2011-05-09 Thread Enrico Morelli
On Fri, 6 May 2011 17:11:39 +0100 King Simon-NFHD78 simon.k...@motorolasolutions.com wrote: -Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Enrico Morelli Sent: 06 May 2011 16:20 To: sqlalchemy Subject: [sqlalchemy

[sqlalchemy] Dynamic query

2011-05-06 Thread Enrico Morelli
che tanto Windows si pianta da solo. (/)_ V_/_ +--+ | ENRICO MORELLI | email: more...@cerm.unifi.it | | * * * *| phone: +39 055 4574269 | | University of Florence| fax : +39 055

[sqlalchemy] Association object

2011-02-09 Thread Enrico Morelli
/_ +--+ | ENRICO MORELLI | email: more...@cerm.unifi.it | | * * * *| phone: +39 055 4574269 | | University of Florence| fax : +39 055 4574253 | | CERM - via Sacconi, 6 - 50019 Sesto

Re: [sqlalchemy] Association object

2011-02-09 Thread Enrico Morelli
On Wed, 9 Feb 2011 10:34:22 +0100 Enrico Morelli more...@cerm.unifi.it wrote: mapper(AtomInfo, atominfo_table, properties={ 'residue': relationship(ResidueInfo, backref='atominfo'), 'periodic': relationship(Periodic, backref='atominfo'), 'atom1

[sqlalchemy] Re: UserDefinedType for tuples

2011-02-04 Thread Enrico
The most similar example to what I want to do, I think is here: http://groups.google.com/group/sqlalchemy/browse_thread/thread/81cc56d5ed693a48/58a3caa40a7daa39?lnk=gstq=TypeDecorator#58a3caa40a7daa39 where Frank is storing nutrient weights in a new type. After (re)reading the doco about custom

[sqlalchemy] Re: UserDefinedType for tuples

2011-01-27 Thread Enrico
Hi Folks, I was hoping to still be able to get guidance on creating my UserDefinedType. If I just knew exactly what the purpose of the bind and result processes were supposed to be, I'm sure I could look it up from there. -- You received this message because you are subscribed to the Google

[sqlalchemy] Complex query (for me)

2011-01-26 Thread Enrico Morelli
. (/)_ V_/_ +--+ | ENRICO MORELLI | email: more...@cerm.unifi.it | | * * * *| phone: +39 055 4574269 | | University of Florence| fax : +39 055 4574253 | | CERM - via

Re: [sqlalchemy] Complex query (for me)

2011-01-26 Thread Enrico Morelli
. (/)_ V_/_ +--+ | ENRICO MORELLI | email: more...@cerm.unifi.it | | * * * *| phone: +39 055 4574269 | | University of Florence| fax : +39 055 4574253 | | CERM

[sqlalchemy] UserDefinedType for tuples

2010-12-13 Thread Enrico
I want to make a custom type and I'm not sure whether to use UserDefinedType or TypeDecorator. for a UserDefinedType it seems I must write bind_processor and result_processor or for TypeDecorator it seems I must write process_bind_param and process_result_value I think I need a UserDefinedType

Re: [sqlalchemy] order_by: ArgumentError

2010-11-17 Thread Enrico Morelli
On Tue, 16 Nov 2010 11:37:12 -0500 Michael Bayer mike...@zzzcomputing.com wrote: On Nov 16, 2010, at 6:16 AM, Enrico Morelli wrote: On Mon, 15 Nov 2010 15:56:06 -0500 Michael Bayer mike...@zzzcomputing.com wrote: its looking for a Column object.menus_table.c.weight instead

Re: [sqlalchemy] order_by: ArgumentError

2010-11-16 Thread Enrico Morelli
(menus_table.c.weight.asc()).all() but the error is the same: ArgumentError: Column-based expression object expected for argument 'order_by'; got: 'weight', type type 'str' On Nov 15, 2010, at 10:03 AM, Enrico Morelli wrote: Dear all, I've a lot of applications using SA 0.5.6. Now I

[sqlalchemy] order_by: ArgumentError

2010-11-15 Thread Enrico Morelli
'])).order_by(Menu.weight.asc()).all() -- --- (o_ (o_//\ Coltivate Linux che tanto Windows si pianta da solo. (/)_ V_/_ +--+ | ENRICO MORELLI | email

[sqlalchemy] bidirectional self-referential many-to-many

2010-08-03 Thread Enrico
I'm trying to use the object association pattern from the doco. Is it the case that this requires departure from Declarative mode and is it wrong to mix with non-declarative? I looked at the example code optimized_al.py but it didn't seem to be exactly what I want. I want a symmetric relation for

[sqlalchemy] Confusion about using Session() globally

2007-11-07 Thread Enrico Morelli
/_ +--+ | ENRICO MORELLI | email: [EMAIL PROTECTED] | | * * * *| phone: +39 055 4574269 | | University of Florence| fax : +39 055 4574253 | | CERM - via Sacconi, 6 - 50019 Sesto Fiorentino (FI) - ITALY

[sqlalchemy] Postgresql arrays

2007-01-04 Thread Enrico Morelli
[]' -- --- (o_ (o_//\ Coltivate Linux che tanto Windows si pianta da solo. (/)_ V_/_ +--+ | ENRICO MORELLI | email: [EMAIL PROTECTED] | | * * * *| phone: +39 055