le 18.07.2007 00:40 pianoman a écrit:
> I'm really battling tying together the Elixir/SQLAlchemy "bonding
> point". When should one drop down to SQLAlchemy, and follow its
> documentation? For example, I cannot seem to get a handle on creating
> something equivalent to the likes of
>
> select max(ref_num) from document where ref_num < '9000
max_rn = Document.query().filter(Document.c.ref_num < 
9000).max(Document.c.ref_num)
You can even do it in 2 phases :
q = Document.query().filter(Document.c.ref_num < 9000)

and then
max_rn = q.max(Document.c.ref_num)
min_rn = q.min(Document.c.ref_num)
etc...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to