Operator Families

The operfamily module defines two classes: class OperatorFamily derived from DbSchemaObject and class OperatorFamilyDict derived from DbObjectDict.

Operator Family

OperatorFamily is derived from DbSchemaObject and represents a PostgreSQL operator family.

class pyrseas.dbobject.operfamily.OperatorFamily(**attrs)

An operator family

OperatorFamily.extern_key()

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

Returns:string
OperatorFamily.identifier()

Return a full identifier for an operator family object

Returns:string
OperatorFamily.create(obj, *args, **kwargs)

Return SQL statements to CREATE the operator family

Returns:SQL statements

Operator Family Dictionary

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

class pyrseas.dbobject.operfamily.OperatorFamilyDict(dbconn=None)

The collection of operator families in a database

OperatorFamilyDict.from_map(schema, inopfams)

Initalize the dict of operator families by converting the input map

Parameters:
  • schema – schema owning the operators
  • inopfams – YAML map defining the operator families
OperatorFamilyDict.diff_map(inopfams)

Generate SQL to transform existing operator families

Parameters:inopfams – a YAML map defining the new operator families
Returns:list of SQL statements

Compares the existing operator family definitions, as fetched from the catalogs, to the input map and generates SQL statements to transform the operator families accordingly.

Table Of Contents

Previous topic

Operators

Next topic

Operator Classes

This Page