title: Flask-SqlAlchemy: generating SQL with select function for materialized view
body: <p>I am trying to write a materialized view using SqlAlchemy's <code>select()</code> function and I am getting a <code>TypeError: 'DefaultMeta' object is not iterable</code></p>
  <p>The models are using <code>flask-sqlalchemy</code> and not plain <code>sqlalchemy</code>;</p>
  <pre><code>class Meta(db.Model):
      __tablename__ = &quot;meta&quot;
  
      id = db.Column(UUID, primary_key=True)
      my_col = db.Column(db.String)
  </code></pre>
  <p>Right now I am testing to make sure I get the right sql statement in a view;</p>
  <pre><code>@app.route(&quot;/test&quot;, methods=[&quot;GET&quot;])
  def test():
      from sqlalchemy.sql import select, join,
      foo = select(Meta)
      return str(foo)
  </code></pre>
  <p>Expecting SQLAlchemy's equivalent to <code>SELECT * FROM meta</code>.</p>