Skip to main content

%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 datatype

Method Inventory

Parameters

parameter DATATYPE = DOUBLE;
The default type value used for this data type of vector.
parameter LEN;
The number of elements the vector can contain.

Methods

classmethod DisplayToLogical(%val As %String) as %Vector
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.
classmethod IsValid(%val As %Vector) as %Status
Inherited description: Return $$$OK if the value is valid for the datatype, or an error code otherwise.
classmethod LogicalToDisplay(%val As %Vector) as %String
classmethod LogicalToOdbc(%val As %Vector) as %String
classmethod Normalize(%val As %Vector) as %Vector
classmethod OdbcToLogical(%val As %String) as %Vector
FeedbackOpens in a new tab