Reads a persisted embedding, preferring the binary column and falling back to the JSON column.
The fallback also covers a binary value that fails validation, so a corrupt binary column never
hides a good JSON copy. The two shapes differ (Float32Array vs number[]); both are accepted by
SimpleVectorService.LoadVectors / AddVector / AddOrUpdateVector.
Parameters
vectorBinary: string
The binary column value (base64), or null when the row has none or it was not fetched.
vectorJSON: string
The JSON column value, or null.
Returns number[]|Float32Array<ArrayBufferLike>
The vector, or null when neither column holds a usable vector.
Example
constvector = ReadStoredVector(note.EmbeddingVectorBinary, note.EmbeddingVector); if (vector) service.AddOrUpdateVector(note.ID, vector, metadata);
Reads a persisted embedding, preferring the binary column and falling back to the JSON column.
The fallback also covers a binary value that fails validation, so a corrupt binary column never hides a good JSON copy. The two shapes differ (
Float32Arrayvsnumber[]); both are accepted bySimpleVectorService.LoadVectors/AddVector/AddOrUpdateVector.