MCPcopy Create free account
hub / github.com/asg017/sqlite-vss / vectorFromTextValue

Function vectorFromTextValue

src/sqlite-vector.cpp:98–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98vec_ptr vectorFromTextValue(sqlite3_value *value) {
99
100 try {
101
102 json json = json::parse(sqlite3_value_text(value));
103 vec_ptr pVec(new vector<float>());
104 json.get_to(*pVec);
105 return pVec;
106
107 } catch (const json::exception &) {
108 return nullptr;
109 }
110
111 return nullptr;
112}
113
114static vec_ptr valueAsVector(sqlite3_value *value) {
115

Callers 2

valueAsVectorFunction · 0.85
vector_from_jsonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected