from gluon import DAL, Field
from gluon.dal import InDBMigrator
db = DAL(uri, adapter_args=dict(migrator=InDBMigrator))
Follow instructions https://cloud.google.com/appengine/docs/flexible/python/using-cloud-sql then use DAL//web2py URI:
"google:MySQLdb://username:password@/dbname?unix_socket=/cloudsql/projectname:dbzone:dbinstancename"
"google:psycopg2://username:password@/dbname?unix_socket=/cloudsql/projectname:dbzone:dbinstancename"
In this case the adapter_args=dict(migrator=InDBMigrator)) is the default behavior.
rows = db(query).select(processor=lambda *a,**b: a[0])
1) describe
{{=ASSIGNJS(js_var = python_var)}}2) new syntax to store .table files in DB itself instead of in the filesystem (works with any DB)
Follow instructions https://cloud.google.com/appengine/docs/flexible/python/using-cloud-sql then use DAL//web2py URI:
In this case the
adapter_args=dict(migrator=InDBMigrator))is the default behavior.ANY_OFvalidator also needs to be documented