1def mydefault(context):
2 return context.get_current_parameters()['counter'] + 12
3
4t = Table('mytable', meta,
5 Column('counter', Integer),
6 Column('counter_plus_twelve', Integer, default=mydefault, onupdate=mydefault)
7)
1# a function which counts upwards
2i = 0
3def mydefault():
4 global i
5 i += 1
6 return i
7
8t = Table("mytable", meta,
9 Column('id', Integer, primary_key=True, default=mydefault),
10)