Code refactoring

This commit is contained in:
Sergey Kalinin
2017-03-21 16:47:18 +03:00
parent 35093c29f5
commit f43e23ee6a
2 changed files with 176 additions and 284 deletions

4
dm.py
View File

@@ -134,7 +134,7 @@ def createTables(tbl_list):
i = i + 1
tbl_descr_list.append(one_Table_descr)
tbl_struct_list.append(one_Table_struct)
print(qwery_create)
#print(qwery_create)
#c.execute(qwery_create)
return tbl_names_list
@@ -180,7 +180,7 @@ def selectData(tbl):
subqwery = "(SELECT (" + field_replace + ") FROM " + subqwery +" WHERE "+ table1 + "." + field1 +"="+ tbl +"."+ field +") AS " + field
qwery = qwery.replace(field, subqwery)
qwery = qwery.rstrip(',') + " FROM " + tbl + " LIMIT 10000"
print(qwery)
#print(qwery)
c.execute(qwery)
return c.fetchall()