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

Function vector_from_json

src/sqlite-vector.cpp:269–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267}
268
269static void vector_from_json(sqlite3_context *context,
270 int argc,
271 sqlite3_value **argv) {
272
273 const char *text = (const char *)sqlite3_value_text(argv[0]);
274 vec_ptr pVec = vectorFromTextValue(argv[0]);
275
276 if (pVec == nullptr) {
277 sqlite3_result_error(
278 context, "input not valid json, or contains non-float data", -1);
279 } else {
280 resultVector(context, pVec.get());
281 }
282}
283
284#pragma endregion
285

Callers 1

test_vector_from_jsonMethod · 0.85

Calls 2

vectorFromTextValueFunction · 0.85
resultVectorFunction · 0.85

Tested by 1

test_vector_from_jsonMethod · 0.68