Hi Michael,
I don't know when the following problem began, but anyway, I've tested
it with rev.2672 and the problem persists....
Having this script:
==================================
from sqlalchemy import *
db = create_engine("firebird://user:[EMAIL PROTECTED]//database.fdb")
metadata = BoundMetaData(db)
pessoa_table = Table('pessoa', metadata,
Column('pes_id', Integer, primary_key=True),
Column('pes_data', DateTime),
Column('pes_nome', String(30)),
Column('pes_sobrenome', String(30)),
Column('pes_idade', Integer))
s = pessoa_table.select()
u = pessoa_table.update()
i = pessoa_table.insert()
==================================
...and trying to print s, u and i in the shell, it gives me:
>>> print s
SELECT pessoa.pes_id, pessoa.pes_data, pessoa.pes_nome,
pessoa.pes_sobrenome, pessoa.pes_idade
FROM pessoa
>>> print u
UPDATE pessoa SET pes_id=?, pes_data=?, pes_nome=?, pes_sobrenome=?, pes_idade=?
>>> print i
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
print i
File "d:\sqlalchemy\lib\sqlalchemy\sql.py", line 1225, in __str__
return unicode(self.compile()).encode('ascii', 'backslashreplace')
File "d:\sqlalchemy\lib\sqlalchemy\sql.py", line 1221, in compile
compiler.compile()
File "d:\sqlalchemy\lib\sqlalchemy\sql.py", line 1032, in compile
self.traverse(self.statement)
File "d:\sqlalchemy\lib\sqlalchemy\sql.py", line 877, in traverse
target.accept_visitor(v)
File "d:\sqlalchemy\lib\sqlalchemy\sql.py", line 3082, in accept_visitor
visitor.visit_insert(self)
File "d:\sqlalchemy\lib\sqlalchemy\databases\firebird.py", line 324,
in visit_insert
if not self.parameters.has_key(c.key):
AttributeError: 'NoneType' object has no attribute 'has_key'
>>>
The strange thing is that I am able to execute the insert statement:
>>> i.execute(pes_id=777)
<sqlalchemy.engine.base.ResultProxy object at 0x016A3310>
I am also having another problem with firebird, which may be related
to this problem or not... I'll send other message to describe it...
Thanks
PS: I've done the same tests with Postgresql and it run fine....
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---