/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Properties | Static Private Attributes
DybPython::dbcmd::MySQLLoad Class Reference
Inheritance diagram for DybPython::dbcmd::MySQLLoad:
Inheritance graph
[legend]
Collaboration diagram for DybPython::dbcmd::MySQLLoad:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __call__
def __str__
def __call__

Properties

 exepath = property( _exepath )
 cmd = property( lambda self:self._cmd % self )
 cmd_nopw = property( lambda self:self._cmd % dict(self, password="***") )

Static Private Attributes

list _exenames = ['mysql','mysql5']
string _cmd = "cat %(path)s | %(exepath)s --no-defaults --host=%(host)s --user=%(user)s --password=%(password)s %(database)s "

Detailed Description

Wrapper around sql loading commandline that hooks up to the 
config parameters from the :file:`~/.my.cnf` 

Definition at line 77 of file dbcmd.py.


Member Function Documentation

def DybPython::dbcmd::MySQLLoad::__call__ (   self,
  path,
  verbose = True 
)
Arguments are used to update the tables list and dumppath 

Definition at line 85 of file dbcmd.py.

00086                                            :
00087         """Arguments are used to update the tables list and dumppath """
00088         assert os.path.exists(path),  "MySQLLoad ERROR no mysqldump file at %s " % path
00089         assert self['database'].startswith('tmp_'), "MySQLLoad error invalid database name %r " % self 
00090         self['path']=path 
00091         return CommandLine.__call__(self, verbose=verbose) 
00092 

def DybPython::dbcmd::CommandLine::__str__ (   self) [inherited]

Definition at line 30 of file dbcmd.py.

00031                      :
00032         return "%s %s " % (self.__class__.__name__, self.cmd_nopw )

def DybPython::dbcmd::CommandLine::__call__ (   self,
  kwa 
) [inherited]

Definition at line 33 of file dbcmd.py.

00034                              :
00035         verbose = kwa.pop('verbose', False)
00036         self.update(kwa)
00037         if verbose:
00038             log.info(self)
00039         else:
00040             log.debug(self)
00041         return os.popen(self.cmd).read()        


Member Data Documentation

list DybPython::dbcmd::MySQLLoad::_exenames = ['mysql','mysql5'] [static, private]

Definition at line 82 of file dbcmd.py.

string DybPython::dbcmd::MySQLLoad::_cmd = "cat %(path)s | %(exepath)s --no-defaults --host=%(host)s --user=%(user)s --password=%(password)s %(database)s " [static, private]

Definition at line 83 of file dbcmd.py.


Property Documentation

DybPython::dbcmd::CommandLine::exepath = property( _exepath ) [static, inherited]

Definition at line 18 of file dbcmd.py.

DybPython::dbcmd::CommandLine::cmd = property( lambda self:self._cmd % self ) [static, inherited]

Definition at line 19 of file dbcmd.py.

DybPython::dbcmd::CommandLine::cmd_nopw = property( lambda self:self._cmd % dict(self, password="***") ) [static, inherited]

Definition at line 20 of file dbcmd.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:55:40 for DybPython by doxygen 1.7.4