- changed status to resolved
strange behavior with MySQL empty SET
Issue #3283
resolved
Hi all,
I want to use the MySQL SET type with sqlalchemy, but in case we have an empty set in database, sqlalchemy return an set with one element (the empty string).
Thank you
Comments (4)
-
repo owner -
repo owner - changed milestone to 1.0
-
repo owner you can see an overview of what's going on at http://docs.sqlalchemy.org/en/latest/changelog/migration_10.html#mysql-set-type-overhauled-to-support-empty-sets-unicode-blank-value-handling
-
reporter Thank you !!!
- Log in to comment
.mysql.SET
type has been overhauled to no longer assume that the empty string, or a set with a single empty string value, is in fact a set with a single empty string; instead, this is by default treated as the empty set. In order to handle persistence of a :class:.mysql.SET
that actually wants to include the blank value''
as a legitimate value, a new bitwise operational mode is added which is enabled by the :paramref:.mysql.SET.retrieve_as_bitwise
flag, which will persist and retrieve values unambiguously using their bitflag positioning. Storage and retrieval of unicode values for driver configurations that aren't converting unicode natively is also repaired. fixes#3283→ <<cset 93742b3d5c16>>