Since Python 3.4 is adding support for enums to the standard library,
I wrote a TypeDecorator for it:
import sqlalchemy.types as types
class PythonEnum(types.TypeDecorator):
impl = types.Enum
def __init__(self, enum_class, **kw):
super().__init__(*(m.name for m in enum_class),
On Thu, Jan 12, 2012 at 3:14 PM, Calum MacLeod pan...@sky.com wrote:
if date not in duties:
duty = Duty(date=date)
duties[date] = duty
if name not in volunteers:
volunteer = Volunteer(fore=fore, surn=surn, name=name)
volunteers[name] = volunteer
On Thu, Jul 14, 2011 at 12:53 PM, Burhan burhan.kha...@gmail.com wrote:
I am not sure what version of cx_Oracle it is - it was downloaded as a
Windows binary - the latest version is 5.1 on the cx_Oracle download page.
import cx_Oracle
print cx_Oracle.version
--
You received this message
On Fri, Dec 3, 2010 at 4:08 AM, jo jose.soa...@sferacarta.com wrote:
Hi all,
I'm trying to write a GROUP BY query grouped by a function (to_char) using a
variable format, which could be 'yy' or ''
as in:
sql=session.query(
func.to_char(Prestazione.c.data,format),
On Wed, Jun 23, 2010 at 1:50 AM, Ralph Heinkel ralph.hein...@web.de wrote:
Hi,
we are about upgrading our sqlalchemy library from 0.4.8 to something newer
and during this process we have detected that the LIMIT/OFFSET support for
oracle has been changed, from using “ROW NUMBER OVER...” to a
On Fri, Apr 2, 2010 at 3:41 PM, Michael Bayer mike...@zzzcomputing.comwrote:
Kent wrote:
Along the same lines, is there something we can do about nvl()
(oracle) versus coalesce() (ansi)?
They aren't exactly the same, unfortunately (nvl takes exactly 2
arguments, no more), so maybe
On Wed, Dec 2, 2009 at 3:25 PM, Michael Bayer mike...@zzzcomputing.com wrote:
from the article:
Beware while the TO_CHAR function works with both datatypes, the TRUNC
function will not work with a datatype of TIMESTAMP. This is a clear
indication that the use of TIMESTAMP datatype should
Finally, note that I'm _not_ asking for sqlalchemy to maintain the
collections for me. All I'm asking is for the cascade code not to
attempt to delete objects that have already been deleted and flushed,
or at least to safely handle the exception it raises when it does.
OK, what