[REBOL] Re: [books] Pre-release of Chapter 5 of Rebol - A programmer's guide
From: petr::krenzelok::seznam::cz at: 3-Jul-2008 8:41
Tim Johnson napsal(a):
> On Tuesday 01 July 2008, Peter W A Wood wrote:
>
>> Tim
>>
> Thanks.
>
>> I'd say about 30% of the chapter relates to /Command, another 40% to
>> IOS and the remainder to /Core and /View.
>>
> Understood.
> FYI: I only use /core because of my company's GPL/Open Source
> mission. Have said that .....
>
>> The main topics relevant to the free versions are using MySQL from CGi
>> with Doc Kimbel's excellent MySQL scheme and
>>
> I've been using mysql-protocol (Mysql Scheme) and cgi for many years now. I
> really like it, but I think that /command would bring some advantages, if
> it can directly access the "C" API for MySQL.
>
> Example: Using the mysql scheme on a tcp/ip connection, I have to code
> the escaping of special characters for insert and updates and code the
> unescaping of special characters for retrieval.
>
> Using the C API from other scripting languages, the mysql_real_escape_string()
> function handles the escaping _appropriate_ to the version, and
> queries are similarly unescaped.
>
I doubt that you would gain any speed linking to C. C is a trade-off.
Doc's scheme was proven to be even faster, than native one of Command.
As for Escaping chars, you could create either REBOL funcs, C func and
wrap it to REBOL, or wrap you mysql_real_escape_string() yourself, as
/library component is now being free. However - sending the query to DB
is hardly the main botleneck, isn't it?
-pekr-