Re: [tryton-dev] python-sql: make an update with from clause instead of with select into the set clause

2015-12-09 Thread Jesús Martín Jiménez
2015-12-09 16:58 GMT+01:00 Cédric Krier : > On 2015-12-09 07:47, Jesús Martín Jiménez wrote: > > And my question is, is it possible to build the first query with > python-sql? > > Yes you can set a from clause on update with the from_ keyword I see. Thank you very much. > but I > don't think i

Re: [tryton-dev] python-sql: make an update with from clause instead of with select into the set clause

2015-12-09 Thread Cédric Krier
On 2015-12-09 07:47, Jesús Martín Jiménez wrote: > And my question is, is it possible to build the first query with python-sql? Yes you can set a from clause on update with the from_ keyword but I don't think it is supported by SQLite. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.

[tryton-dev] python-sql: make an update with from clause instead of with select into the set clause

2015-12-09 Thread Jesús Martín Jiménez
Hi, I've looked for a thread related with this topic but I've not found anything, so if there is any, I would like to apologize. I've added a constraint in a customized module in order to make stock_lot number unique for each product. Now, I want to add a query in this module in order to updat

Re: [tryton-dev] python-sql issue: Update query with subquery as value using implicit join

2013-09-10 Thread Cédric Krier
On 10/09/13 14:22 +0200, Nicolas Évrard wrote: > * Cédric Krier [2013-09-10 13:59 +0200]: > > >I would like to bring some light on this issue: > >https://code.google.com/p/python-sql/issues/detail?id=10 > > > >So I made a patch to use the table name as alias name for such queries > >but I would l

Re: [tryton-dev] python-sql issue: Update query with subquery as value using implicit join

2013-09-10 Thread Nicolas Évrard
* Cédric Krier [2013-09-10 13:59 +0200]: I would like to bring some light on this issue: https://code.google.com/p/python-sql/issues/detail?id=10 So I made a patch to use the table name as alias name for such queries but I would like to know if anybody has a better idea. I guess it was impos

[tryton-dev] python-sql issue: Update query with subquery as value using implicit join

2013-09-10 Thread Cédric Krier
Hi, I would like to bring some light on this issue: https://code.google.com/p/python-sql/issues/detail?id=10 The main problem is that sqlite doesn't support alias for the updated table. So I made a patch to use the table name as alias name for such queries but I would like to know if anybody has

[tryton-dev] python-sql performance

2013-09-09 Thread Cédric Krier
Hi, With the usage of python-sql, I measure an increase for the execution of the unittest by about 37%. It was expected to have such increase because python-sql adds a new layer which of course have a cost for the benefit it provides such: - more optimized queries - more database independ

Re: [tryton-dev] python-sql

2013-08-29 Thread Mathias Behrle
* Nicolas Évrard: " Re: [tryton-dev] python-sql" (Thu, 29 Aug 2013 07:32:03 +0200): > * Mathias Behrle [2013-08-28 23:41 +0200]: >>* Cédric Krier: Re: [tryton-dev] python-sql (Wed, 28 Aug 2013 22:20:40 > >>>> It is different from sqlalchemy in that >

Re: [tryton-dev] python-sql

2013-08-28 Thread Nicolas Évrard
* Mathias Behrle [2013-08-28 23:41 +0200]: * Cédric Krier: " Re: [tryton-dev] python-sql" (Wed, 28 Aug 2013 22:20:40 It is different from sqlalchemy in that - it is not based on declared tables - it is not database dependent - it allows to manipulate the queries I d

Re: [tryton-dev] python-sql

2013-08-28 Thread Mathias Behrle
* Cédric Krier: " Re: [tryton-dev] python-sql" (Wed, 28 Aug 2013 22:20:40 +0200): > On 28/08/13 20:55 +0200, Mathias Behrle wrote: >> * Cédric Krier: Re: [tryton-dev] python-sql (Wed, 28 Aug 2013 18:56:56 >> +0200): >> >> > On 04/08/13 21:00 +0200,

Re: [tryton-dev] python-sql

2013-08-28 Thread Cédric Krier
On 28/08/13 20:55 +0200, Mathias Behrle wrote: > * Cédric Krier: " Re: [tryton-dev] python-sql" (Wed, 28 Aug 2013 18:56:56 > +0200): > > > On 04/08/13 21:00 +0200, Cédric Krier wrote: > >> On 04/08/13 14:26 +0200, Mathias Behrle wrote: > >> >

Re: [tryton-dev] python-sql

2013-08-28 Thread Mathias Behrle
* Cédric Krier: " Re: [tryton-dev] python-sql" (Wed, 28 Aug 2013 18:56:56 +0200): > On 04/08/13 21:00 +0200, Cédric Krier wrote: >> On 04/08/13 14:26 +0200, Mathias Behrle wrote: >> >> I reserved python-sql >> >> >> >> http://pypi.python.o

Re: [tryton-dev] python-sql

2013-08-28 Thread Cédric Krier
On 04/08/13 21:00 +0200, Cédric Krier wrote: > On 04/08/13 14:26 +0200, Mathias Behrle wrote: > > > I reserved python-sql > > > > > > http://pypi.python.org/pypi/python-sql/ > > > > Is it really reserved? I just get Not Found () with this URL. > > Are there any plans for the upload to pypi? > >

Re: [tryton-dev] python-sql (was: Sorting by rec_name with product name)

2013-08-04 Thread Cédric Krier
On 04/08/13 14:26 +0200, Mathias Behrle wrote: > > I reserved python-sql > > > > http://pypi.python.org/pypi/python-sql/ > > Is it really reserved? I just get Not Found () with this URL. > Are there any plans for the upload to pypi? On the first release. -- Cédric Krier B2CK SPRL Rue de Rotte

[tryton-dev] python-sql (was: Sorting by rec_name with product name)

2013-08-04 Thread Mathias Behrle
* Cédric Krier: " Re: [tryton-dev] Sorting by rec_name with product name." (Fri, 19 Jul 2013 08:59:32 +0200): >> Is there any target trytond version planned for python-sql integration? > > I would like to have it for the next version. > >> Also why not use the sqlalchemy's sql expression lan

[tryton-dev] python-sql: Add CASE, allow subquery in from and fix nested alias manager (issue307005)

2012-03-28 Thread cedric . krier
Reviewers: , Please review this at http://codereview.tryton.org/307005/ Affected files: M README M sql/__init__.py M sql/conditionals.py -- tryton-dev@googlegroups.com mailing list