当前位置: 首页>>代码示例>>C++>>正文


C++ CppSQLite3Query::getTimeField方法代码示例

本文整理汇总了C++中CppSQLite3Query::getTimeField方法的典型用法代码示例。如果您正苦于以下问题:C++ CppSQLite3Query::getTimeField方法的具体用法?C++ CppSQLite3Query::getTimeField怎么用?C++ CppSQLite3Query::getTimeField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CppSQLite3Query的用法示例。


在下文中一共展示了CppSQLite3Query::getTimeField方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SQLToDocumentAttachmentDataArray

bool CWizIndexBase::SQLToDocumentAttachmentDataArray(const CString& strSQL,
                                                     CWizDocumentAttachmentDataArray& arrayAttachment)
{
    try
    {
        CppSQLite3Query query = m_db.execQuery(strSQL);
        while (!query.eof())
        {
            WIZDOCUMENTATTACHMENTDATA data;
            data.strKbGUID = kbGUID();
            data.strGUID = query.getStringField(documentattachmentATTACHMENT_GUID);
            data.strDocumentGUID = query.getStringField(documentattachmentDOCUMENT_GUID);
            data.strName = query.getStringField(documentattachmentATTACHMENT_NAME);
            data.strURL = query.getStringField(documentattachmentATTACHMENT_URL);
            data.strDescription = query.getStringField(documentattachmentATTACHMENT_DESCRIPTION);
            data.tInfoModified = query.getTimeField(documentattachmentDT_INFO_MODIFIED);
            data.strInfoMD5 = query.getStringField(documentattachmentATTACHMENT_INFO_MD5);
            data.tDataModified = query.getTimeField(documentattachmentDT_DATA_MODIFIED);
            data.strDataMD5 = query.getStringField(documentattachmentATTACHMENT_DATA_MD5);
            data.nVersion = query.getInt64Field(documentattachmentVersion);

            arrayAttachment.push_back(data);
            query.nextRow();
        }

        std::sort(arrayAttachment.begin(), arrayAttachment.end());
        return true;
    }
    catch (const CppSQLite3Exception& e)
    {
        return LogSQLException(e, strSQL);
    }
}
开发者ID:flyfire,项目名称:WizQTClient,代码行数:33,代码来源:wizIndexBase.cpp

示例2: SQLToDocumentDataArray

bool CWizIndexBase::SQLToDocumentDataArray(const CString& strSQL, CWizDocumentDataArray& arrayDocument)
{
    try
    {
        CppSQLite3Query query = m_db.execQuery(strSQL);
        CWizStdStringArray arrayGUID;
        std::map<CString, int> mapDocumentIndex;
        while (!query.eof())
        {
            WIZDOCUMENTDATA data;
            data.strKbGUID = kbGUID();
            data.strGUID = query.getStringField(documentDOCUMENT_GUID);
            data.strTitle = query.getStringField(documentDOCUMENT_TITLE);
            data.strLocation = query.getStringField(documentDOCUMENT_LOCATION);
            data.strName = query.getStringField(documentDOCUMENT_NAME);
            data.strSEO = query.getStringField(documentDOCUMENT_SEO);
            data.strURL = query.getStringField(documentDOCUMENT_URL);
            data.strAuthor = query.getStringField(documentDOCUMENT_AUTHOR);
            data.strKeywords = query.getStringField(documentDOCUMENT_KEYWORDS);
            data.strType = query.getStringField(documentDOCUMENT_TYPE);
            data.strOwner = query.getStringField(documentDOCUMENT_OWNER);
            data.strFileType = query.getStringField(documentDOCUMENT_FILE_TYPE);
            data.strStyleGUID = query.getStringField(documentSTYLE_GUID);
            data.tCreated = query.getTimeField(documentDT_CREATED);
            data.tModified = query.getTimeField(documentDT_MODIFIED);
            data.tAccessed = query.getTimeField(documentDT_ACCESSED);
            data.nIconIndex = query.getIntField(documentDOCUMENT_ICON_INDEX);
            data.nSync = query.getIntField(documentDOCUMENT_SYNC);
            data.nProtected = query.getIntField(documentDOCUMENT_PROTECT);
            data.nReadCount = query.getIntField(documentDOCUMENT_READ_COUNT);
            data.nAttachmentCount = query.getIntField(documentDOCUMENT_ATTACHEMENT_COUNT);
            data.nIndexed = query.getIntField(documentDOCUMENT_INDEXED);
            data.tInfoModified = query.getTimeField(documentDT_INFO_MODIFIED);
            data.strInfoMD5 = query.getStringField(documentDOCUMENT_INFO_MD5);
            data.tDataModified = query.getTimeField(documentDT_DATA_MODIFIED);
            data.strDataMD5 = query.getStringField(documentDOCUMENT_DATA_MD5);
            data.tParamModified = query.getTimeField(documentDT_PARAM_MODIFIED);
            data.strParamMD5 = query.getStringField(documentDOCUMENT_PARAM_MD5);
            data.nVersion = query.getInt64Field(documentVersion);

            arrayGUID.push_back(data.strGUID);
            arrayDocument.push_back(data);
            mapDocumentIndex[data.strGUID] = int(arrayDocument.size() - 1);
            query.nextRow();
        }

        if (!arrayGUID.empty()) {
            InitDocumentExFields(arrayDocument, arrayGUID, mapDocumentIndex);
        }

        return true;
    }
    catch (const CppSQLite3Exception& e)
    {
        return LogSQLException(e, strSQL);
    }
}
开发者ID:flyfire,项目名称:WizQTClient,代码行数:57,代码来源:wizIndexBase.cpp

示例3: SQLToStyleDataArray

bool CWizIndexBase::SQLToStyleDataArray(const CString& strSQL, CWizStyleDataArray& arrayStyle)
{
    try
    {
        CppSQLite3Query query = m_db.execQuery(strSQL);
        while (!query.eof())
        {
            WIZSTYLEDATA data;
            data.strKbGUID = kbGUID();
            data.strGUID = query.getStringField(styleSTYLE_GUID);
            data.strName = query.getStringField(styleSTYLE_NAME);
            data.strDescription = query.getStringField(styleSTYLE_DESCRIPTION);
            data.crTextColor = query.getColorField(styleSTYLE_TEXT_COLOR);
            data.crBackColor = query.getColorField(styleSTYLE_BACK_COLOR);
            data.bTextBold = query.getBoolField(styleSTYLE_TEXT_BOLD);
            data.nFlagIndex = query.getIntField(styleSTYLE_FLAG_INDEX);
            data.tModified = query.getTimeField(styleDT_MODIFIED);
            data.nVersion = query.getInt64Field(styleVersion);

            arrayStyle.push_back(data);
            query.nextRow();
        }

        std::sort(arrayStyle.begin(), arrayStyle.end());
        return true;
    }
    catch (const CppSQLite3Exception& e)
    {
        return LogSQLException(e, strSQL);
    }
}
开发者ID:flyfire,项目名称:WizQTClient,代码行数:31,代码来源:wizIndexBase.cpp

示例4: SQLToTagDataArray

bool CWizIndexBase::SQLToTagDataArray(const CString& strSQL, CWizTagDataArray& arrayTag)
{
    try
    {
        CppSQLite3Query query = m_db.execQuery(strSQL);
        while (!query.eof())
        {
            WIZTAGDATA data;
            data.strKbGUID = kbGUID();
            data.strGUID = query.getStringField(tagTAG_GUID);
            data.strParentGUID = query.getStringField(tagTAG_GROUP_GUID);
            data.strName = query.getStringField(tagTAG_NAME);
            data.strDescription = query.getStringField(tagTAG_DESCRIPTION);
            data.tModified = query.getTimeField(tagDT_MODIFIED);
            data.nVersion = query.getInt64Field(tagVersion);

            arrayTag.push_back(data);
            query.nextRow();
        }

        std::sort(arrayTag.begin(), arrayTag.end());
        return true;
    }
    catch (const CppSQLite3Exception& e)
    {
        return LogSQLException(e, strSQL);
    }
}
开发者ID:flyfire,项目名称:WizQTClient,代码行数:28,代码来源:wizIndexBase.cpp

