{{if request.function=='state':}}
Internal state
{{else:}}
{{if len(request.args)>=1:}}
database {{=A(request.args[0],_href=URL(r=request,f='index/'))}}
{{if not request.vars.query:}}table {{=A(request.args[1],_href=URL(r=request,f='select/%s/%s'% tuple(request.args[:2])))}} {{=request.function}} {{else:}} generic select/update/delete{{pass}}
{{if len(request.args)==3:}}
record id {{=A(request.args[2],_href=URL(r=request,f='update/%s/%s/%s'% tuple(request.args[:3])))}}
{{pass}}
{{else:}}
Avalilable databases and tables
{{pass}}
{{pass}}
{{if request.function=='index':}}
{{if len(dbs)==0:}}No databases in this application{{pass}}
{{for dbname,items in dbs.items():}}
{{for dt in items:}}
[ {{=A('insert new '+dt[1],_href=URL(r=request,f='insert/%s/%s'%dt))}} ]
{{pass}}
{{pass}}
{{pass}}
{{if request.function=='select' and len(request.args)>1:}}
[ {{=A('insert new '+request.args[1],_href=URL(r=request,f='insert/%s/%s'%tuple(request.args[:2])))}} ]
Rows in table
{{elif request.function=='select' and len(request.args)==1:}}
Rows selected
{{pass}}
{{if request.function=='select' and len(request.args)>=1:}}