Docs for SQLDB.Field

[ 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


SQLDB.Field.__add__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

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

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

SQLDB.Field.__dict__ <type 'dictproxy'> belongs to class <type 'dictproxy'>

SQLDB.Field.__div__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.__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.

SQLDB.Field.__eq__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.__ge__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

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

SQLDB.Field.__gt__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

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

SQLDB.Field.__init__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.__invert__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.__le__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.__lt__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.__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.

SQLDB.Field.__mul__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.__ne__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.__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

SQLDB.Field.__or__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

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

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

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

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

SQLDB.Field.__str__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.__sub__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

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

SQLDB.Field.belongs <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.count <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.day <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.formatter <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.hour <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.like <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.lower <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.max <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.min <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.minutes <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.month <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.seconds <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.sum <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.upper <type 'instancemethod'> belongs to class <type 'instancemethod'>

SQLDB.Field.year <type 'instancemethod'> belongs to class <type 'instancemethod'>