示例5: SQLToDeletedGUIDDataArray

bool CWizIndexBase::SQLToDeletedGUIDDataArray(const CString& strSQL, CWizDeletedGUIDDataArray& arrayGUID)
{
    try
    {
        CppSQLite3Query query = m_db.execQuery(strSQL);
        while (!query.eof())
        {
            WIZDELETEDGUIDDATA data;
            data.strKbGUID = kbGUID();
            data.strGUID = query.getStringField(deletedguidDELETED_GUID);
            data.eType = WIZOBJECTDATA::IntToObjectType(query.getIntField(deletedguidGUID_TYPE));
            data.tDeleted = query.getTimeField(deletedguidDT_DELETED);

            arrayGUID.push_back(data);
            query.nextRow();
        }
        return true;
    }
    catch (const CppSQLite3Exception& e)
    {
        return LogSQLException(e, strSQL);
    }
}
开发者ID:flyfire,项目名称:WizQTClient,代码行数:23,代码来源:wizIndexBase.cpp

示例6: SQLToMessageDataArray

bool CWizIndexBase::SQLToMessageDataArray(const QString& strSQL,
                                          CWizMessageDataArray& arrayMessage)
{
    try
    {
        CppSQLite3Query query = m_db.execQuery(strSQL);
        while (!query.eof())
        {
            WIZMESSAGEDATA data;
            data.nId = query.getInt64Field(msgMESSAGE_ID);
            data.bizGUID = query.getStringField(msgBIZ_GUID);
            data.kbGUID = query.getStringField(msgKB_GUID);
            data.documentGUID = query.getStringField(msgDOCUMENT_GUID);
            data.senderAlias = query.getStringField(msgSENDER);
            data.senderId = query.getStringField(msgSENDER_ID);
            data.senderGUID = query.getStringField(msgSENDER_GUID);
            data.receiverAlias = query.getStringField(msgRECEIVER);
            data.receiverId = query.getStringField(msgRECEIVER_ID);
            data.receiverGUID = query.getStringField(msgRECEIVER_GUID);
            data.nMessageType = query.getIntField(msgMESSAGE_TYPE);
            data.nReadStatus = query.getIntField(msgREAD_STATUS);
            data.tCreated = query.getTimeField(msgDT_CREATED);
            data.title = query.getStringField(msgMESSAGE_TITLE);
            data.messageBody = query.getStringField(msgMESSAGE_TEXT);
            data.nVersion = query.getInt64Field(msgWIZ_VERSION);

            arrayMessage.push_back(data);
            query.nextRow();
        }

        return true;
    }
    catch (const CppSQLite3Exception& e)
    {
        return LogSQLException(e, strSQL);
    }
}
开发者ID:flyfire,项目名称:WizQTClient,代码行数:37,代码来源:wizIndexBase.cpp

示例7: SQLToMetaDataArray

bool CWizIndexBase::SQLToMetaDataArray(const CString& strSQL, CWizMetaDataArray& arrayMeta)
{
    try
    {
        CppSQLite3Query query = m_db.execQuery(strSQL);
        while (!query.eof())
        {
            WIZMETADATA data;
            data.strKbGUID = kbGUID();
            data.strName = query.getStringField(metaMETA_NAME);
            data.strKey = query.getStringField(metaMETA_KEY);
            data.strValue = query.getStringField(metaMETA_VALUE);
            data.tModified = query.getTimeField(metaDT_MODIFIED);

            arrayMeta.push_back(data);
            query.nextRow();
        }
        return true;
    }
    catch (const CppSQLite3Exception& e)
    {
        return LogSQLException(e, strSQL);
    }
}
开发者ID:flyfire,项目名称:WizQTClient,代码行数:24,代码来源:wizIndexBase.cpp


注:本文中的CppSQLite3Query::getTimeField方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。