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

Method SetIndex

src/codec/schema_codec.h:111–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109 }
110
111 static void SetIndex(::fedb::common::ColumnKey* index, const std::string& name, const std::string& col_name,
112 const std::string& ts_name, ::fedb::type::TTLType ttl_type, uint64_t abs_ttl, uint64_t lat_ttl) {
113 index->set_index_name(name);
114 std::vector<std::string> parts;
115 boost::split(parts, col_name, boost::is_any_of("|"));
116 for (const auto& col : parts) {
117 index->add_col_name(col);
118 }
119 if (!ts_name.empty()) {
120 index->set_ts_name(ts_name);
121 }
122 auto ttl = index->mutable_ttl();
123 ttl->set_ttl_type(ttl_type);
124 ttl->set_abs_ttl(abs_ttl);
125 ttl->set_lat_ttl(lat_ttl);
126 }
127
128 static ::fedb::codec::ColType ConvertType(const std::string& raw_type) {
129 ::fedb::codec::ColType type;

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected