/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 | Static Private Attributes
Scraper::base::utils::DropCreateLoad Class Reference

List of all members.

Public Member Functions

def __call__

Static Private Attributes

string _drop = "echo drop database %(database)s | mysql --no-defaults --host=%(host)s --user=%(user)s --password=%(password)s "
string _create = "echo create database %(database)s | mysql --no-defaults --host=%(host)s --user=%(user)s --password=%(password)s "
string _load = "cat %(dumppath)s | mysql --no-defaults --host=%(host)s --user=%(user)s --password=%(password)s %(database)s "

Detailed Description

Calling this class will drop/create/load a database from a mysqldump file

Definition at line 69 of file utils.py.


Member Function Documentation

def Scraper::base::utils::DropCreateLoad::__call__ (   self)

Definition at line 77 of file utils.py.

00078                       :
00079         dumppath = os.path.expanduser(self['dumppath'])
00080         assert os.path.exists(dumppath), dumppath
00081         self['dumppath'] = dumppath
00082         for _cmd in [self._drop, self._create, self._load ]: 
00083             cmd = _cmd % self
00084             print os.popen( cmd  ).read(),
00085 


Member Data Documentation

string Scraper::base::utils::DropCreateLoad::_drop = "echo drop database %(database)s | mysql --no-defaults --host=%(host)s --user=%(user)s --password=%(password)s " [static, private]

Definition at line 73 of file utils.py.

string Scraper::base::utils::DropCreateLoad::_create = "echo create database %(database)s | mysql --no-defaults --host=%(host)s --user=%(user)s --password=%(password)s " [static, private]

Definition at line 74 of file utils.py.

string Scraper::base::utils::DropCreateLoad::_load = "cat %(dumppath)s | mysql --no-defaults --host=%(host)s --user=%(user)s --password=%(password)s %(database)s " [static, private]

Definition at line 75 of file utils.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:50:03 for Scraper by doxygen 1.7.4