| 1305 | } |
| 1306 | |
| 1307 | bool WizIndex::insertDocumentTag(WIZDOCUMENTDATA& data, |
| 1308 | const CString& strTagGUID, |
| 1309 | bool bReset /* = true */) |
| 1310 | { |
| 1311 | if (strTagGUID.isEmpty()) { |
| 1312 | TOLOG("NULL Pointer or empty tag guid: insert into wiz_document_tag,!"); |
| 1313 | return false; |
| 1314 | } |
| 1315 | |
| 1316 | CString strFormat = formatInsertSQLFormat(TABLE_NAME_WIZ_DOCUMENT_TAG, |
| 1317 | FIELD_LIST_WIZ_DOCUMENT_TAG, |
| 1318 | PARAM_LIST_WIZ_DOCUMENT_TAG); |
| 1319 | |
| 1320 | CString strSQL; |
| 1321 | strSQL.format(strFormat, |
| 1322 | STR2SQL(data.strGUID).utf16(), |
| 1323 | STR2SQL(strTagGUID).utf16() |
| 1324 | ); |
| 1325 | |
| 1326 | if (!execSQL(strSQL)) |
| 1327 | return false; |
| 1328 | |
| 1329 | bool bRet = true; |
| 1330 | if (bReset) |
| 1331 | bRet = updateDocumentInfoMD5(data); |
| 1332 | |
| 1333 | Q_EMIT documentTagModified(data); |
| 1334 | |
| 1335 | return bRet; |
| 1336 | } |
| 1337 | |
| 1338 | bool WizIndex::deleteDocumentTag(WIZDOCUMENTDATA& data, const CString& strTagGUID) |
| 1339 | { |