Docs for SQLField

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

Description


<type 'type'> extends (<class 'gluon.sql.SQLXorable'>,)


1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.

an instance of this class represents a database field

example:

a=SQLField(name,'string',length=32,required=False,default=None,requires=IS_NOT_EMPTY(),notnull=False,unique=False,uploadfield=None,widget=None,label=None)

to be used as argument of SQLDB.define_table

allowed field types:
string, boolean, integer, double, text, blob,
date, time, datetime, upload, password

strings must have a length or 32 by default.
fields should have a default or they will be required in SQLFORMs
the requires argument are used to validate the field input in SQLFORMs



Attributes


SQLField.__add__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

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

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

SQLField.__dict__ <type 'dictproxy'> belongs to class <type 'dictproxy'>

SQLField.__div__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.__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.

SQLField.__eq__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.__ge__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

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

SQLField.__gt__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

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

SQLField.__init__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.__invert__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.__le__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.__lt__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.__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.

SQLField.__mul__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.__ne__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.__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

SQLField.__or__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

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

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

SQLField.__repr__ <type 'wrapper_descriptor'> belongs to class <type 'wrapper_descriptor'>
x.__repr__() <==> repr(x)

SQLField.__setattr__ <type 'wrapper_descriptor'> belongs to class <type 'wrapper_descriptor'>
x.__setattr__('name', value) <==> x.name = value

SQLField.__str__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.__sub__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

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

SQLField.belongs <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.count <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.day <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.formatter <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.hour <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.like <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.lower <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.max <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.min <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.minutes <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.month <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.seconds <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.sum <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.upper <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLField.year <type 'instancemethod'> belongs to class <type 'instancemethod'>