@@ -180,7 +180,7 @@ static int vectorParseSqliteText(
180
180
pzText ++ ;
181
181
182
182
if ( * pzText != '[' ){
183
- * pzErrMsg = sqlite3_mprintf ("invalid vector: must start with '['" );
183
+ * pzErrMsg = sqlite3_mprintf ("vector: must start with '['" );
184
184
goto error ;
185
185
}
186
186
pzText ++ ;
@@ -195,7 +195,7 @@ static int vectorParseSqliteText(
195
195
}
196
196
if ( this != ',' && this != ']' ){
197
197
if ( iBuf > MAX_FLOAT_CHAR_SZ ){
198
- * pzErrMsg = sqlite3_mprintf ("invalid vector: float string length exceeded %d characters: '%s'" , MAX_FLOAT_CHAR_SZ , valueBuf );
198
+ * pzErrMsg = sqlite3_mprintf ("vector: float string length exceeded %d characters: '%s'" , MAX_FLOAT_CHAR_SZ , valueBuf );
199
199
goto error ;
200
200
}
201
201
valueBuf [iBuf ++ ] = this ;
@@ -206,11 +206,11 @@ static int vectorParseSqliteText(
206
206
break ;
207
207
}
208
208
if ( sqlite3AtoF (valueBuf , & elem , iBuf , SQLITE_UTF8 ) <= 0 ){
209
- * pzErrMsg = sqlite3_mprintf ("invalid vector: invalid float at position %d: '%s'" , iElem , valueBuf );
209
+ * pzErrMsg = sqlite3_mprintf ("vector: invalid float at position %d: '%s'" , iElem , valueBuf );
210
210
goto error ;
211
211
}
212
212
if ( iElem >= MAX_VECTOR_SZ ){
213
- * pzErrMsg = sqlite3_mprintf ("invalid vector: max size exceeded %d" , MAX_VECTOR_SZ );
213
+ * pzErrMsg = sqlite3_mprintf ("vector: max size exceeded %d" , MAX_VECTOR_SZ );
214
214
goto error ;
215
215
}
216
216
// clear only first bufidx positions - all other are zero
@@ -229,7 +229,7 @@ static int vectorParseSqliteText(
229
229
pzText ++ ;
230
230
231
231
if ( * pzText != ']' ){
232
- * pzErrMsg = sqlite3_mprintf ("invalid vector: must end with ']'" );
232
+ * pzErrMsg = sqlite3_mprintf ("vector: must end with ']'" );
233
233
goto error ;
234
234
}
235
235
pzText ++ ;
@@ -238,7 +238,7 @@ static int vectorParseSqliteText(
238
238
pzText ++ ;
239
239
240
240
if ( * pzText != '\0' ){
241
- * pzErrMsg = sqlite3_mprintf ("invalid vector: non-space symbols after closing ']' are forbidden" );
241
+ * pzErrMsg = sqlite3_mprintf ("vector: non-space symbols after closing ']' are forbidden" );
242
242
goto error ;
243
243
}
244
244
pVector -> dims = iElem ;
@@ -283,11 +283,11 @@ int detectBlobVectorParameters(sqlite3_value *arg, int *pType, int *pDims, char
283
283
} else if ( * pType == VECTOR_TYPE_FLOAT64 ){
284
284
* pDims = nBlobSize / sizeof (double );
285
285
} else {
286
- * pzErrMsg = sqlite3_mprintf ("invalid vector: unexpected binary type: got %d, expected %d or %d" , * pType , VECTOR_TYPE_FLOAT32 , VECTOR_TYPE_FLOAT64 );
286
+ * pzErrMsg = sqlite3_mprintf ("vector: unexpected binary type: got %d, expected %d or %d" , * pType , VECTOR_TYPE_FLOAT32 , VECTOR_TYPE_FLOAT64 );
287
287
return -1 ;
288
288
}
289
289
if ( * pDims > MAX_VECTOR_SZ ){
290
- * pzErrMsg = sqlite3_mprintf ("invalid vector: max size exceeded: %d > %d" , * pDims , MAX_VECTOR_SZ );
290
+ * pzErrMsg = sqlite3_mprintf ("vector: max size exceeded: %d > %d" , * pDims , MAX_VECTOR_SZ );
291
291
return -1 ;
292
292
}
293
293
return 0 ;
@@ -334,7 +334,7 @@ int detectVectorParameters(sqlite3_value *arg, int typeHint, int *pType, int *pD
334
334
case SQLITE_TEXT :
335
335
return detectTextVectorParameters (arg , typeHint , pType , pDims , pzErrMsg );
336
336
default :
337
- * pzErrMsg = sqlite3_mprintf ("invalid vector: unexpected value type: got %s, expected TEXT or BLOB" , sqlite3_type_repr (sqlite3_value_type (arg )));
337
+ * pzErrMsg = sqlite3_mprintf ("vector: unexpected value type: got %s, expected TEXT or BLOB" , sqlite3_type_repr (sqlite3_value_type (arg )));
338
338
return -1 ;
339
339
}
340
340
}
@@ -350,7 +350,7 @@ int vectorParse(
350
350
case SQLITE_TEXT :
351
351
return vectorParseSqliteText (arg , pVector , pzErrMsg );
352
352
default :
353
- * pzErrMsg = sqlite3_mprintf ("invalid vector: unexpected value type: got %s, expected TEXT or BLOB" , sqlite3_type_repr (sqlite3_value_type (arg )));
353
+ * pzErrMsg = sqlite3_mprintf ("vector: unexpected value type: got %s, expected TEXT or BLOB" , sqlite3_type_repr (sqlite3_value_type (arg )));
354
354
return -1 ;
355
355
}
356
356
}
0 commit comments