| 267 | } |
| 268 | |
| 269 | static 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 |