Package gnue :: Package appserver :: Package gcd :: Module readgcd :: Class gcdReader
[show private | hide private]

Class gcdReader


Method Summary
  __init__(self, connections, database, files, dump, fonly)
Create a new instance of a gcd reader
  doUpdate(self, resultSet, data)
This function sets all fields in the current record of the resultset based on the key/values given by the data dictionary.
  executeAndGenerateCode(self)
This function logs into the given connection and calls it for an update of it's schema according to the loaded table definitions.
  run(self)
This is the main function of the whole process.
  updateRepository(self)
This function updates all parts of the class repository.

Method Details

__init__(self, connections, database, files, dump=None, fonly=False)
(Constructor)

Create a new instance of a gcd reader
Parameters:
connections - GConnections instance to be used
database - name of the connection to use (in connection.conf)
files - sequence of filenames to integerate
dump - If not None, the SQL-code of the schema-update will be stored into a file with this name
fonly - If True, only the SQL-dump will be done, no change of the backend will happen.

doUpdate(self, resultSet, data)

This function sets all fields in the current record of the resultset based on the key/values given by the data dictionary. It returns True, if a field value has been changed, otherwise False.
Parameters:
resultSet - resultset with the current record to be updated
data - dictionary with keys and values used for updates
Returns:
True if a field has been changed, False if no field has been changed.

executeAndGenerateCode(self)

This function logs into the given connection and calls it for an update of it's schema according to the loaded table definitions. Additionally the schema creation code is generated by this call, which will be stored in the given output file (if requested by options).

run(self)

This is the main function of the whole process. It loads all schema definitions and then logs into the connection to perform all actions requested.

updateRepository(self)

This function updates all parts of the class repository.


GNUe Home

Public API

Developer's Corner