<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>web2py.gluon.dal</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th> <a
href="web2py.gluon-module.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
Package web2py ::
<a href="web2py.gluon-module.html">Package gluon</a> ::
Module dal
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>] | <a href="web2py.gluon.dal-module.html"
target="_top">no frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module dal</h1><span class="codelink"><a href="web2py.gluon.dal-pysrc.html">source code</a></span><br /><br />
<pre class="literalblock">
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
Thanks to
* Niall Sweeny <niall.sweeny@fonjax.com> for MS SQL support
* Marcel Leuthi <mluethi@mlsystems.ch> for Oracle support
* Denes
* Chris Clark
* clach05
* Denes Lengyel
* and many others who have contributed to current and previous versions
This file contains the DAL support for many relational databases,
including:
- SQLite
- MySQL
- Postgres
- Oracle
- MS SQL
- DB2
- Interbase
- Ingres
- SapDB (experimental)
- Cubrid (experimental)
- CouchDB (experimental)
- MongoDB (in progress)
- Google:nosql
- Google:sql
Example of usage:
>>> # from dal import DAL, Field
### create DAL connection (and create DB if not exists)
>>> db=DAL(('mysql://a:b@locahost/x','sqlite://storage.sqlite'),folder=None)
### define a table 'person' (create/aster as necessary)
>>> person = db.define_table('person',Field('name','string'))
### insert a record
>>> id = person.insert(name='James')
### retrieve it by id
>>> james = person(id)
### retrieve it by name
>>> james = person(name='James')
### retrieve it by arbitrary query
>>> query = (person.name=='James')&(person.name.startswith('J'))
>>> james = db(query).select(person.ALL)[0]
### update one record
>>> james.update_record(name='Jim')
### update multiple records by query
>>> db(person.name.like('J%')).update(name='James')
1
### delete records by query
>>> db(person.name.lower()=='jim').delete()
0
### retrieve multiple records (rows)
>>> people = db(person).select(orderby=person.name,groupby=person.name,limitby=(0,100))
### further filter them
>>> james = people.find(lambda row: row.name=='James').first()
>>> print james.id, james.name
1 James
### check aggrgates
>>> counter = person.id.count()
>>> print db(person).select(counter).first()(counter)
1
### delete one record
>>> james.delete_record()
1
### delete (drop) entire database table
>>> person.drop()
Supported field types:
id string text boolean integer double decimal password upload blob time date datetime,
Supported DAL URI strings:
'sqlite://test.db'
'sqlite:memory'
'jdbc:sqlite://test.db'
'mysql://root:none@localhost/test'
'postgres://mdipierro:none@localhost/test'
'jdbc:postgres://mdipierro:none@localhost/test'
'mssql://web2py:none@A64X2/web2py_test'
'mssql2://web2py:none@A64X2/web2py_test' # alternate mappings
'oracle://username:password@database'
'firebird://user:password@server:3050/database'
'db2://DSN=dsn;UID=user;PWD=pass'
'firebird://username:password@hostname/database'
'firebird_embedded://username:password@c://path'
'informix://user:password@server:3050/database'
'informixu://user:password@server:3050/database' # unicode informix
'google:datastore' # for google app engine datastore
'google:sql' # for google app engine with sql (mysql compatible)
'teradata://DSN=dsn;UID=user;PWD=pass' # experimental
For more info:
help(DAL)
help(Field)
</pre><br /><br />
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Classes</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Classes"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.GAEDecimalProperty-class.html" class="summary-name">GAEDecimalProperty</a><br />
GAE decimal implementation
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.ConnectionPool-class.html" class="summary-name">ConnectionPool</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.BaseAdapter-class.html" class="summary-name">BaseAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.SQLiteAdapter-class.html" class="summary-name">SQLiteAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.JDBCSQLiteAdapter-class.html" class="summary-name">JDBCSQLiteAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.MySQLAdapter-class.html" class="summary-name">MySQLAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.PostgreSQLAdapter-class.html" class="summary-name">PostgreSQLAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html" class="summary-name">JDBCPostgreSQLAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.OracleAdapter-class.html" class="summary-name">OracleAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.MSSQLAdapter-class.html" class="summary-name">MSSQLAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.MSSQL2Adapter-class.html" class="summary-name">MSSQL2Adapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.FireBirdAdapter-class.html" class="summary-name">FireBirdAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html" class="summary-name">FireBirdEmbeddedAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.InformixAdapter-class.html" class="summary-name">InformixAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.DB2Adapter-class.html" class="summary-name">DB2Adapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.TeradataAdapter-class.html" class="summary-name">TeradataAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.IngresAdapter-class.html" class="summary-name">IngresAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.IngresUnicodeAdapter-class.html" class="summary-name">IngresUnicodeAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.SAPDBAdapter-class.html" class="summary-name">SAPDBAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.CubridAdapter-class.html" class="summary-name">CubridAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.DatabaseStoredFile-class.html" class="summary-name">DatabaseStoredFile</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.UseDatabaseStoredFile-class.html" class="summary-name">UseDatabaseStoredFile</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.GoogleSQLAdapter-class.html" class="summary-name">GoogleSQLAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.NoSQLAdapter-class.html" class="summary-name">NoSQLAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.GAEF-class.html" class="summary-name">GAEF</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.GoogleDatastoreAdapter-class.html" class="summary-name">GoogleDatastoreAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.CouchDBAdapter-class.html" class="summary-name">CouchDBAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.MongoDBAdapter-class.html" class="summary-name">MongoDBAdapter</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.Row-class.html" class="summary-name">Row</a><br />
a dictionary that lets you do d['a'] as well as d.a this is only
used to store a Row
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.SQLCallableList-class.html" class="summary-name">SQLCallableList</a>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.DAL-class.html" class="summary-name">DAL</a><br />
an instance of this class represents a database connection
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.SQLALL-class.html" class="summary-name">SQLALL</a><br />
Helper class providing a comma-separated string having all the
field names (prefixed by table name and '.')
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.Reference-class.html" class="summary-name">Reference</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.Table-class.html" class="summary-name">Table</a><br />
an instance of this class represents a database table
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.Expression-class.html" class="summary-name">Expression</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.SQLCustomType-class.html" class="summary-name">SQLCustomType</a><br />
allows defining of custom SQL types...
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.Field-class.html" class="summary-name">Field</a><br />
an instance of this class represents a database field
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.Query-class.html" class="summary-name">Query</a><br />
a query object necessary to define a set.
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.Set-class.html" class="summary-name">Set</a><br />
a Set represents a set of records in the database,
the records are identified by the query=Query(...) object.
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.Rows-class.html" class="summary-name">Rows</a><br />
A wrapper for the return value of a select.
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.Field-class.html" class="summary-name">SQLField</a><br />
an instance of this class represents a database field
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.Table-class.html" class="summary-name">SQLTable</a><br />
an instance of this class represents a database table
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.Expression-class.html" class="summary-name">SQLXorable</a>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.Query-class.html" class="summary-name">SQLQuery</a><br />
a query object necessary to define a set.
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.Set-class.html" class="summary-name">SQLSet</a><br />
a Set represents a set of records in the database,
the records are identified by the query=Query(...) object.
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.Rows-class.html" class="summary-name">SQLRows</a><br />
A wrapper for the return value of a select.
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.Row-class.html" class="summary-name">SQLStorage</a><br />
a dictionary that lets you do d['a'] as well as d.a this is only
used to store a Row
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.DAL-class.html" class="summary-name">SQLDB</a><br />
an instance of this class represents a database connection
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal.DAL-class.html" class="summary-name">GQLDB</a><br />
an instance of this class represents a database connection
</td>
</tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Functions</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Functions"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="DEFAULT"></a><span class="summary-sig-name">DEFAULT</span>()</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.dal-pysrc.html#DEFAULT">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="uuid2int"></a><span class="summary-sig-name">uuid2int</span>(<span class="summary-sig-arg">uuidv</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.dal-pysrc.html#uuid2int">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="int2uuid"></a><span class="summary-sig-name">int2uuid</span>(<span class="summary-sig-arg">n</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.dal-pysrc.html#int2uuid">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="cleanup"></a><span class="summary-sig-name">cleanup</span>(<span class="summary-sig-arg">text</span>)</span><br />
validates that the given text is clean: only contains
[0-9a-zA-Z_]</td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.dal-pysrc.html#cleanup">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="web2py.gluon.dal-module.html#sqlhtml_validators" class="summary-sig-name">sqlhtml_validators</a>(<span class="summary-sig-arg">field</span>)</span><br />
Field type validation, using web2py's validators mechanism.</td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.dal-pysrc.html#sqlhtml_validators">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="bar_escape"></a><span class="summary-sig-name">bar_escape</span>(<span class="summary-sig-arg">item</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.dal-pysrc.html#bar_escape">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="bar_encode"></a><span class="summary-sig-name">bar_encode</span>(<span class="summary-sig-arg">items</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.dal-pysrc.html#bar_encode">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="bar_decode_integer"></a><span class="summary-sig-name">bar_decode_integer</span>(<span class="summary-sig-arg">value</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.dal-pysrc.html#bar_decode_integer">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="bar_decode_string"></a><span class="summary-sig-name">bar_decode_string</span>(<span class="summary-sig-arg">value</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.dal-pysrc.html#bar_decode_string">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="Row_unpickler"></a><span class="summary-sig-name">Row_unpickler</span>(<span class="summary-sig-arg">data</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row_unpickler">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="Row_pickler"></a><span class="summary-sig-name">Row_pickler</span>(<span class="summary-sig-arg">data</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Row_pickler">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="Reference_unpickler"></a><span class="summary-sig-name">Reference_unpickler</span>(<span class="summary-sig-arg">data</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Reference_unpickler">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="Reference_pickler"></a><span class="summary-sig-name">Reference_pickler</span>(<span class="summary-sig-arg">data</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Reference_pickler">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="xorify"></a><span class="summary-sig-name">xorify</span>(<span class="summary-sig-arg">orderby</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.dal-pysrc.html#xorify">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="update_record"></a><span class="summary-sig-name">update_record</span>(<span class="summary-sig-arg">pack</span>,
<span class="summary-sig-arg">a</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.dal-pysrc.html#update_record">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="Rows_unpickler"></a><span class="summary-sig-name">Rows_unpickler</span>(<span class="summary-sig-arg">data</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows_unpickler">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="Rows_pickler"></a><span class="summary-sig-name">Rows_pickler</span>(<span class="summary-sig-arg">data</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.dal-pysrc.html#Rows_pickler">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="web2py.gluon.dal-module.html#test_all" class="summary-sig-name">test_all</a>()</span><br />
>>> if len(sys.argv)<2: db = DAL("sqlite://test.db")...</td>
<td align="right" valign="top">
<span class="codelink"><a href="web2py.gluon.dal-pysrc.html#test_all">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Variables</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Variables"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="MAXCHARLENGTH"></a><span class="summary-name">MAXCHARLENGTH</span> = <code title="512">512</code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="INFINITY"></a><span class="summary-name">INFINITY</span> = <code title="32768">32768</code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal-module.html#CALLABLETYPES" class="summary-name">CALLABLETYPES</a> = <code title="(<type 'function'>,
<type 'function'>,
<type 'builtin_function_or_method'>,
<type 'instancemethod'>,
<type 'builtin_function_or_method'>)"><code class="variable-group">(</code><type 'function'><code class="variable-op">, </code><type 'function'><code class="variable-op">, </code><type '<code class="variable-ellipsis">...</code></code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="have_portalocker"></a><span class="summary-name">have_portalocker</span> = <code title="True">True</code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="have_serializers"></a><span class="summary-name">have_serializers</span> = <code title="True">True</code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="have_validators"></a><span class="summary-name">have_validators</span> = <code title="True">True</code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="logger"></a><span class="summary-name">logger</span> = <code title="logging.getLogger("web2py.dal")">logging.getLogger("web2py.dal")</code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="sql_locker"></a><span class="summary-name">sql_locker</span> = <code title="<_RLock(None, 0)>"><_RLock(None, 0)></code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="thread"></a><span class="summary-name">thread</span> = <code title="threading.local()">threading.local()</code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="regex_dbname"></a><span class="summary-name">regex_dbname</span> = <code title="re.compile(r'^(\w+)(:\w+)*')">re.compile(r'^<code class="re-group">(</code>\w<code class="re-op">+</code><code class="re-group">)</code><code class="re-group">(</code>:\w<code class="re-op">+</code><code class="re-group">)</code><code class="re-op">*</code>')</code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="table_field"></a><span class="summary-name">table_field</span> = <code title="re.compile(r'^[\w_]+\.[\w_]+$')">re.compile(r'^<code class="re-group">[</code>\w_<code class="re-group">]</code><code class="re-op">+</code>\.<code class="re-group">[</code>\w_<code class="re-group">]</code><code class="re-op">+</code>$')</code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal-module.html#regex_content" class="summary-name">regex_content</a> = <code title="re.compile(r'(?P<table>[\w-]+)\.(?P<field>[\w-]+)\.(?P<uuidkey>[\w-]+)\
\.(?P<name>\w+)\.\w+$')">re.compile(r'<code class="re-group">(?P<</code><code class="re-ref">table</code><code class="re-group">></code><code class="re-group">[</code>\w-<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code>\.<code class="re-group">(?P<</code><code class="re-ref">field</code><code class="re-group">></code><code class="re-group">[</code>\w-<code class="variable-ellipsis">...</code></code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="regex_cleanup_fn"></a><span class="summary-name">regex_cleanup_fn</span> = <code title="re.compile(r'[\'"\s;]+')">re.compile(r'<code class="re-group">[</code>\'"\s;<code class="re-group">]</code><code class="re-op">+</code>')</code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="string_unpack"></a><span class="summary-name">string_unpack</span> = <code title="re.compile(r'(?<!\|)\|(?!\|)')">re.compile(r'<code class="re-group">(?<!</code>\|<code class="re-group">)</code>\|<code class="re-group">(?!</code>\|<code class="re-group">)</code>')</code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal-module.html#regex_python_keywords" class="summary-name">regex_python_keywords</a> = <code title="re.compile(r'^(and|del|from|not|while|as|elif|global|or|with|assert|el\
se|if|pass|yield|break|except|import|print|class|exec|in|raise|continu\
e|finally|is|return|def|for|lambda|try)$')">re.compile(r'^<code class="re-group">(</code>and<code class="re-op">|</code>del<code class="re-op">|</code>from<code class="re-op">|</code>not<code class="re-op">|</code>while<code class="re-op">|</code><code class="variable-ellipsis">...</code></code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="drivers"></a><span class="summary-name">drivers</span> = <code title="['SQLite3', 'pymysql', 'PostgreSQL']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">SQLite3</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">pymysql</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">PostgreSQL</code><code class="variable-quote">'</code><code class="variable-group">]</code></code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="is_jdbc"></a><span class="summary-name">is_jdbc</span> = <code title="True">True</code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="INGRES_SEQNAME"></a><span class="summary-name">INGRES_SEQNAME</span> = <code title="'ii***lineitemsequence'"><code class="variable-quote">'</code><code class="variable-string">ii***lineitemsequence</code><code class="variable-quote">'</code></code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="web2py.gluon.dal-module.html#ADAPTERS" class="summary-name">ADAPTERS</a> = <code title="{'couchdb': <class 'web2py.gluon.dal.CouchDBAdapter'>,
'cubrid': <class 'web2py.gluon.dal.CubridAdapter'>,
'db2': <class 'web2py.gluon.dal.DB2Adapter'>,
'firebird': <class 'web2py.gluon.dal.FireBirdAdapter'>,
'firebird_embedded': <class 'web2py.gluon.dal.FireBirdAdapter'>,
'gae': <class 'web2py.gluon.dal.GoogleDatastoreAdapter'>,
'google:datastore': <class 'web2py.gluon.dal.GoogleDatastoreAdapter'>\
,
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">couchdb</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'web2py.gluon.dal.CouchDBAdapter<code class="variable-ellipsis">...</code></code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="regex_quotes"></a><span class="summary-name">regex_quotes</span> = <code title="re.compile(r'\'[^\']*\'')">re.compile(r'\'<code class="re-group">[^</code>\'<code class="re-group">]</code><code class="re-op">*</code>\'')</code>
</td>
</tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Function Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-FunctionDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="sqlhtml_validators"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">sqlhtml_validators</span>(<span class="sig-arg">field</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#sqlhtml_validators">source code</a></span>
</td>
</table>
<p>Field type validation, using web2py's validators mechanism.</p>
makes sure the content of a field is in line with the declared
fieldtype
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="test_all"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">test_all</span>()</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="web2py.gluon.dal-pysrc.html#test_all">source code</a></span>
</td>
</table>
<pre class="literalblock">
>>> if len(sys.argv)<2: db = DAL("sqlite://test.db")
>>> if len(sys.argv)>1: db = DAL(sys.argv[1])
>>> tmp = db.define_table('users', Field('stringf', 'string', length=32, required=True), Field('booleanf', 'boolean', default=False), Field('passwordf', 'password', notnull=True), Field('uploadf', 'upload'), Field('blobf', 'blob'), Field('integerf', 'integer', unique=True), Field('doublef', 'double', unique=True,notnull=True), Field('datef', 'date', default=datetime.date.today()), Field('timef', 'time'), Field('datetimef', 'datetime'), migrate='test_user.table')
Insert a field
>>> db.users.insert(stringf='a', booleanf=True, passwordf='p', blobf='0A', uploadf=None, integerf=5, doublef=3.14, datef=datetime.date(2001, 1, 1), timef=datetime.time(12, 30, 15), datetimef=datetime.datetime(2002, 2, 2, 12, 30, 15))
1
Drop the table
>>> db.users.drop()
Examples of insert, select, update, delete
>>> tmp = db.define_table('person', Field('name'), Field('birth','date'), migrate='test_person.table')
>>> person_id = db.person.insert(name="Marco",birth='2005-06-22')
>>> person_id = db.person.insert(name="Massimo",birth='1971-12-21')
commented len(db().select(db.person.ALL))
commented 2
>>> me = db(db.person.id==person_id).select()[0] # test select
>>> me.name
'Massimo'
>>> db(db.person.name=='Massimo').update(name='massimo') # test update
1
>>> db(db.person.name=='Marco').select().first().delete_record() # test delete
1
Update a single record
>>> me.update_record(name="Max")
>>> me.name
'Max'
Examples of complex search conditions
>>> len(db((db.person.name=='Max')&(db.person.birth<'2003-01-01')).select())
1
>>> len(db((db.person.name=='Max')&(db.person.birth<datetime.date(2003,01,01))).select())
1
>>> len(db((db.person.name=='Max')|(db.person.birth<'2003-01-01')).select())
1
>>> me = db(db.person.id==person_id).select(db.person.name)[0]
>>> me.name
'Max'
Examples of search conditions using extract from date/datetime/time
>>> len(db(db.person.birth.month()==12).select())
1
>>> len(db(db.person.birth.year()>1900).select())
1
Example of usage of NULL
>>> len(db(db.person.birth==None).select()) ### test NULL
0
>>> len(db(db.person.birth!=None).select()) ### test NULL
1
Examples of search conditions using lower, upper, and like
>>> len(db(db.person.name.upper()=='MAX').select())
1
>>> len(db(db.person.name.like('%ax')).select())
1
>>> len(db(db.person.name.upper().like('%AX')).select())
1
>>> len(db(~db.person.name.upper().like('%AX')).select())
0
orderby, groupby and limitby
>>> people = db().select(db.person.name, orderby=db.person.name)
>>> order = db.person.name|~db.person.birth
>>> people = db().select(db.person.name, orderby=order)
>>> people = db().select(db.person.name, orderby=db.person.name, groupby=db.person.name)
>>> people = db().select(db.person.name, orderby=order, limitby=(0,100))
Example of one 2 many relation
>>> tmp = db.define_table('dog', Field('name'), Field('birth','date'), Field('owner',db.person), migrate='test_dog.table')
>>> db.dog.insert(name='Snoopy', birth=None, owner=person_id)
1
A simple JOIN
>>> len(db(db.dog.owner==db.person.id).select())
1
>>> len(db().select(db.person.ALL, db.dog.name,left=db.dog.on(db.dog.owner==db.person.id)))
1
Drop tables
>>> db.dog.drop()
>>> db.person.drop()
Example of many 2 many relation and Set
>>> tmp = db.define_table('author', Field('name'), migrate='test_author.table')
>>> tmp = db.define_table('paper', Field('title'), migrate='test_paper.table')
>>> tmp = db.define_table('authorship', Field('author_id', db.author), Field('paper_id', db.paper), migrate='test_authorship.table')
>>> aid = db.author.insert(name='Massimo')
>>> pid = db.paper.insert(title='QCD')
>>> tmp = db.authorship.insert(author_id=aid, paper_id=pid)
Define a Set
>>> authored_papers = db((db.author.id==db.authorship.author_id)&(db.paper.id==db.authorship.paper_id))
>>> rows = authored_papers.select(db.author.name, db.paper.title)
>>> for row in rows: print row.author.name, row.paper.title
Massimo QCD
Example of search condition using belongs
>>> set = (1, 2, 3)
>>> rows = db(db.paper.id.belongs(set)).select(db.paper.ALL)
>>> print rows[0].title
QCD
Example of search condition using nested select
>>> nested_select = db()._select(db.authorship.paper_id)
>>> rows = db(db.paper.id.belongs(nested_select)).select(db.paper.ALL)
>>> print rows[0].title
QCD
Example of expressions
>>> mynumber = db.define_table('mynumber', Field('x', 'integer'))
>>> db(mynumber.id>0).delete()
0
>>> for i in range(10): tmp = mynumber.insert(x=i)
>>> db(mynumber.id>0).select(mynumber.x.sum())[0](mynumber.x.sum())
45
>>> db(mynumber.x+2==5).select(mynumber.x + 2)[0](mynumber.x + 2)
5
Output in csv
>>> print str(authored_papers.select(db.author.name, db.paper.title)).strip()
author.name,paper.title
Massimo,QCD
Delete all leftover tables
>>> DAL.distributed_transaction_commit(db)
>>> db.mynumber.drop()
>>> db.authorship.drop()
>>> db.author.drop()
>>> db.paper.drop()
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Variables Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-VariablesDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="CALLABLETYPES"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">CALLABLETYPES</h3>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
<code class="variable-group">(</code><type 'function'><code class="variable-op">,</code>
<type 'function'><code class="variable-op">,</code>
<type 'builtin_function_or_method'><code class="variable-op">,</code>
<type 'instancemethod'><code class="variable-op">,</code>
<type 'builtin_function_or_method'><code class="variable-group">)</code>
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<a name="regex_content"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">regex_content</h3>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
re.compile(r'<code class="re-group">(?P<</code><code class="re-ref">table</code><code class="re-group">></code><code class="re-group">[</code>\w-<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code>\.<code class="re-group">(?P<</code><code class="re-ref">field</code><code class="re-group">></code><code class="re-group">[</code>\w-<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code>\.<code class="re-group">(?P<</code><code class="re-ref">uuidkey</code><code class="re-group">></code><code class="re-group">[</code>\w-<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
\.<code class="re-group">(?P<</code><code class="re-ref">name</code><code class="re-group">></code>\w<code class="re-op">+</code><code class="re-group">)</code>\.\w<code class="re-op">+</code>$')
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<a name="regex_python_keywords"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">regex_python_keywords</h3>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
re.compile(r'^<code class="re-group">(</code>and<code class="re-op">|</code>del<code class="re-op">|</code>from<code class="re-op">|</code>not<code class="re-op">|</code>while<code class="re-op">|</code>as<code class="re-op">|</code>elif<code class="re-op">|</code>global<code class="re-op">|</code>or<code class="re-op">|</code>with<code class="re-op">|</code>assert<code class="re-op">|</code>el<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
se<code class="re-op">|</code>if<code class="re-op">|</code>pass<code class="re-op">|</code>yield<code class="re-op">|</code>break<code class="re-op">|</code>except<code class="re-op">|</code>import<code class="re-op">|</code>print<code class="re-op">|</code>class<code class="re-op">|</code>exec<code class="re-op">|</code>in<code class="re-op">|</code>raise<code class="re-op">|</code>continu<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
e<code class="re-op">|</code>finally<code class="re-op">|</code>is<code class="re-op">|</code>return<code class="re-op">|</code>def<code class="re-op">|</code>for<code class="re-op">|</code>lambda<code class="re-op">|</code>try<code class="re-group">)</code>$')
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<a name="ADAPTERS"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">ADAPTERS</h3>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">couchdb</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'web2py.gluon.dal.CouchDBAdapter'><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">cubrid</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'web2py.gluon.dal.CubridAdapter'><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">db2</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'web2py.gluon.dal.DB2Adapter'><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">firebird</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'web2py.gluon.dal.FireBirdAdapter'><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">firebird_embedded</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'web2py.gluon.dal.FireBirdAdapter'><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">gae</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'web2py.gluon.dal.GoogleDatastoreAdapter'><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">google:datastore</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'web2py.gluon.dal.GoogleDatastoreAdapter'><code class="variable-op"></code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th> <a
href="web2py.gluon-module.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0beta1 on Thu Aug 4 00:46:59 2011
</td>
<td align="right" class="footer">
<a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie()
// -->
</script>
</body>
</html>