Class SQLField
source code
SQLXorable --+
|
SQLField
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)
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
|
|
__init__(self,
fieldname,
type='string',
length=32,
default=None,
required=False,
requires=<function sqlhtml_validators at 0x2a6e030>,
ondelete='CASCADE',
notnull=False,
unique=False) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from SQLXorable:
__add__,
__div__,
__eq__,
__ge__,
__gt__,
__invert__,
__le__,
__lt__,
__mul__,
__ne__,
__or__,
__sub__,
belongs,
like
|
__init__(self,
fieldname,
type='string',
length=32,
default=None,
required=False,
requires=<function sqlhtml_validators at 0x2a6e030>,
ondelete='CASCADE',
notnull=False,
unique=False)
(Constructor)
| source code
|
- Overrides:
SQLXorable.__init__
|