[web2py] new feature for Firebird and Oracle users

21 views
Skip to first unread message

DenesL

unread,
Apr 8, 2010, 4:41:21 PM4/8/10
to web2py-users

Firebird and Oracle do not have auto-increment numeric fields, so
generators or sequences with a trigger are used to assign the value of
the field when they are needed.

Until now the names of generators, sequences, and triggers were
static, which was a problem when trying to access legacy tables..

Massimo has put in trunk a patch sent by Jose Jachuf, a user on the
spanish web2py group, which allows :

db.define_table('mytable',
Field('a_field'),
trigger_name='trigger_for_mytable',
sequence_name='sequence_for_mytable',
)

--
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to web2py+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/web2py?hl=en.

Thadeus Burgess

unread,
Apr 8, 2010, 5:11:40 PM4/8/10
to web...@googlegroups.com
PostgreSQL uses sequences too, any chance of getting support for it as well?

-Thadeus

mdipierro

unread,
Apr 8, 2010, 6:40:14 PM4/8/10
to web2py-users
This is ONLY for the autoincrement id. PostgreSQL does not need them
in this case

On Apr 8, 4:11 pm, Thadeus Burgess <thade...@thadeusb.com> wrote:
> PostgreSQL uses sequences too, any chance of getting support for it as well?
>
> -Thadeus
>
>
>
> On Thu, Apr 8, 2010 at 3:41 PM, DenesL <denes1...@yahoo.ca> wrote:
>
> > Firebird and Oracle do not have auto-increment numeric fields, so
> > generators or sequences with a trigger are used to assign the value of
> > the field when they are needed.
>
> > Until now the names of generators, sequences, and triggers were
> > static, which was a problem when trying to access legacy tables..
>
> > Massimo has put in trunk a patch sent by Jose Jachuf, a user on the
> > spanish web2py group, which allows :
>
> > db.define_table('mytable',
> >    Field('a_field'),
> >    trigger_name='trigger_for_mytable',
> >    sequence_name='sequence_for_mytable',
> > )
>
> > --
> > You received this message because you are subscribed to the Google Groups "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to web2py+un...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/web2py?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to web2py+un...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/web2py?hl=en.
Reply all
Reply to author
Forward
0 new messages