2009/10/15 Jeroen Vermeulen <[email protected]>:
> Jaroslaw S wrote:
>
>> QString::replace() works in test cases but in pessimistic case it's
>> O(n^2).
>> I do recommend using const QChar * QString::constData () const-
>> iterating over the \0-terminated list.
>
> That reminds me that there's another way, actually!  Depends on your design
> whether it's feasible, but you could use a prepared statement (unnamed if
> you want) for whatever you do with the string.  That way you don't need to
> escape it at all.
>
> (I also just implemented parameterized statements today, but that's not in a
> release yet).

Prepared statements are present in kexidb API already as you know. I
think you mean about using them (directly using libpq/libpqxx API, not
kexidb API) for internal purposes of the driver. I'd say go for it,
just consider keeping the given statement structure after the first
use internally. This will add speed and simplify things.
I planned to do the same for other drivers, including sqlite, long ago.

-- 
regards / pozdrawiam, Jaroslaw Staniek
 Kexi & KOffice (http://www.kexi-project.org, http://www.koffice.org)
 KDE Libraries for MS Windows (http://windows.kde.org)
 http://www.linkedin.com/in/jstaniek
_______________________________________________
Kexi mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kexi

Reply via email to