예제 #1
0
 void PhpResultGenerator::generateAtom (StringBuffer& output, string const& value) const {
   output.appendText("s:");
   output.appendInteger(value.size());
   output.appendText(":\"");
   output.appendText(value);
   output.appendText("\";");
 }
예제 #2
0
파일: CubeWorker.cpp 프로젝트: Dalboz/molap
ResultStatus CubeWorker::setCellValue(const string& areaIdentifier, const string& sessionIdentifier, const IdentifiersType& path, double value, SplashMode splashMode, bool addValue)
{
	StringBuffer sb;

	sb.appendText("DOUBLE;");
	sb.appendInteger(dbid);
	sb.appendChar(';');
	sb.appendInteger(cubeid);
	sb.appendChar(';');
	sb.appendText(StringUtils::escapeString(areaIdentifier));
	sb.appendChar(';');
	sb.appendText(StringUtils::escapeString(sessionIdentifier));
	sb.appendChar(';');
	sb.appendText(buildPathString(&path));
	sb.appendChar(';');
	sb.appendDecimal(value);
	sb.appendChar(';');
	sb.appendInteger(PaloJob::splashNumber(splashMode));
	sb.appendChar(';');
	sb.appendInteger((int)addValue);

	// we need to change the job-type
	//    dispatcher->downgradeCurrentJobs();

	// send set-cell-value request to worker
	vector<string> result;

	ResultStatus status = execute(sb.c_str(), result);

	if (status != RESULT_OK) {
		return status;
	}

	if (isErrorStatus(result)) {
		throw WorkerException(result[0].substr(6), true);
	} else if (isExceptionStatus(result)) {
		throw WorkerException(result[0].substr(10), true);
	}

	numFailures = 0;
	return RESULT_OK;
}
예제 #3
0
 void PhpResultGenerator::generateAtom (StringBuffer& output, char const* value, size_t length, bool) const {
   if (value == 0) {
     output.appendText("N;");
   }
   else {
     output.appendText("s:");
     output.appendInteger(length);
     output.appendText(":\"");
     output.appendText(value, length);
     output.appendText("\";");
   }
 }
예제 #4
0
 void PhpResultGenerator::generateAtom (StringBuffer& output, char const* value) const {
   if (value == 0) {
     output.appendText("N;");
   }
   else {
     output.appendText("s:");
     output.appendInteger(strlen(value));
     output.appendText(":\"");
     output.appendText(value);
     output.appendText("\";");
   }
 }
예제 #5
0
void VariantInt64::print (StringBuffer& buffer, size_t) const {
    buffer.appendText("(int64) ");
    buffer.appendInteger(getValue());
    buffer.appendEol();
}
예제 #6
0
 void PhpResultGenerator::generateAtom (StringBuffer& output, uint64_t value) const {
   output.appendText("i:");
   output.appendInteger(value);
   output.appendText(";");
 }
예제 #7
0
 void JsonXResultGenerator::generateAtom (StringBuffer& output, uint64_t value) const {
   output.appendChar('U');
   output.appendInteger(value);
   output.appendChar('L');
 }
예제 #8
0
 void XmlResultGenerator::generateAtom (StringBuffer& output, uint64_t value) const {
   output.appendInteger(value);
 }
예제 #9
0
 void JsonResultGenerator::generateAtom (StringBuffer& output, int32_t value) const {
   output.appendInteger(value);
 }