fridge-project/dbal — pull request #51 by egeloen (2013-03-10 20:50:13+00:00)
Title: [Type] Add BLOB support

The primary goal of this PR is to add BLOB support.

The BLOB type have been created (`Fridge\DBAL\Type\BlobType`) & each platforms have been impacted. The `MySQLPlatform` have been refactored to avoid duplication for generating string type prefixes. The test suite has been updated in order to handle resources comparisons.

At the same time, I have tried to fix #9 by refactoring the `MysqliStatement`. Now, instead of taking a `mysqli` object in his constructor, it needs a `MysqliConnection` which is now a first citizen class. We need it as I have added to it the ability to get & cache the MySQL max allowed packet constant which is mandatory in order to send efficiently the BLOB values.

Adding it to the statement doesn't sound good to me so, it is the reason of this implementation. Additionally, it is more performant as the constant does not need to be fetched for each statement but at the same time, if it is modified by an other connection, we use a invalid value... So, not really sure what is the good solution here. What's your opinion?

ping @tmartin @geoffrey-brier