Docs for DAL.Table

[ Python Tutorial ] [ Python Libraries ] [ web2py epydoc ]

Description


<type 'type'> extends (<class 'pydal.helpers.classes.Serializable'>, <class 'pydal.helpers.classes.BasicStorage'>)
















Represents a database table

Example::
You can create a table as::
db = DAL(...)
db.define_table('users', Field('name'))

And then::

db.users.insert(name='me') # print db.users._insert(...) to see SQL
db.users.drop()



Attributes


DAL.Table.__call__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.__class__ <type 'type'> extends (<type 'object'>,) belongs to class <type 'type'>
type(object) -> the object's type type(name, bases, dict) -> a new type

DAL.Table.__contains__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.__delattr__ <type 'wrapper_descriptor'> belongs to class <type 'wrapper_descriptor'>
x.__delattr__('name') <==> del x.name

DAL.Table.__delitem__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.__dict__ <type 'dictproxy'> belongs to class <type 'dictproxy'>

DAL.Table.__doc__ <type 'str'> belongs to class <type 'str'>
str(object='') -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.

DAL.Table.__format__ <type 'method_descriptor'> belongs to class <type 'method_descriptor'>
default object formatter

DAL.Table.__getattribute__ <type 'wrapper_descriptor'> belongs to class <type 'wrapper_descriptor'>
x.__getattribute__('name') <==> x.name

DAL.Table.__getitem__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.__hash__ <type 'wrapper_descriptor'> belongs to class <type 'wrapper_descriptor'>
x.__hash__() <==> hash(x)

DAL.Table.__init__ <type 'instancemethod'> belongs to class <type 'instancemethod'>
Initializes the table and performs checking on the provided fields. Each table will have automatically an 'id'. If a field is of type Table, the fields (excluding 'id') from that table will be used instead. Raises: SyntaxError: when a supplied field is of incorrect type.

DAL.Table.__iter__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.__module__ <type 'str'> belongs to class <type 'str'>
str(object='') -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.

DAL.Table.__new__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
T.__new__(S, ...) -> a new object with type S, a subtype of T

DAL.Table.__nonzero__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.__reduce__ <type 'method_descriptor'> belongs to class <type 'method_descriptor'>
helper for pickle

DAL.Table.__reduce_ex__ <type 'method_descriptor'> belongs to class <type 'method_descriptor'>
helper for pickle

DAL.Table.__repr__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.__setattr__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.__setitem__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.__sizeof__ <type 'method_descriptor'> belongs to class <type 'method_descriptor'>
__sizeof__() -> int size of object in memory, in bytes

DAL.Table.__str__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.__subclasshook__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
Abstract classes can override this to customize issubclass(). This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

DAL.Table.__weakref__ <type 'getset_descriptor'> belongs to class <type 'getset_descriptor'>
list of weak references to the object (if defined)

DAL.Table._attempt_upload <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table._build_query <type 'instancemethod'> belongs to class <type 'instancemethod'>
for keyed table only

DAL.Table._create_references <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table._defaults <type 'instancemethod'> belongs to class <type 'instancemethod'>
If there are no fields/values specified, return table defaults

DAL.Table._drop <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table._enable_record_versioning <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table._filter_fields <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table._insert <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table._listify <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table._truncate <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table._validate <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table._validate_fields <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.as_dict <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.as_json <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.as_xml <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.as_yaml <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.bulk_insert <type 'instancemethod'> belongs to class <type 'instancemethod'>
here items is a list of dictionaries

DAL.Table.clear <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.copy <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.drop <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.fields <type 'property'> belongs to class <type 'property'>

DAL.Table.get <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.has_key <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.import_from_csv_file <type 'instancemethod'> belongs to class <type 'instancemethod'>
Import records from csv file. Column headers must have same names as table fields. Field 'id' is ignored. If column names read 'table.file' the 'table.' prefix is ignored. - 'unique' argument is a field which must be unique (typically a uuid field) - 'restore' argument is default False; if set True will remove old values in table first. - 'id_map' if set to None will not map ids The import will keep the id numbers in the restored table. This assumes that there is an field of type id that is integer and in incrementing order. Will keep the id numbers in restored table.

DAL.Table.insert <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.items <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.iteritems <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.iterkeys <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.itervalues <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.keys <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.on <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.pop <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.sqlsafe <type 'property'> belongs to class <type 'property'>

DAL.Table.sqlsafe_alias <type 'property'> belongs to class <type 'property'>

DAL.Table.truncate <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.update <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.update_or_insert <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.validate_and_insert <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.validate_and_update <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.validate_and_update_or_insert <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.values <type 'instancemethod'> belongs to class <type 'instancemethod'>

DAL.Table.with_alias <type 'instancemethod'> belongs to class <type 'instancemethod'>