Hi,

web2py's Boolean implementation (as CHAR(1) with 'T' and 'F' values)
periodically leads to some confusion [1][2].

Further it leads to problems when trying to connect to an existing
schema created by some other ORM.  Both SQLObject and SQLAlchemy use
BOOLEAN as the SQL data type with values 0 and 1 (I have only checked
the SQLite and MySQL backends).  Such existing data can only be used
with the Integer datatype workaround which does not make me totally
happy.

It's even worse the other way around when web2py created the schema.
I really do not like to use 'T' and 'F' for boolean columns in
SQLObject queries.

I cannot understand the recent 'portability reasons' argumentation in
[2].  If a backend does not support BOOLEAN, the DAL may use the CHAR
(1) workaround.  But on backends like SQLite and MySQL which do have a
BOOLEAN data type it should be used, IMO.

I know, for backwards compatibility reasons web2py cannot change its
behavior.  However, the current behavior is bad for interoperability
with other widely used ORMs.

[1] http://groups.google.com/group/web2py/browse_thread/thread/c3b5e32c7a5824c0
[2] http://groups.google.com/group/web2py/browse_thread/thread/5a0039a8fba97e39

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" 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/web2py?hl=en.


Reply via email to