MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / AppendFloat

Method AppendFloat

src/sdk/sql_request_row.cc:258–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256 return true;
257}
258bool SQLRequestRow::AppendFloat(float val) {
259 if (!Check(::hybridse::sdk::kTypeFloat)) return false;
260 int8_t* ptr = buf_ + offset_vec_[cnt_];
261 *(reinterpret_cast<float*>(ptr)) = val;
262 if (record_cols_.find(cnt_) != record_cols_.end()) {
263 record_value_.emplace(schema_->GetColumnName(cnt_), std::to_string(val));
264 }
265 cnt_++;
266 return true;
267}
268
269bool SQLRequestRow::AppendDouble(double val) {
270 if (!Check(::hybridse::sdk::kTypeDouble)) return false;

Callers

nothing calls this directly

Calls 1

to_stringFunction · 0.85

Tested by

no test coverage detected