On Fri, Feb 23, 2007 at 02:03:44PM +0100, [EMAIL PROTECTED] wrote:
> On the other hand, I would be quite happy to go with StringCols instead of
> UnicodeCols. Strings are easier to handle with our c++ python extensions
> and then there are some restrictions to the UnicodeCols in sqlobject, too.
>
> Looking at the UnicodeStringValidator, I guess that the validators' task is
> not only to validate the incoming/outgoing values, but also to do the
> needed conversions, right? In that case, my code in StringValidator
> wouldn't be completely off place, would it?
It would be. StringValidator is intended to pass strings back and forth
as is. But you are not obliged to be restricted by the set of columns
provided by SQLObject. You can write your own column type and your own
validator/converter. To simplify things you can use StringCol and
SOStringCol as base classes. After writing such things you can publish them
here so people can decide if it's worth to be included into SQLObject.
There is one limitation though - "fromDatabase" machinery wouldn't know
about your column.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss