-1

How is this (SQLite Code), working:

csv_rt_bat_c_x = db.executesql('select * from csv_rt_bat_c LIMIT 100')

converted into Web2Py DAL?

Thats working:

csv_rt_bat_c_x = db().select(db.csv_rt_bat_c.ALL) 

But how to add the 100 LIMIT (to speed it up for development) ?

klausz
  • 33
  • 6

1 Answers1

0

Use the limitby argument:

csv_rt_bat_c_x = db().select(db.csv_rt_bat_c.ALL, limitby=(0, 100))
Anthony
  • 25,466
  • 3
  • 28
  • 57
  • As workaround I found: csv_rt_bat_c_x = db.executesql('select * from csv_rt_bat_c LIMIT 100') Yours is much better. It allows to speed up when testing on large tables and is acroding to the standard. – klausz Sep 02 '19 at 23:15