Index
Bases: Component
Defining Indexes Using a Class Definition
INDEX Name ON Property AS Collation [ Keywords ];
Note: Complex indexes using expressions or multiple properties are not implemented yet by this library.
A workaround for this is to specify property
with the full desired expression and leave collation
empty, such as:
index.property = Expression("(Name As SQLstring, Code As Exact)")
collation
keywords = field(default_factory=dict, kw_only=True)
Optional dict used to specify keywords for this component.
Use {"Keyword": None}
for keywords that do not have a value
Valid Foreign Key keywords
- Abstract – Specifies that an index is abstract.
- Condition – Defines a conditional index and specifies the condition that must be met for a record to be included in the index.
- CoshardWith – Adds an index that specifies the name of the class with which this class is cosharded.
- Data – Specifies a list of properties whose values are to be stored within this index.
- Deferred – Defines a deferred index.
- Extent – Defines an extent index.
- IdKey – Specifies whether this index defines the Object Identity values for the table.
- Internal – Specifies whether this index definition is internal (not displayed in the class documentation).
- PrimaryKey – Specifies whether this index defines the primary key for the table.
- ShardKey – Defines an index that specifies the shard key for this class.
- SqlName – Specifies an SQL alias for the index.
- Type – Specifies the type of index.
- Unique – Specifies whether the index should enforce uniqueness.
property
Name of the property to index