diff --git a/.gitignore b/.gitignore index 8a3449da..81c7c8ba 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ -DSP_Lib_TestSuite/build/ \ No newline at end of file +DSP_Lib_TestSuite/build/ +PythonWrapper/build/ +PythonWrapper/cmsisdsp.cp36-win_amd64.pyd +PythonWrapper/rec_2.dat \ No newline at end of file diff --git a/Testing/addToDB.py b/Testing/addToDB.py index 0ef54b43..ea4c9715 100755 --- a/Testing/addToDB.py +++ b/Testing/addToDB.py @@ -77,7 +77,9 @@ def createTableIfMissing(conn,elem,tableName,full): cols = list(full.columns) params = list(joinit(elem.params.full,",")) common = diff(cols + ["TYPE"] , ['OLDID'] + params) - start = "" + + sql += "%sid INTEGER PRIMARY KEY" % (tableName) + start = "," for field in params: sql += " %s\n %s INTEGER" % (start,field) @@ -148,9 +150,18 @@ def addRows(conn,elem,tableName,full): cols = list(full.columns) params = list(joinit(elem.params.full,",")) common = diff(["TYPE"] + cols , ['OLDID'] + params) + colNameList = [] + for c in params + keep: + if c in MKKEYFIELD: + colNameList.append(MKKEYFIELDID[c]) + else: + colNameList.append(c) + colNames = "".join(joinit(colNameList,",")) + #print(colNameList) + #print(colNames) #print(full) for index, row in full.iterrows(): - sql = "INSERT INTO %s VALUES(" % tableName + sql = "INSERT INTO %s(%s) VALUES(" % (tableName,colNames) keys = {} # Get data from columns diff --git a/Testing/bench.db b/Testing/bench.db index 2654de0e..25570985 100755 Binary files a/Testing/bench.db and b/Testing/bench.db differ