Use int values instead of strings for PostgreSQL booleans #280

Closed
wants to merge 1 commit into
from

3 participants

@chEbba

The Problem:

The current implementation for PostgreSQL uses strings 'true' and 'false' which are not working with PDO::ATTR_EMULATE_PREPARES.

Solution:

Use ints like in the default platform implementation.

Comments

  • There are only 2 options working both with or without emulation: ints and booleans, but booleans are more complicated to implement.
  • Tested only on my local php 5.4.9
  • Fixed NamedParametersTest to use int columns instead of strings (does not work with PDO::ATTR_EMULATE_PREPARES when compare string column IN array of ints)
  • Fixed DbalFunctionalTestCase sql parameters dumping (found while fixing NamedParametersTest)
  • Added support for driver options configuration via phpunit config globals
@doctrinebot

Hello,

thank you for positing this Pull Request. I have automatically opened an issue on our Jira Bug Tracker for you with the details of this Pull-Request. See the Link:

http://doctrine-project.org/jira/browse/DBAL-457

@beberlei
Doctrine member

Fixed in 55128a6

@beberlei beberlei closed this Mar 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment