Procedural Languages

The language module defines two classes, Language and LanguageDict, derived from DbObject and DbObjectDict, respectively.

Procedural Language

Language is derived from DbObject and represents a procedural language.

class pyrseas.dbobject.language.Language(name, description=None, **attrs)

A procedural language definition

Language.to_map(db, no_owner, no_privs)

Convert language to a YAML-suitable format

Parameters:no_owner – exclude language owner information

Return SQL statements to CREATE the language

Returns:SQL statements

Language Dictionary

LanguageDict is derived from DbObjectDict. It is a dictionary that represents the collection of procedural languages in a database. Internal languages (‘internal’, ‘c’ and ‘sql’) are excluded.

class pyrseas.dbobject.language.LanguageDict(dbconn=None)

The collection of procedural languages in a database.


Initialize the dictionary of languages by examining the input map

Parameters:inmap – the input YAML map defining the languages

Connect functions to their respective languages

Parameters:dbfunctions – dictionary of functions

Fills in the functions dictionary for each language by traversing the dbfunctions dictionary, which is keyed by schema and function name.