Skip to content

Commit

Permalink
Cleaner solution for #446
Browse files Browse the repository at this point in the history
  • Loading branch information
gi0baro committed Mar 9, 2017
1 parent a46ccec commit d455335
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pydal/adapters/firebird.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import re
from .._compat import integer_types, long
from .._compat import long
from .base import SQLAdapter
from . import adapters


@adapters.register_for('firebird')
class FireBird(SQLAdapter):
dbengine = "firebird"
Expand Down Expand Up @@ -59,8 +60,8 @@ def create_sequence_and_triggers(self, query, table, **args):
self.execute('set generator %s to 0;' % sequence_name)
self.execute(
'create trigger %s for %s active before insert position 0 ' +
'as\nbegin\nif(new.id is null) then\nbegin\n' +
'new.id = gen_id(%s, 1);\nend\nend;' % (
'as\nbegin\nif(new."id" is null) then\nbegin\n' +
'new."id" = gen_id(%s, 1);\nend\nend;' % (
trigger_name, tablename, sequence_name))


Expand Down

0 comments on commit d455335

Please sign in to comment.