Re: [SQLObject] EnumCol is not honoring notNone

2007-05-14 Thread Oleg Broytmann
On Mon, May 14, 2007 at 03:46:06PM +0400, Oleg Broytmann wrote: > On Sun, May 13, 2007 at 07:53:47PM -0300, Claudio Martinez wrote: > > On 5/13/07, Claudio Martinez <[EMAIL PROTECTED]> wrote: > > >Given this scenario: > > > > > >class A(SQLObject): > > >n = EnumCol(enumValues=['x', 'y'], notNon

Re: [SQLObject] EnumCol is not honoring notNone

2007-05-14 Thread Oleg Broytmann
On Sun, May 13, 2007 at 07:53:47PM -0300, Claudio Martinez wrote: > On 5/13/07, Claudio Martinez <[EMAIL PROTECTED]> wrote: > >Given this scenario: > > > >class A(SQLObject): > >n = EnumCol(enumValues=['x', 'y'], notNone=False) > > > >class B(SQLObject): > >n = EnumCol(enumValues=['x', 'y']

Re: [SQLObject] EnumCol is not honoring notNone

2007-05-13 Thread Claudio Martinez
On 5/13/07, Claudio Martinez <[EMAIL PROTECTED]> wrote: Given this scenario: class A(SQLObject): n = EnumCol(enumValues=['x', 'y'], notNone=False) class B(SQLObject): n = EnumCol(enumValues=['x', 'y'], notNone=True) A(n=None) and B(n=None) both give this error: Invalid: expected a memb

[SQLObject] EnumCol is not honoring notNone

2007-05-13 Thread Claudio Martinez
Given this scenario: class A(SQLObject): n = EnumCol(enumValues=['x', 'y'], notNone=False) class B(SQLObject): n = EnumCol(enumValues=['x', 'y'], notNone=True) A(n=None) and B(n=None) both give this error: Invalid: expected a member of ['x', 'y'] in the EnumCol 'n', got None instead Atta

Re: [SQLObject] EnumCol

2007-04-25 Thread Oleg Broytmann
On Wed, Apr 25, 2007 at 04:29:11PM +0200, Lutz Steinborn wrote: > I've checked col.py to learn how its done and I'm a little bit > confused how complicated its realized. This is the price for simplicity and elegance of the API of SQLObject. > Is where a special reason why database driven const

Re: [SQLObject] EnumCol

2007-04-25 Thread Lutz Steinborn
On Wed, 25 Apr 2007 17:29:39 +0400 Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Wed, Apr 25, 2007 at 03:15:08PM +0200, Lutz Steinborn wrote: > > I like to use EnumCol but first I have a question: > > who did the check if the given value is in the list of possible > > strings, SQLObject or the da

Re: [SQLObject] EnumCol

2007-04-25 Thread Oleg Broytmann
On Wed, Apr 25, 2007 at 03:15:08PM +0200, Lutz Steinborn wrote: > I like to use EnumCol but first I have a question: > who did the check if the given value is in the list of possible > strings, SQLObject or the database (driver) ? Both. > btw, is this the correct syntax: > myCol = EnumCol(enum

[SQLObject] EnumCol

2007-04-25 Thread Lutz Steinborn
Hi, I like to use EnumCol but first I have a question: who did the check if the given value is in the list of possible strings, SQLObject or the database (driver) ? Database independence is a major goal for us. btw, is this the correct syntax: myCol = EnumCol(enumValues('yes','no','maybe')) Th