emmett-framework / emmett

The web framework for inventors
BSD 3-Clause "New" or "Revised" License
1.06k stars 71 forks source link

The Firebird support is broken #181

Closed josejachuf closed 7 years ago

josejachuf commented 7 years ago

Hi @gi0baro

If I want to use firebird with weppy it does not work, however with the pydal of web2py yes it does

When trying to create the tables fails:

File "../venv27/lib/python2.7/site-packages/pydal/migrator.py", line 269, in create_table self.adapter.create_sequence_and_triggers(query, table) File "../venv27/lib/python2.7/site-packages/pydal/adapters/firebird.py", line 64, in create_sequence_and_triggers trigger_name, tablename, sequence_name)) TypeError: not all arguments converted during string formatting

In weppy to adapter you are missing many things. For example


    def sequence_name(self,tablename):
        return ('genid_' + self.QUOTE_TEMPLATE) % tablename

    def trigger_name(self,tablename):
        return 'trg_id_%s' % tablename

Jose

cassiobotaro commented 7 years ago

I think it is a pydal issue, maybe you should move your issue.

gi0baro commented 7 years ago

@josejachuf yes, as @cassiobotaro said this is a pydal issue. I'm sorry but the support provided by weppy is directly dependant to the one provided by pydal; I cannot guarantee anything else.

josejachuf commented 7 years ago

@gi0baro, @cassiobotaro

You're right. I just tried pure pydal and it gives the same error. I'll see what web2py does to make it work Jose

josejachuf commented 7 years ago

Now I tried using version 16.03 of pydal, which is the last one that brings web2py and works fine.

Do I report it to pydal?

josejachuf commented 7 years ago

@gi0baro

With the version 16.06 that is the following to the 16.03 already happens the error

josejachuf commented 7 years ago

@gi0baro I sent a Pull Request to pydal.

gi0baro commented 7 years ago

@josejachuf weppy 1.0 uses pydal 17.3. I'm gonna close this, if you still have errors please open up an issue directly on pydal repo.