Michael, Here are the results I am getting. I am trying to get TurboGears to work so I don't know which versions of SQLAlchemy can be used with TG and not screw it up.
Test prog. from sqlalchemy import * dbstr = 'firebird://SYSDBA:[EMAIL PROTECTED]/usr/ibdata/eiti61.gdb' fbdb = create_engine(dbstr) Using SQLAlchemy-0.3.7-py2.4 released with Turbogears """ Traceback (most recent call last): File "/var/tmp/sqlatest.py", line 3, in -toplevel- fbdb = create_engine(dbstr) File "build/bdist.linux-i686/egg/sqlalchemy/engine/__init__.py", line 154, in create_engine File "build/bdist.linux-i686/egg/sqlalchemy/engine/strategies.py", line 66, in create File "build/bdist.linux-i686/egg/sqlalchemy/databases/firebird.py", line 130, in create_connect_args TypeError: init() got an unexpected keyword argument 'concurrency_level' """ Using version of firebird.py added by guest on 03/19/07 """Traceback (most recent call last): File "/home/john/sqla/sqlatest.py", line 3, in -toplevel- fbdb = create_engine(dbstr) File "build/bdist.linux-i686/egg/sqlalchemy/engine/__init__.py", line 154, in create_engine File "build/bdist.linux-i686/egg/sqlalchemy/engine/strategies.py", line 58, in create TypeError: unbound method dbapi() must be called with FBDialect instance as first argument (got nothing instead) """ John On 31 May, 20:47, Michael Bayer <[EMAIL PROTECTED]> wrote: > firebird is a little like a chicken without a head at this point...im > applying fixes but have no FB database with which to test on. > > what results/stack traces/everything else are you getting with the > current SQLAlchemy trunk ? > > On May 31, 2007, at 3:33 PM, johnbraduk wrote: > > > > > Roger, > > Please excuse the interrupt, but have you applied other fixes? I (and > > others) can't event get SQLA to connect to > > my Firebird v1.5.4 database running on SUSE Linux. > > > John > > > On 30 May, 19:47, "Roger Demetrescu" <[EMAIL PROTECTED]> > > wrote: > >> Michael, the patch did the trick... > > >> I was able to print the statement, execute it, and also do some > >> inserts using ORM... > > >> Now the second part of my problem, which is not fixed yet... ;) > > >> here is the script (now using default value/expression): > > >> ================================ > > >> from datetime import datetime > >> 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, default=func.current_timestamp()), > >> Column('pes_nome', String(30)), > >> Column('pes_sobrenome', String(30)), > >> Column('pes_idade', Integer), > >> Column('pes_idade', Integer)) > > >> s = pessoa_table.select() > >> u = pessoa_table.update() > >> i = pessoa_table.insert() > > >> ================================ > > >> Now my shell session : > > >>>>> i.execute(pes_id=111, pes_data=datetime.now()) > > >> <sqlalchemy.engine.base.ResultProxy object at 0x018C0D50> > > >>>>> i.execute(pes_id=222) > > >> Traceback (most recent call last): > >> File "<pyshell#11>", line 1, in <module> > >> i.execute(pes_id=222) > >> File "d:\sqlalchemy\lib\sqlalchemy\sql.py", line 1175, in execute > >> return self.compile(engine=self.engine, > >> parameters=compile_params).execute(*multiparams, **params) > >> File "d:\sqlalchemy\lib\sqlalchemy\sql.py", line 1064, in execute > >> return e.execute_compiled(self, *multiparams, **params) > >> File "d:\sqlalchemy\lib\sqlalchemy\engine\base.py", line 783, in > >> execute_compiled > >> return connection.execute_compiled(compiled, *multiparams, > >> **params) > >> File "d:\sqlalchemy\lib\sqlalchemy\engine\base.py", line 570, in > >> execute_compiled > >> context.pre_exec() > >> File "d:\sqlalchemy\lib\sqlalchemy\engine\default.py", line 200, > >> in pre_exec > >> self._process_defaults() > >> File "d:\sqlalchemy\lib\sqlalchemy\engine\default.py", line 303, in > >> _process_defaults > >> newid = drunner.get_column_default(c) > >> File "d:\sqlalchemy\lib\sqlalchemy\engine\base.py", line 1234, in > >> get_column_default > >> return column.default.accept_visitor(self) > >> File "d:\sqlalchemy\lib\sqlalchemy\schema.py", line 807, in > >> accept_visitor > >> return visitor.visit_column_default(self) > >> File "d:\sqlalchemy\lib\sqlalchemy\engine\base.py", line 1275, in > >> visit_column_default > >> return self.exec_default_sql(default) > >> File "d:\sqlalchemy\lib\sqlalchemy\databases\firebird.py", line > >> 367, > >> in exec_default_sql > >> c = sql.select([default.arg], > >> from_obj=["rdb$database"]).compile(engine=self.engine) > >> AttributeError: 'FBDefaultRunner' object has no attribute 'engine' > > >> Now I'm going to explicitly insert a row with pes_data = NULL > >> (should'nt that work ??): > > >>>>> i.execute(pes_id=333, pes_data=None) > > >> Traceback (most recent call last): > >> File "<pyshell#12>", line 1, in <module> > >> i.execute(pes_id=333, pes_data=None) > >> File "d:\sqlalchemy\lib\sqlalchemy\sql.py", line 1175, in execute > >> return self.compile(engine=self.engine, > >> parameters=compile_params).execute(*multiparams, **params) > >> File "d:\sqlalchemy\lib\sqlalchemy\sql.py", line 1064, in execute > >> return e.execute_compiled(self, *multiparams, **params) > >> File "d:\sqlalchemy\lib\sqlalchemy\engine\base.py", line 783, in > >> execute_compiled > >> return connection.execute_compiled(compiled, *multiparams, > >> **params) > >> File "d:\sqlalchemy\lib\sqlalchemy\engine\base.py", line 570, in > >> execute_compiled > >> context.pre_exec() > >> File "d:\sqlalchemy\lib\sqlalchemy\engine\default.py", line 200, > >> in pre_exec > >> self._process_defaults() > >> File "d:\sqlalchemy\lib\sqlalchemy\engine\default.py", line 303, in > >> _process_defaults > >> newid = drunner.get_column_default(c) > >> File "d:\sqlalchemy\lib\sqlalchemy\engine\base.py", line 1234, in > >> get_column_default > >> return column.default.accept_visitor(self) > >> File "d:\sqlalchemy\lib\sqlalchemy\schema.py", line 807, in > >> accept_visitor > >> return visitor.visit_column_default(self) > >> File "d:\sqlalchemy\lib\sqlalchemy\engine\base.py", line 1275, in > >> visit_column_default > >> return self.exec_default_sql(default) > >> File "d:\sqlalchemy\lib\sqlalchemy\databases\firebird.py", line > >> 367, > >> in exec_default_sql > >> c = sql.select([default.arg], > >> from_obj=["rdb$database"]).compile(engine=self.engine) > >> AttributeError: 'FBDefaultRunner' object has no attribute 'engine' > > >> Thanks Michael > > >> PS: I am in the process of upgrading a dedicated host running > >> Firebird > >> 1.5.... after it is finished, maybe we could talk about how you can > >> use it to test firebird engine... (if you are interested, of > >> course)... > > >> On 5/30/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > >>> hey roger - > > >>> the fix for that issue is trivial, however the code which it > >>> fixes is > >>> doing something that should be done differently (that is, ensuring > >>> that all pk columns are present in an INSERT statement). Since I > >>> dont have FB here, can you try out the attached patch and see if it > >>> works for you, not just for the "print i" part (that part works) but > >>> for running some actual INSERT statements (and maybe the ORM) a > >>> little bit as well ? > > >>> thanks > > >>> - mike --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---