Operator Classes

The operclass module defines two classes: class OperatorClass derived from DbSchemaObject and class OperatorClassDict derived from DbObjectDict.

Operator Class

OperatorClass is derived from DbSchemaObject and represents a PostgreSQL operator class.

class pyrseas.dbobject.operclass.OperatorClass(name, schema, index_method, description, owner, family, type, default=None, storage=None, oid=None)

An operator class

static OperatorClass.from_map(name, schema, index_method, inobj)

Initialize an operator class instance from a YAML map

  • name – operator class name
  • name – schema name
  • index_method – index method
  • inobj – YAML map of the operator class

operator class instance


Return the key to be used in external maps for this operator


Return a full identifier for an operator class

OperatorClass.to_map(db, no_owner)

Convert operator class to a YAML-suitable format

OperatorClass.create(obj, *args, **kwargs)

Return SQL statements to CREATE the operator class

Returns:SQL statements

Operator Class Dictionary

OperatorClassDict is derived from DbObjectDict. It is a dictionary that represents the collection of operator classes in a database.

class pyrseas.dbobject.operclass.OperatorClassDict(dbconn=None)

The collection of operator classes in a database

OperatorClassDict.from_map(schema, inopcls)

Initalize the dictionary of operator classes from the input map

  • schema – schema owning the operator classes
  • inopcls – YAML map defining the operator classes