Package install :: Package MoSTBioDat :: Package DataBase :: Package Scheme :: Module MoSTBioDatScheme :: Class MoSTBioDatScheme
[hide private]
[frames] | no frames]

Class MoSTBioDatScheme

source code

                                           object --+    
                                                    |    
MoSTBioDat.DataBase.Connect.MoSTBioDatDB.MoSTBioDatDB --+
                                                        |
                                                       MoSTBioDatScheme


INPUT:
   host - string, host to connect
   user - string, user to connect as
   passwd - string, password to use
   db - string, database to use
   port - integer, TCP/IP port to connect to
   unix_socket - string, location of unix_socket to use
   conv - conversion dictionary, see MySQLdb.converters
   connect_timeout - number of seconds to wait before the connection attempt fails.
   compress - if set, compression is enabled
   named_pipe - if set, a named pipe is used to connect (Windows only)
   init_command - command which is run once the connection is created
   read_default_file - file from which default client values are read
   read_default_group -  configuration group to use from the default file
   cursorclass - class object, used to create cursors (keyword only)
   use_unicode - if True, text-like columns are returned as unicode objects
                 using the connection's character set.  Otherwise, text-like
                 columns are returned as strings.  columns are returned as
                 normal strings. Unicode objects will always be encoded to
                 the connection's character set regardless of this setting.
   charset - if supplied, the connection character set will be changed
                 to this character set (MySQL-4.1 and newer). This implies
                 use_unicode=True.
   sql_mode - if supplied, the session SQL mode will be changed to this
              setting (MySQL-4.1 and newer). For more details and legal
              values, see the MySQL documentation.  
   client_flag -  integer, flags to use or 0
                  (see MySQL docs or constants/CLIENTS.py)
   ssl - dictionary or mapping, contains SSL connection parameters;
         see the MySQL documentation for more details
         (mysql_ssl_set()).  If this is set, and the client does not
         support SSL, NotSupportedError will be raised.
   local_infile - integer, non-zero enables LOAD LOCAL INFILE; zero disables
   format - string format for log handler
   filter - filter object from logger object
   datefmt - data/time format
   path - directory path to log file
   filename - log filename, default log
   filemode - mode to open log file, default='a'
   level - set root logger level to specified level
   logfilelevel- set level to log file
   cache - create cache for query, default=True
   scheme2file - Boolean - save database scheme to shelve file
   log - log flag, boolean default=False
   OUTPUT:
   class object 

Instance Methods [hide private]
 
__init__(self, host='localhost', db='', user=None, passwd=None, port=3306, scheme2file=True, log=False, **kwargs)
INPUT: host - string, host to connect user - string, user to connect as passwd - string, password to use db - string, database to use port - integer, TCP/IP port to connect to unix_socket - string, location of unix_socket to use conv - conversion dictionary, see MySQLdb.converters connect_timeout - number of seconds to wait before the connection attempt fails.
source code
 
executeQuery(self, query)
execute SQL query INPUT: SQL query - str OUTPUT: list of cursor dictionary
source code
 
lastInsID(self)
last inserted ID INPUT: class object OUTPUT: lastID - int, last inserted ID
source code
 
geTables(self)
get database tables INPUT: class object OUTPUT: cursor dictionary with table name
source code
 
geTablesDesc(self, **kwarg)
get tables description INPUT: temporary - str - filename path to temporary directory, default /tmp/SchemeDB schemepath - str - path to scheme directory, default /tmp/SchemeDB schemefilename - str - scheme filename, default dbsheme protocol - int - shelve protocol, default highest -1
source code
 
geTableDesc(self, tablename=None, **kwarg)
get table description INPUT: temporary - str - filename path to temporary directory, default /tmp/SchemeDB schemepath - str - path to scheme directory, default /tmp/SchemeDB schemefilename - str - scheme filename, default dbsheme protocol - int - shelve protocol, default highest -1
source code
 
createdict(self)
create dictionary INPUT: class object OUTPUT: path to dictionary
source code

Inherited from MoSTBioDat.DataBase.Connect.MoSTBioDatDB.MoSTBioDatDB: __repr__, autocommit, closeDB, commit, connectDB, displayStatus, executeFileQuery, getClientInfo, getConnectPort, isDB, lockTable, rollback, starTransaction, unlockTables

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Static Methods [hide private]

Inherited from MoSTBioDat.DataBase.Connect.MoSTBioDatDB.MoSTBioDatDB: getNumberConnect

Class Variables [hide private]

Inherited from MoSTBioDat.DataBase.Connect.MoSTBioDatDB.MoSTBioDatDB: db, host, numberConn, port

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, host='localhost', db='', user=None, passwd=None, port=3306, scheme2file=True, log=False, **kwargs)
(Constructor)

source code 

INPUT:
host - string, host to connect
user - string, user to connect as
passwd - string, password to use
db - string, database to use
port - integer, TCP/IP port to connect to
unix_socket - string, location of unix_socket to use
conv - conversion dictionary, see MySQLdb.converters
connect_timeout - number of seconds to wait before the connection attempt fails.
compress - if set, compression is enabled
named_pipe - if set, a named pipe is used to connect (Windows only)
init_command - command which is run once the connection is created
read_default_file - file from which default client values are read
read_default_group -  configuration group to use from the default file
cursorclass - class object, used to create cursors (keyword only)
use_unicode - if True, text-like columns are returned as unicode objects
              using the connection's character set.  Otherwise, text-like
              columns are returned as strings.  columns are returned as
              normal strings. Unicode objects will always be encoded to
              the connection's character set regardless of this setting.
charset - if supplied, the connection character set will be changed
              to this character set (MySQL-4.1 and newer). This implies
              use_unicode=True.
sql_mode - if supplied, the session SQL mode will be changed to this
           setting (MySQL-4.1 and newer). For more details and legal
           values, see the MySQL documentation.  
client_flag -  integer, flags to use or 0
               (see MySQL docs or constants/CLIENTS.py)
ssl - dictionary or mapping, contains SSL connection parameters;
      see the MySQL documentation for more details
      (mysql_ssl_set()).  If this is set, and the client does not
      support SSL, NotSupportedError will be raised.
local_infile - integer, non-zero enables LOAD LOCAL INFILE; zero disables
format - string format for log handler
filter - filter object from logger object
datefmt - data/time format
path - directory path to log file
filename - log filename, default log
filemode - mode to open log file, default='a'
level - set root logger level to specified level
logfilelevel- set level to log file
OUTPUT:
class object 

Overrides: object.__init__
(inherited documentation)

executeQuery(self, query)

source code 

execute SQL query INPUT: SQL query - str OUTPUT: list of cursor dictionary

Overrides: MoSTBioDat.DataBase.Connect.MoSTBioDatDB.MoSTBioDatDB.executeQuery