int CatalogManager::creatTable(string tableName, int attrNum, string *attrName, int* attrType){ int id = bufferManager->newPage(); page* thisPage = bufferManager->findPage(id); string content = ""; char temp[64]; sprintf(temp,"%d",id); string pageID(temp); content= "[{\"TableName\": \"" + tableName+"\",\"pageID\": \"" + pageID+"\"}]"; jsonReader.parse(content,jsonContent); for (int i = 0; i < attrNum; i++){ char* newNumber; sprintf(newNumber,"%d",attrType[i]); char* index; sprintf(index,"%d",i); if ((attrType[i]>=10)&&(attrType[i]<20)){ sprintf(temp,"%d",i); string pkPosition(temp); jsonContent.append("{\"AttrName\": \"" + attrName[i]+"\",\"AttrType\": \"" + newNumber+"\",\"PrimaryKey\": \"" + pkPosition+"\",\"index\": \"" + string(index)+"\"}"); newIndex(tableName, attrName[i], attrName[i]); }else jsonContent.append("{\"AttrName\": \"" + attrName[i]+"\",\"AttrType\": \"" + newNumber+"\",\"index\": \"" + string(index)+"\"}"); } save(id); return id; }
void WebPageProxy::sendApplicationSchemeReply(const QQuickNetworkReply* reply) { #if HAVE(QTQUICK) RefPtr<QtRefCountedNetworkRequestData> requestData = reply->networkRequestData(); if (m_applicationSchemeRequests.contains(requestData)) { RefPtr<QtRefCountedNetworkReplyData> replyData = reply->networkReplyData(); process()->send(Messages::WebPage::ApplicationSchemeReply(replyData->data()), pageID()); m_applicationSchemeRequests.remove(requestData); } #endif }