type for short binary

Issue #1882 resolved
Former user created an issue

It would be nice to have a companion to LargeBinary, Binary (or I suppose it would have to be ShortBinary). This would produce BINARY on all dialects except sqlite, where it would produce BLOB. (Using types.BINARY in sqlite now currently results in a numeric affinity.)

Comments (4)

  1. Mike Bayer repo owner

    -1 on this since I don't think people will find it and I'm not crazy about SQLA having an opinion that SQLite BLOB is just like a small BINARY type on other DBs - BINARY differs quite a bit across platforms especially on MySQL. You can also get ad-hoc type compilation behaviors like this now on an as-needed basis using the @compiles extension http://www.sqlalchemy.org/docs/reference/ext/compiler.html?highlight=compiles

    will leave open for discussion.

  2. Log in to comment