[web2py] Re: To DAL or not to DAL, that is the question!

2011-10-10 Thread Massimo Di Pierro
Open a ticket. It is not going to happen today but we are committed to make DAL more and more powerful. On Oct 10, 1:17 pm, Phyo Arkar wrote: > Is it possible to support with? > > On Mon, Oct 10, 2011 at 8:21 PM, Massimo Di Pierro < > > > > > > > > massimo.dipie...@gmail.com> wrote: > > You canno

Re: [web2py] Re: To DAL or not to DAL, that is the question!

2011-10-10 Thread Phyo Arkar
Is it possible to support with? On Mon, Oct 10, 2011 at 8:21 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > You cannot. The DAL does not support the WITH statement. You have to > use db.executesql > > On Oct 10, 1:55 am, Johann Spies wrote: > > On 8 October 2011 17:19, Massimo Di P

Re: [web2py] Re: To DAL or not to DAL, that is the question!

2011-10-10 Thread Phyo Arkar
Web2py DAL is Freaking Best Piece of Software Ever come into existance :) ! " Use it , You Must! " On Sat, Oct 8, 2011 at 9:54 PM, Chris Rowson wrote: > Thanks Massimo, > > I'm very new at this and found the DAL a bit intimidating. I'm > beginning to get the hang of it now though so I'm sticking

[web2py] Re: To DAL or not to DAL, that is the question!

2011-10-10 Thread Massimo Di Pierro
You cannot. The DAL does not support the WITH statement. You have to use db.executesql On Oct 10, 1:55 am, Johann Spies wrote: > On 8 October 2011 17:19, Massimo Di Pierro wrote: > > > Almost any query an be build using the dal. > > How would this type of postgresql-query be translated into DAL?

Re: [web2py] Re: To DAL or not to DAL, that is the question!

2011-10-09 Thread Johann Spies
On 8 October 2011 17:19, Massimo Di Pierro wrote: > Almost any query an be build using the dal. > > How would this type of postgresql-query be translated into DAL? WITH regional_sales AS ( SELECT region, SUM(amount) AS total_sales FROM orders GROUP BY region ), top_re

Re: [web2py] Re: To DAL or not to DAL, that is the question!

2011-10-08 Thread pbreit
It's pretty much db([where clauses]).select() Add .first() or last() when you want one record. select * from item where id=1 rows = db(db.item.id==1).select().first() & for compound queries: rows = db((db.item.id>5)&(db.item.id<10)).select()

Re: [web2py] Re: To DAL or not to DAL, that is the question!

2011-10-08 Thread Chris Rowson
Thanks Massimo, I'm very new at this and found the DAL a bit intimidating. I'm beginning to get the hang of it now though so I'm sticking with it. I think I was trying to overthink it before when in actual fact, the more I try and get my head around it, the more sense it makes. Chris On Sat, Oct

[web2py] Re: To DAL or not to DAL, that is the question!

2011-10-08 Thread Massimo Di Pierro
You don't mind to write engine specific queries but who is going to use your app will mind because the app is not going to be portable. Almost any query an be build using the dal. Massimo On Oct 8, 6:20 am, Chris Rowson wrote: > Call me wierd, but I'm finding it a little hard to get my head arou

[web2py] Re: To DAL or not to DAL, that is the question!

2011-10-08 Thread Anthony
As noted here (http://web2py.com/book/default/chapter/06#executesql), selects executed via executesql are not parsed or transformed by the DAL, so instead of getting a DAL Rows object, you get whatever is returned by the DB driver (i.e., list of tuples, though there's an option to convert to a l