title: SQLAlchemy, how to filter by empty array column?
body: <p>I have that kind of Model in SQLAlchemy:</p>
  <pre><code>class MyModel(Base):
      __tablename__ = 'my_models'
      name = Column(String(255), nullable=False)
      company_ids = Column(ARRAY(Integer), nullable=True)
  </code></pre>
  <p>I have intentionally created models with empty arrays and try to query them like this:</p>
  <pre><code>db.query(MyModel).filter(~MyModel.company_ids.any())
  </code></pre>
  <p>Which doesn't return anything.</p>
  <p><strong>Is it possible to filter models that have empty array field?</strong></p>
  <p><strong>============UPDATE===============</strong></p>
  <p>I was able to query it by using this method:</p>
  <pre><code>db.query(MyModel).filter(MyModel.company_ids == '{}')
  </code></pre>
  <p>However I think it is only PostgreSQL specific answer</p>