Class DBIndex
source code
object --+
|
base.structure.StructureBase --+
|
object --+ |
| |
base.common.Parser --+
|
base.structure.ParseableStructure --+
|
base.structure.Structure --+
|
DBIndex
A description of an index in the database.
In real databases, indices may be fairly complex things; still, the
most common usage here will be to just index a single column:
<index columns="my_col"/>
To index over functions, use the character content; parentheses are
added by DaCHS, so don't have them in the content. An explicit
specification of the index expression is also necessary to allow RE
pattern matches using indices in character columns (outside of the C
locale). That would be:
<index columns="uri">uri text_pattern_ops</index>
(you still want to give columns so the metadata engine is aware of the
index). See section "Operator Classes and Operator Families"
in the Postgres documentation for details.
For pgsphere-valued columns, you at the time of writing need to
specify the method:
<index columns="coverage" method="GIST"/>
To define q3c indices, use the ``//scs#q3cindex`` mixin; if you're
devious enough to require something more flexible, have a look at that
mixin's definition.
If indexed columns take part in a DaCHS-defined view, DaCHS will not
notice. You should still declare the indices so users will see them in
the metadata; writing:
<index columns="col1, col2, col3"/>
is sufficent for that.
|
|
|
|
|
|
|
|
|
create(self,
querier)
creates the index on the parent table if necessary. |
source code
|
|
|
|
|
|
|
|
|
|
Inherited from base.structure.Structure :
__provides__ ,
callCompletedCallbacks ,
finishElement ,
onElementComplete ,
validate
Inherited from base.structure.ParseableStructure :
__init__ ,
end_ ,
feed ,
feedFrom ,
feedObject ,
getAttribute ,
iterEvents ,
start_ ,
value_
Inherited from base.structure.StructureBase :
__providedBy__ ,
adopt ,
breakCircles ,
change ,
copy ,
getAttributes ,
getCopyableAttributes ,
getSourcePosition ,
iterChildren ,
setPosition
Inherited from base.common.Parser :
feedEvent
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
|
dbname
|
Inherited from object :
__class__
|
creates the index on the parent table if necessary.
querier is an object mixing in the DBMethodsMixin, usually the DBTable
object the index should be created on.
|
drops the index if it exists.
querier is an object mixing in the DBMethodsMixin, usually the DBTable
object the index possibly exists on.
|
attrSeq
- Value:
[ <gavo.base.attrdef.BooleanAttribute object>,
<gavo.base.structure.DataContent object>,
<gavo.base.attrdef.StringListAttribute object>,
<gavo.base.parsecontext.IdAttribute object>,
<gavo.base.attrdef.UnicodeAttribute object>,
<gavo.base.attrdef.UnicodeAttribute object>]
|
|
managedAttrs
- Value:
{ ' cluster ' : <gavo.base.attrdef.BooleanAttribute object>,
' columns ' : <gavo.base.attrdef.StringListAttribute object>,
' content_ ' : <gavo.base.structure.DataContent object>,
' id ' : <gavo.base.parsecontext.IdAttribute object>,
' method ' : <gavo.base.attrdef.UnicodeAttribute object>,
' name ' : <gavo.base.attrdef.UnicodeAttribute object>}
|
|
dbname
- Get Method:
- unreachable.dbname(self)
|