# sqlobject.index module

class sqlobject.index.DatabaseIndex(*columns, **kw)

  Bases: `object`

  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:

  ‘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.

  baseClass

    alias of `SODatabaseIndex`

  property name
  setName(value)
  withClass(soClass)