Package iceprod :: Package server :: Module db :: Class IceProdDB
[hide private]
[frames] | no frames]

Class IceProdDB

source code

Known Subclasses:

Instance Methods [hide private]
 
__init__(self)
Constructor
source code
 
nullify(self, value) source code
 
nonify(self, value) source code
 
intcast(self, value) source code
 
defang(self, txt) source code
 
get(self, name, value) source code
 
new(self)
Create a copy of this instance
source code
 
ping(self)
Ping server to reactivate connection
source code
 
getcursor(self) source code
 
commit(self) source code
 
rollback(self) source code
 
execute(self, cursor, sql, commit=True) source code
 
insert_id(self) source code
 
SetAuthFunc(self, func) source code
 
authenticate(self, host, usr, passwd, db, keep_open=False, port=3306)
Database authentication
source code
 
authenticate2(self, host, usr, passwd, db, port=3306)
Simple database authentication test
source code
 
set_auto(self, autocommit=True)
Set auto-commit
source code
 
connect(self)
Connect to database
source code
 
disconnect(self)
Disconnect from database
source code
 
isconnected(self) source code
 
mkkey(self, minsize, maxsize)
Generate random alphanumeric sequence
source code
 
fetch_metaproject_id(self, project_name, project_version)
Retrieve the metaproject_id for a given metaproject
source code
Class Variables [hide private]
  logger = logging.getLogger('IceProdDB')
Method Details [hide private]

authenticate(self, host, usr, passwd, db, keep_open=False, port=3306)

source code 

Database authentication

Parameters:
  • host - ip or name of MySQL host
  • usr - username
  • passwd - account password
  • db - name of database
  • keep_open - don't close connection after authenticating

authenticate2(self, host, usr, passwd, db, port=3306)

source code 

Simple database authentication test

Parameters:
  • host - ip or name of MySQL host
  • usr - username
  • passwd - account password
  • db - name of database
  • keep_open - don't close connection after authenticating

fetch_metaproject_id(self, project_name, project_version)

source code 

Retrieve the metaproject_id for a given metaproject

Parameters:
  • project_name
  • project_version - version string