[OGo-Developer] sope-gdl1: escaping and datatypes
Wolfgang Sourdeau
developer@opengroupware.org
Thu, 06 Sep 2007 16:44:32 -0400
On 2007-09-06 15:34:03 -0500 Helge Hess <helge.hess@opengroupware.org>
wrote:
> On 06.09.2007, at 19:20, Wolfgang Sourdeau wrote:
>> There seems to be some confusion in the way GCS escape sequences such
>> as "\" and "'". In -[GCSFolder _formatRowValue:], a
>> GCSStringFormatter
>> instance is invoked with the "stringByFormattingString:" method. But
>> instead, wouldn't it be better if the escaping occured at the
>> channel-level?
>
> I didn't look at the GCS code in detail, but the SQL escaping
> "should" be
> done in the appropriate EOAdaptor subclass. The relevant methods are
> -formatAttribute:
> -formatValue:forAttribute:
Any chance you can apply my most recent patches soon? This would make
things easier...
This, even if we have to rewrite things later...
>> For example, using postgres causes the string to be escaped and to be
>> unescaped afterwards, which seems a bit unclean...
>
> Not sure what you mean by that. GCSFolder generates raw SQL, this
> isn't
> unescaped afterwards?
GCSFolder escapes them and then the pg adaptor channel unescapes the
escaped string just before the evaluation.
W.