[ignoreCreateAndDrop=False]) |
True
then the table is not created or dropped when the database methods createTables() or dropTables()
are called.
column) |
name, foreignTable) |
name, foreignTable) |
name, foreignTable) |
) |
) |
) |
web.database.object.Row
objects in the table.
) |
(str(key), value)
pairs where the key is the web.database.object.Row
key and the value is the web.database.object.Row
object.
key) |
True
if the table has a row with a key key, False
otherwise
[rows=False]) |
True
then each Row object is made into a dictionary of column name : value pairs, except for single, multiple and related joins columns, since this could result in circular references.
) |
) |
) |
True
if the table exists in the database, False
otherwise.
rowid) |
True
if the row specified by the integer rowid exists in the table, False
otherwise.
name) |
True
if the column name exists in the table, False
otherwise.
[all=None], [**params]) |
colName=value,
. You must use one of the two methods. Note:
all
is a reserved word so there should be no confusion between using the two notations.
rowid) |
rowid
of the row with the rowid parameter. Warning:
This method does not delete corresponding rows in foreign tables. If you delete a row there will still be references to it in other tables if it contains any colums added by addMultiple or addSingle() for example. These should be deleted manually. XXX is this a bug or a useful feature?
rowid) |
rowid
specified by the rowid parameter.
key) |
key
specified by the key parameter. Note:
Certain objects such as class objects cannot be used as dictionary keys. All keys are converted to strings using the str() function so any object to be used as a key must return a unique value when its __str__() is called. This also means that
where[,order=None][,rowids=False]) |
True
then a list of rowid
s is returned rather than a dictionary of Row objects.
[action=''][, method='post'][, stickyData={}][, enctype='multipart/form-data'][, submit='Submit'][, modeDict={'mode':'mode', 'table':'table', 'submode':'submode'}][, submode='add']) |
column[, rows='post']) |
True
returns a list of rows which have the maximum value of column.
column[, rows='post']) |
True
returns a list of rows which have the minimum value of column.
>>> print database['table'].column['column1'] == 23 \ ... && database['table'].column['column2'] < datetime.date(2004,12,04) column1=23 AND column2<'2004-12-24'
Table rows can be accessed using the row() method or by using the __getitem__() method as follows. To return the row with where the key
is surname
and you want the row with surname 'Smith'
from the 'Person'
table of the database wrapped by database
you would do this:
>>> database['Person']['Smith'] <web.database.object.Row from 'Person' Table, rowid=1, firstName='John', surname='Smith'>