Added option --search to work in conjunction with -D (done), -T (soon) or -C (replaces --dump -C) - See #190:

* --search -D foobar: searches all database names like the ones provided
* --search -T foobar: searches all databases' table names like the ones provided (soon)
* --search -C foobar: replaces --dump -C
This commit is contained in:
Bernardo Damele
2010-05-07 13:40:57 +00:00
parent 7b6050f3c1
commit 65a05452f7
13 changed files with 516 additions and 338 deletions

View File

@@ -1006,7 +1006,7 @@ def normalizePath(path):
return retVal
def safeStringFormat(formatStr, params):
retVal = formatStr.replace('%d', '%s')
retVal = formatStr.replace("%d", "%s")
if isinstance(params, str):
retVal = retVal.replace("%s", params)
@@ -1015,7 +1015,7 @@ def safeStringFormat(formatStr, params):
index = 0
while index != -1:
index = retVal.find('%s')
index = retVal.find("%s")
if index != -1:
if count < len(params):

View File

@@ -96,6 +96,7 @@ optDict = {
"getColumns": "boolean",
"dumpTable": "boolean",
"dumpAll": "boolean",
"search": "boolean",
"user": "string",
"db": "string",
"tbl": "string",