OpClass
This class represents a PostgreSQL operator class for use in functional indexes. It allows for the customization of index behavior by specifying a specific operator class for a given expression or column.
Attributes
| Attribute | Type | Description |
|---|---|---|
| template | string = %(expressions)s %(name)s | The format string used to construct the SQL expression, positioning the expressions and the operator name. |
| constraint_validation_compatible | boolean = false | A boolean flag indicating whether this operator class can be used during the validation phase of database constraints. |
Constructor
Signature
def OpClass(
expression: Any,
name: str
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| expression | Any | The expression to be processed by the operator. |
| name | str | The name of the operator. |
Signature
def OpClass(
expression: expression,
name: string
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| expression | expression | The database expression or column to which the operator class will be applied. |
| name | string | The specific name of the PostgreSQL operator class to use for indexing. |