DatabaseIndex
This takes a variable number of parameters, each of which is a
column for indexing. Each column may be a column object or the
string name of the column (not the database name). You may also
use dictionaries, to further customize the indexing of the column.
The dictionary may have certain keys:
The DatabaseIndex class is accessible via the
sqlobject.index
module.
- 'column':
- The column object or string identifier.
- 'length':
- MySQL will only index the first N characters if this is
given. For other databases this is ignored.
- 'expression':
- You can create an index based on an expression, e.g.,
'lower(column)'. This can either be a string or a sqlbuilder
expression.
Further keys may be added to the column specs in the future.
The class also take the keyword argument
unique
; if true then
a UNIQUE index is created.
Attributes
<property object at 0xb6c2f914>
Methods
See
the source
for more information.