-
Notifications
You must be signed in to change notification settings - Fork 149
Open
Description
-
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)
from gluon import DAL, Field
from gluon.dal import InDBMigrator
db = DAL(uri, adapter_args=dict(migrator=InDBMigrator))
- 3) new syntax to connect to MySQL and Potgresql on GAE
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.
- 4) If you need to select lots of data and you do not want web2py to parse it into object but get the raw data as returned by the DB as a list of tuples:
rows = db(query).select(processor=lambda *a,**b: a[0])
- 5. the
ANY_OF
validator also needs to be documented
Metadata
Metadata
Assignees
Labels
No labels