I didn't realize this was an Insert.

This doesn't work in 0.9 or in master...

    Base = declarative_base()

    class Foo(Base):
        __tablename__ = 'foo'
        id = Column(Integer, primary_key=True)
        aaa = Column(Integer, )
        bbb = Column(Integer, )

    q = sqlalchemy.sql.expression.insert(
            Foo.__table__,
            {'aaa': 1, 
             'bbb': 2,
             }
        )

looking at sql.compiler.py :: def visit_bindparam , it's being called 
without a literal_binds kwarg

1009:

    def visit_bindparam(self, bindparam, within_columns_clause=False,
                        literal_binds=False,
                        skip_bind_expression=False,
                        **kwargs):
        print "-----"
        print "visit_bindparam - literal_binds %s"  % literal_binds
        print bindparam.__repr__

visit_bindparam - literal_binds False
<bound method BindParameter.__repr__ of BindParameter('id', None, 
type_=Integer())>
visit_bindparam - literal_binds False
<bound method BindParameter.__repr__ of BindParameter('aaa', 1, 
type_=Integer())>
visit_bindparam - literal_binds False
<bound method BindParameter.__repr__ of BindParameter('bbb', 2, 
type_=Integer())>


i wasn't able to trace enough more about what was going on.  I got lost in 
some of the compiler dispatch stuff

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to