Package CHEM :: Package DB :: Package rdb :: Module database :: Class PQDatabase
[hide private]
[frames] | no frames]

Class PQDatabase



Database --+
           |
          PQDatabase

Class for PostGreSQL Database

Instance Methods [hide private]
 
__init__(self, host, database, username, password)
Connect to the database
 
connect(self)
Connec to the database
 
execute(self, cmdString)
Execute a command contained within cmdString
 
executeList(self, cmdList=[])
Execute a list of commands
 
fetch(self)
Returns the output from the command
 
close(self)
Closes the connection
 
insert(self, cmdList=[])
Performs low-level multi-value insert
 
select(self, cmdString)
Performs low-level select
 
cleanStatement(self, statementString)
Substitutes ' with '', etc...
Method Details [hide private]

__init__(self, host, database, username, password)
(Constructor)

 
Connect to the database
Overrides: Database.__init__

connect(self)

 
Connec to the database
Overrides: Database.connect

execute(self, cmdString)

 
Execute a command contained within cmdString
Overrides: Database.execute

fetch(self)

 
Returns the output from the command
Overrides: Database.fetch

close(self)

 
Closes the connection
Overrides: Database.close

insert(self, cmdList=[])

 
Performs low-level multi-value insert
Overrides: Database.insert

select(self, cmdString)

 
Performs low-level select
Overrides: Database.select

cleanStatement(self, statementString)

 
Substitutes ' with '', etc... from SQL statements