Back to index

python-biopython  1.60
Public Member Functions | Public Attributes | Static Public Attributes
Bio.DocSQL.Insert Class Reference
Inheritance diagram for Bio.DocSQL.Insert:
Inheritance graph
[legend]
Collaboration diagram for Bio.DocSQL.Insert:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def cursor
def __iter__
def __repr__
def dump
def __getattr__
def __setattr__

Public Attributes

 total_count
 id
 message
 single_cursor
 connection
 diagnostics
 statement
 params

Static Public Attributes

string MSG_INTEGRITY_ERROR = "Couldn't insert: %s. "
int ignore_warnings = 0
string MSG_FAILURE = "Failure"
string MSG_SUCCESS = "Success"
string error_message = ""
string prefix = ""
string suffix = ""
 row_class = QueryRow

Detailed Description

Definition at line 179 of file DocSQL.py.


Constructor & Destructor Documentation

def Bio.DocSQL.Insert.__init__ (   self,
  args,
  keywds 
)

Reimplemented from Bio.DocSQL.Create.

Definition at line 182 of file DocSQL.py.

00182 
00183     def __init__(self, *args, **keywds):
00184         try:
00185             Create.__init__(self, *args, **keywds)
00186         except MySQLdb.IntegrityError, error_data:
00187             self.error_message += self.MSG_INTEGRITY_ERROR % error_data[1]
00188             try:
00189                 self.total_count
00190             except AttributeError:
00191                 self.total_count = 0
00192             
00193             raise MySQLdb.IntegrityError(self.error_message)
00194             
00195         self.id = self.cursor().insert_id()
00196         try:
00197             self.total_count += self.cursor().rowcount
00198         except AttributeError:
00199             self.total_count = self.cursor().rowcount
00200 
00201         if self.cursor().rowcount == 0:
00202             raise NoInsertionError

Here is the caller graph for this function:


Member Function Documentation

def Bio.DocSQL.QueryRow.__getattr__ (   self,
  name 
) [inherited]

Definition at line 63 of file DocSQL.py.

00063 
00064     def __getattr__(self, name):
00065         _check_is_public(name)
00066         try:
00067             return self[self._names_hash[name]]
00068         except (KeyError, AttributeError):
00069             raise AttributeError("'%s' object has no attribute '%s'" \
00070                                  % (self.__class__.__name__, name))

Here is the call graph for this function:

def Bio.DocSQL.Query.__iter__ (   self) [inherited]

Definition at line 109 of file DocSQL.py.

00109 
00110     def __iter__(self):
00111         return IterationCursor(self, self.connection)

Here is the caller graph for this function:

def Bio.DocSQL.Query.__repr__ (   self) [inherited]

Definition at line 112 of file DocSQL.py.

00112 
00113     def __repr__(self):
00114         return "%s(message=%s)" % (self.__class__.__name__, self.message)

def Bio.DocSQL.QueryRow.__setattr__ (   self,
  name,
  value 
) [inherited]

Definition at line 71 of file DocSQL.py.

00071 
00072     def __setattr__(self, name, value):
00073         try:
00074             self._names_hash
00075         except AttributeError:
00076             return object.__setattr__(self, name, value)
00077             
00078         _check_is_public(name)
00079         try:
00080             index = self._names_hash[name]
00081             self[index] = value
00082         except KeyError:
00083             return object.__setattr__(self, name, value)

Here is the call graph for this function:

def Bio.DocSQL.QuerySingle.cursor (   self) [inherited]

Reimplemented from Bio.DocSQL.Query.

Definition at line 154 of file DocSQL.py.

00154 
00155     def cursor(self):
00156         return self.single_cursor

def Bio.DocSQL.Query.dump (   self) [inherited]

Definition at line 118 of file DocSQL.py.

00118 
00119     def dump(self):
00120         for item in self:
00121             print item


Member Data Documentation

Definition at line 98 of file DocSQL.py.

Definition at line 102 of file DocSQL.py.

string Bio.DocSQL.Query.error_message = "" [static, inherited]

Definition at line 91 of file DocSQL.py.

Definition at line 194 of file DocSQL.py.

int Bio.DocSQL.QuerySingle.ignore_warnings = 0 [static, inherited]

Definition at line 142 of file DocSQL.py.

Reimplemented from Bio.DocSQL.Query.

Definition at line 174 of file DocSQL.py.

string Bio.DocSQL.Query.MSG_FAILURE = "Failure" [static, inherited]

Definition at line 88 of file DocSQL.py.

string Bio.DocSQL.Insert.MSG_INTEGRITY_ERROR = "Couldn't insert: %s. " [static]

Definition at line 180 of file DocSQL.py.

string Bio.DocSQL.Query.MSG_SUCCESS = "Success" [static, inherited]

Definition at line 89 of file DocSQL.py.

Definition at line 107 of file DocSQL.py.

string Bio.DocSQL.Query.prefix = "" [static, inherited]

Definition at line 92 of file DocSQL.py.

Bio.DocSQL.Query.row_class = QueryRow [static, inherited]

Definition at line 94 of file DocSQL.py.

Definition at line 147 of file DocSQL.py.

Reimplemented in Bio.DocSQL.QueryGeneric.

Definition at line 106 of file DocSQL.py.

string Bio.DocSQL.Query.suffix = "" [static, inherited]

Definition at line 93 of file DocSQL.py.

Definition at line 190 of file DocSQL.py.


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