Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      This issue is created automatically through a Github pull request on behalf of deeky666:

      Url: https://github.com/doctrine/dbal/pull/452

      Message:

      This PR introduces a `BinaryType` as an equivalent to `StringType` for binary strings of varying and fixed length as an alternative to `BlobType` for smaller data requirements. Most of the vendors have native support for `BINARY` and `VARBINARY` types which get mapped to this type. Currently `Sqlite` and `PostgreSQL` don't support them and mapping falls back to their native `BLOB` types when `BinaryType` is used in the application.
      Please not that the added methods `AbstractPlatform::getBinaryMaxLength()` and `AbstractPlatform::getBinaryDefaultLength()` are not used consistently throughout the platforms. I decided to adopt each platform's behaviour concerning default and max lengths evaluation if favour of implementing it the "correct" way. The reason for this is that those values are not properly defined and used throughout the platform and I guess changing this behaviour would be a BC break.
      An example to illustrate what I mean:
      Most of the vendors use a default length for `VARCHAR` / `CHAR` / `VARBINARY` / `BINARY` of `1` when you don't provide a length specifier in the declaration. However most of the platforms use a default of `255` and there are even many places where this value is hardcoded. At least this is my understanding of the default value.

        Issue Links

          Activity

          Hide
          Doctrine Bot added a comment -

          A related Github Pull-Request [GH-452] was closed:
          https://github.com/doctrine/dbal/pull/452

          Show
          Doctrine Bot added a comment - A related Github Pull-Request [GH-452] was closed: https://github.com/doctrine/dbal/pull/452

            People

            • Assignee:
              Benjamin Eberlei
              Reporter:
              Doctrine Bot
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: