Conversions¶
The conversion module defines two classes, Conversion
and ConversionDict, derived from DbSchemaObject and
DbObjectDict, respectively.
Conversion¶
Conversion is derived from
DbSchemaObject and represents a Postgres
conversion between character set encodings.
-
class
pyrseas.dbobject.conversion.Conversion(name, schema, description, owner, source_encoding, dest_encoding, function, default=False, oid=None)¶ A conversion definition
-
Conversion.to_map(db, no_owner=False, no_privs=False)¶ Convert a conversion to a YAML-suitable format
Returns: dictionary
-
Conversion.create(*args, **kwargs)¶ Return SQL statements to CREATE the conversion
Returns: SQL statements
Conversion Dictionary¶
ConversionDict is derived from
DbObjectDict. It is a dictionary that
represents the collection of conversions in a database.
-
class
pyrseas.dbobject.conversion.ConversionDict(dbconn=None)¶ The collection of conversions in a database.
-
ConversionDict.from_map(schema, inmap)¶ Initialize the dictionary of conversions by examining the input map
Parameters: - schema – the schema owing the conversions
- inmap – the input YAML map defining the conversions