%Library.Vector
datatype class %Library.Vector extends %Library.DataType
ODBC Type: VARCHAR
Datatype class for storing vector content, such as embeddings, in the native $vector format. See also the TO_VECTOR() SQL function to convert user input to the VECTOR datatypeMethod Inventory
Parameters
parameter DATATYPE = FLOAT;
The datatype of the elements stored in the vector.
Default to FLOAT (SQL type, corresponds to 'xf32' in ObjectScript), a significantly more storage-conscious option for Vector Search.
parameter LEN;
The number of elements the vector can contain.
parameter STORAGEDEFAULT = GLOBALNODE;
The number of elements the vector can contain.
Methods
DisplayToLogical - If this is passed a dynamic array e.g.
'Set dynArray=[1,2,3,4]' then detect this with $isobject(%val)
and then if it is an oref then test if it is a dynamic array
and if so then walk this turning it into a vector so
we can support JSON and dynamic arrays.
Inherited description: Return $$$OK if the value is valid for the datatype, or an error code otherwise.