Package lemon :: Package db :: Package builder :: Class Table
[show private | hide private]
[frames | no frames]

Class Table


Base class for a database table object.

Method Summary
  __init__(self, database)
Work the magic...
  __getitem__(self, name)
  __repr__(self)
  __setitem__(self, name, value)
  add(self, all, **params)
Add a new row to the table.
  average(self, name)
Returns the average value of the column 'name'.
  columnExists(self, name)
  create(self)
Create the table with the options specified.
  drop(self)
Drop (remove) the table from the database destroying all its contents.
  emptyRow(self)
  exists(self)
  max(self, name)
Returns the highest value in the column 'name'.
  min(self, name)
Returns the lowest value in the column 'name'.
  query(self)
  remove(self, rowid)
Remove the row with the rowid 'rowid' from the table.
  removeRows(self, query)
Maps to the DELETE object.
  row(self, rowid)
Return the Row object with the rowid 'rowid'.
  rowExists(self, rowid)
  rowid(self, id)
  rowids(self, where, order)
Get a list of row rowids matching the criteria.
  select(self, where, order)
Returns row objects for rows matching the criteria.
  sum(self, name)
Returns the sum of the values in the column 'name'.

Method Details

__init__(self, database=None)
(Constructor)

Work the magic... Initialise the derived class by setting up the appropriate methods and classes.

add(self, all=None, **params)

Add a new row to the table. Maps to the INSERT command. params contains the columnName=value pairs.

average(self, name)

Returns the average value of the column 'name'.

create(self)

Create the table with the options specified.

drop(self)

Drop (remove) the table from the database destroying all its contents.

max(self, name)

Returns the highest value in the column 'name'.

min(self, name)

Returns the lowest value in the column 'name'.

remove(self, rowid)

Remove the row with the rowid 'rowid' from the table.

removeRows(self, query)

Maps to the DELETE object.

row(self, rowid)

Return the Row object with the rowid 'rowid'.

rowids(self, where=None, order='rowid')

Get a list of row rowids matching the criteria.

select(self, where=None, order=None)

Returns row objects for rows matching the criteria.

sum(self, name)

Returns the sum of the values in the column 'name'.

Generated by Epydoc 2.0 on Mon Nov 10 15:07:47 2003 http://epydoc.sf.net