개정판 47ce8e9c
issue #501: symbol db size update
DTI_PID/DTI_PID/AppDocData.py | ||
---|---|---|
439 | 439 |
conn = sqlite3.connect(dbPath) |
440 | 440 |
|
441 | 441 |
INSERT_SYMBOL_SQL = ''' |
442 |
INSERT INTO Symbol(name, type, threshold, minMatchPoint, isDetectOrigin, rotationCount, ocrOption, isContainChild, originalPoint, connectionPoint, baseSymbol, additionalSymbol, isExceptDetect, hasInstrumentLabel) |
|
443 |
VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); |
|
442 |
INSERT INTO Symbol(name, type, threshold, minMatchPoint, isDetectOrigin, rotationCount, ocrOption, isContainChild, originalPoint, connectionPoint, baseSymbol, additionalSymbol, isExceptDetect, hasInstrumentLabel, width, height)
|
|
443 |
VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
|
|
444 | 444 |
''' |
445 | 445 |
|
446 | 446 |
cursor = conn.cursor() |
... | ... | |
448 | 448 |
, symbol.getMinMatchCount(), symbol.getIsDetectOnOrigin(), symbol.getRotationCount() |
449 | 449 |
, symbol.getOcrOption(), symbol.getIsContainChild() |
450 | 450 |
, symbol.getOriginalPoint(), symbol.getConnectionPoint() |
451 |
, symbol.getBaseSymbol(), symbol.getAdditionalSymbol(), symbol.getIsExceptDetect(), symbol.getHasInstrumentLabel()) |
|
451 |
, symbol.getBaseSymbol(), symbol.getAdditionalSymbol(), symbol.getIsExceptDetect(), symbol.getHasInstrumentLabel() |
|
452 |
, symbol.width, symbol.height) |
|
452 | 453 |
cursor.execute(INSERT_SYMBOL_SQL, query) |
453 | 454 |
conn.commit() |
454 | 455 |
isAdded = True |
... | ... | |
477 | 478 |
SET |
478 | 479 |
name = ?, type = ?, threshold = ?, minMatchPoint = ?, isDetectOrigin = ?, |
479 | 480 |
rotationCount = ?, ocrOption = ?, isContainChild = ?, originalPoint = ?, connectionPoint = ?, |
480 |
baseSymbol = ?, additionalSymbol = ?, isExceptDetect = ?, hasInstrumentLabel = ? |
|
481 |
baseSymbol = ?, additionalSymbol = ?, isExceptDetect = ?, hasInstrumentLabel = ?, width = ?, height = ?
|
|
481 | 482 |
WHERE uid = ? |
482 | 483 |
''' |
483 | 484 |
|
... | ... | |
486 | 487 |
, symbol.getMinMatchCount(), symbol.getIsDetectOnOrigin(), symbol.getRotationCount() |
487 | 488 |
, symbol.getOcrOption(), symbol.getIsContainChild() |
488 | 489 |
, symbol.getOriginalPoint(), symbol.getConnectionPoint() |
489 |
, symbol.getBaseSymbol(), symbol.getAdditionalSymbol(), symbol.getIsExceptDetect(), symbol.getHasInstrumentLabel(), symbol.getUid()) |
|
490 |
, symbol.getBaseSymbol(), symbol.getAdditionalSymbol(), symbol.getIsExceptDetect(), symbol.getHasInstrumentLabel(), symbol.width, symbol.height, symbol.getUid())
|
|
490 | 491 |
cursor.execute(UPDATE_SYMBOL_SQL, query) |
491 | 492 |
conn.commit() |
492 | 493 |
isUpdated = True |
내보내기 Unified diff