Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
BioSQL.BioSeqDatabase.Adaptor Class Reference

List of all members.

Public Member Functions

def __init__
def last_id
def autocommit
def commit
def rollback
def close
def fetch_dbid_by_dbname

Public Attributes

 conn
 cursor
 dbutils

Detailed Description

Definition at line 266 of file BioSeqDatabase.py.


Constructor & Destructor Documentation

def BioSQL.BioSeqDatabase.Adaptor.__init__ (   self,
  conn,
  dbutils 
)

Definition at line 267 of file BioSeqDatabase.py.

00267 
00268     def __init__(self, conn, dbutils):
00269         self.conn = conn
00270         self.cursor = conn.cursor()
00271         self.dbutils = dbutils


Member Function Documentation

def BioSQL.BioSeqDatabase.Adaptor.autocommit (   self,
  y = True 
)
Set the autocommit mode. True values enable; False value disable.

Definition at line 275 of file BioSeqDatabase.py.

00275 
00276     def autocommit(self, y=True):
00277         """Set the autocommit mode. True values enable; False value disable."""
00278         return self.dbutils.autocommit(self.conn, y)

Close the connection. No further activity possible.

Definition at line 287 of file BioSeqDatabase.py.

00287 
00288     def close(self):
00289         """Close the connection. No further activity possible."""
00290         return self.conn.close()

Here is the caller graph for this function:

Commits the current transaction.

Definition at line 279 of file BioSeqDatabase.py.

00279 
00280     def commit(self):
00281         """Commits the current transaction."""
00282         return self.conn.commit()

Definition at line 291 of file BioSeqDatabase.py.

00291 
00292     def fetch_dbid_by_dbname(self, dbname):
00293         self.execute(
00294             r"select biodatabase_id from biodatabase where name = %s",
00295             (dbname,))
00296         rv = self.cursor.fetchall()
00297         if not rv:
00298             raise KeyError("Cannot find biodatabase with name %r" % dbname)
        # Cannot happen (UK)

Here is the call graph for this function:

def BioSQL.BioSeqDatabase.Adaptor.last_id (   self,
  table 
)

Definition at line 272 of file BioSeqDatabase.py.

00272 
00273     def last_id(self, table):
00274         return self.dbutils.last_id(self.cursor, table)

Rolls backs the current transaction.

Definition at line 283 of file BioSeqDatabase.py.

00283 
00284     def rollback(self):
00285         """Rolls backs the current transaction."""
00286         return self.conn.rollback()


Member Data Documentation

Definition at line 268 of file BioSeqDatabase.py.

Definition at line 269 of file BioSeqDatabase.py.

Definition at line 270 of file BioSeqDatabase.py.


The documentation for this class was generated from the following file: