Login | Register
My pages Projects Community openCollabNet

propel
Reply to message

* = Required fields
* Subject
* Body
Attachments
Send reply to
Topic
Author (directly in email)
Please type the letters in the image above.

Original message

Author Ron Rademaker <r.rademaker@virtualbuilding.nl>
Full name Ron Rademaker <r.rademaker@virtualbuilding.nl>
Date 2006-11-17 08:52:07 PST
Message I don't know how much driver-specific things are required, but as long
as it's just attributes I think creating a config file with default
values for each driver (that needs it) would create a nice solution.

Ron

David Z├╝lke wrote:
> That seems a tad too hacky for my taste. I understand that we aren't
> using DBAdapters anymore at all, is that correct? Should we maybe
> re-introduce some very basic level of abstraction to cater for these
> specific situations? For instance, what about this SET NAMES utf8 thing?
> Putting stuff like that into the Propel class makes it next to
> impossible to customize behavior in userland without patching.
>
> I'll be happy to implement the necessary changes should we decide it's
> necessary or even feasible.
>
> Let's hear your thoughts :)
>
>
> David
>
>
> Am 17.11.2006 um 17:31 schrieb Soenke Ruempler - NorthClick:
>
>> Soenke Ruempler - NorthClick <> wrote on Friday, November 17, 2006
>> 5:22 PM:
>>
>>> Ron Rademaker <mailto:r.rademak​er@virtualbuilding.n​l> wrote on
>>> Friday, November 17, 2006 5:15 PM:
>>>
>>>> I guess the options from the runtime conf will be set later? (Just
>>>> in case anyone ever wants to override the default).
>>>
>>> Currently not, but it should, yes.
>>>
>>> I don't know if PDO makes a difference between
>>> driver-specific options and
>>> global attributes like "PDO::ATTR_EMULATE_PREPARES". Are the
>>> constructor-options from $driver_options the same as those
>>> are passed to
>>> PDO::setAttribute()?
>>
>> Yes they are. Finally:
>>
>> Index: Propel.php
>> ====================​====================​====================​=======
>> --- Propel.php (revision 497)
>> +++ Propel.php (working copy)
>> @@ -429,8 +429,16 @@
>> $user = isset($conparams['user']) ?
>> $conparams['user'] : null;
>> $password = isset($conparams['password']) ?
>> $conparams['password'] : null;
>>
>> + $driver_options = array();
>> +
>> + // Toggle PS Emulation for MySQL driver as the
>> native server-side
>> + // implementation seems to be buggy and slow.
>> + // This can be overridden in the connection
>> parameters
>> + if (strpos($conparams['dsn'], 'mysql') === 0) {
>> +
>> $driver_options[PDO​::ATTR_EMULATE_PREPA​RES]
>> = true;
>> + }
>> +
>> // load any driver options from the INI file
>> - $driver_options = array();
>> if ( isset($conparams['options']) &&
>> is_array($conparams['options']) ) {
>> try {
>> self::processDriverOptions(
>> $conparams['options'], $driver_options );
>>
>> -soenke
>>
>> --------------------​--------------------​--------------------​---------
>> To unsubscribe, e-mail: dev-unsubscribe@prop​el.tigris.org
>> For additional commands, e-mail: dev-help at propel dot tigris dot org
>>
>>
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: dev-unsubscribe@prop​el.tigris.org
> For additional commands, e-mail: dev-help at propel dot tigris dot org
>
>