How to insert NULL value in SQLAlchemy?

后端 未结 3 906
离开以前
离开以前 2020-12-11 14:54

I\'ve a Table with the following column:

Column(\'type\', String(128))

How do I set this column to NULL when inserting a new r

3条回答
  •  甜味超标
    2020-12-11 15:24

    I know this is an old thread but this worked for me

    self.type = sqlalchemy.sql.null()
    

提交回复
热议问题