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, owner=None, privileges=[], trusted=False, oid=None)

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

Generate SQL to drop the current object

Returns:list of SQL statements

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