The language module defines two classes, Language and LanguageDict, derived from DbObject and DbObjectDict, respectively.
Language is derived from DbObject and represents a procedural language.
A procedural language definition
Convert language to a YAML-suitable format
Parameters: | no_owner – exclude language owner information |
---|---|
Returns: | dictionary |
Return SQL statements to CREATE the language
Returns: | SQL statements |
---|
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.
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.
Generate SQL to transform existing languages
Parameters: | input_map – a YAML map defining the new languages |
---|---|
Returns: | list of SQL statements |
Compares the existing language definitions, as fetched from the catalogs, to the input map and generates SQL statements to transform the languages accordingly.