void PhpResultGenerator::generateAtom (StringBuffer& output, string const& value) const { output.appendText("s:"); output.appendInteger(value.size()); output.appendText(":\""); output.appendText(value); output.appendText("\";"); }
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; }
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("\";"); } }
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("\";"); } }
void VariantInt64::print (StringBuffer& buffer, size_t) const { buffer.appendText("(int64) "); buffer.appendInteger(getValue()); buffer.appendEol(); }
void PhpResultGenerator::generateAtom (StringBuffer& output, uint64_t value) const { output.appendText("i:"); output.appendInteger(value); output.appendText(";"); }
void JsonXResultGenerator::generateAtom (StringBuffer& output, uint64_t value) const { output.appendChar('U'); output.appendInteger(value); output.appendChar('L'); }
void XmlResultGenerator::generateAtom (StringBuffer& output, uint64_t value) const { output.appendInteger(value); }
void JsonResultGenerator::generateAtom (StringBuffer& output, int32_t value) const { output.appendInteger(value); }