title: How to filter in `sqlalchemy` by string length?
body: <p>How to filter in <code>sqlalchemy</code> by string length?</p>
  
  <p>This code snippet:</p>
  
  <pre><code>sess.query(db.ArticlesTable).filter(or_(
      and_(db.ArticlesTable.shorttext.length &gt; 0),
           ...
  </code></pre>
  
  <p>gave me the following error:</p>
  
  <pre><code>File "./aggregate_news.py", line 69, in is_acceptable
      db.ArticlesTable.shorttext.length &gt; 0),
    File ".../sqlalchemy/orm/attributes.py", line 211, in __getattr__
      key)
  AttributeError: Neither 'InstrumentedAttribute' object nor 'Comparator' 
      object associated with ArticlesTable.shorttext has an attribute 'length'
  </code></pre>
  
  <p>Where <code>ArticlesTable</code> is:</p>
  
  <pre><code>class ArticlesTable(Base):
      __tablename__ = TABLE_ARTICLES
      id = Column(Integer, primary_key=True)
      shorttext = Column(String)
      ...
  </code></pre>