Example using BLOB in SQLAlchemy

前端 未结 4 1368
野趣味
野趣味 2021-02-03 23:34

does anybody have example how to use BLOB in SQLAlchemy?

Regards, Steve

4条回答
  •  不要未来只要你来
    2021-02-04 00:12

    Why don't you use LargeBinary?

    Extract from: https://docs.sqlalchemy.org/en/13/core/type_basics.html#sqlalchemy.types.LargeBinary

    class sqlalchemy.types.LargeBinary(length=None)
    A type for large binary byte data.
    
    The LargeBinary type corresponds to a large and/or unlengthed binary type for the target platform, such as BLOB on MySQL and BYTEA for PostgreSQL. It also handles the necessary conversions for the DBAPI.
    

    I believe this might assist you.

提交回复
热议问题