I just found a better way, you can point to the defined function for
compute.
rows = db(db.table).select()
for row in rows:
row.update_record( mycomputedfield =
db.mytable.mycomputefield.compute(row) )
###
I made a test now
#
Thanks!
Regards
Johann
--
May grace and peace be yours in abundance through the full knowledge of God
and of Jesus our Lord! His divine power has given us everything we need for
life and godliness through the full knowledge of the one who called us by
his own glory and excellence.
I did it before, something like:
###
rows = db(db.table).select()
for row in rows:
row.update_record(mycomputedfield=lambda r:function(r))
###
where function(r) is the same function I used for t
If I have a table and add a computed field - how do I update existing
records? I am speaking of tables with many thousands of records.
Regards
Johann
--
May grace and peace be yours in abundance through the full knowledge of God
and of Jesus our Lord! His divine power has given us everything
4 matches
Mail list logo