%Library.Double
Class %Library.Double Extends %DataType [ ClientDataType = DOUBLE, OdbcType = DOUBLE, SqlCategory = DOUBLE, System = 2 ]
The %Library.Double data type class represents a IEEE double-precision (64-bit) floating point number.
The logical value of the %Double data type is a IEEE floating point value.
Parameters
FORMAT;
Parameter FORMAT;
The format specification for the data type's display value.
The value of FORMAT corresponds to the formatting option of the $FNUMBER
function, which is used to perform the formatting.
SCALE
Parameter SCALE As INTEGER;
The scale value (number of digits following the decimal point) for this data type. This parameter only affects the display value which will be rounded to the specified number of decimal places.
MAXVAL;
Parameter MAXVAL;
The maximum allowed logical value for the data type.
MINVAL;
Parameter MINVAL;
The minimum allowed logical value for the data type.
VALUELIST;
Parameter VALUELIST;
Used for enumerated (multiple-choice) attributes. VALUELIST is either a null string ("") or a delimiter separated list (where the delimiter is the first character) of logical values. If a non-null value is present, then the attribute is restricted to values in the list, and the validation code simply checks to see if the value is in the list.
DISPLAYLIST;
Parameter DISPLAYLIST;
Used for enumerated (multiple-choice) attributes. Used in conjunction with the VALUELIST parameter for enumerated (multiple-choice) attributes. DISPLAYLIST, if not null, represents the display values for the attribute corresponding with the logical values listed in VALUELIST.
The display values are returned by the LogicalToDisplay method.
XSDTYPE
Parameter XSDTYPE = "double";
Declares the XSD type used when projecting XML Schemas.
JSONTYPE
Parameter JSONTYPE = "double";
Methods
XSDToLogical
ClassMethod XSDToLogical(%val As %String) As %Double [ CodeMode = generator, ServerOnly = 1 ]
Converts the SOAP encoded input decimal value into an ObjectScript IEEE floating point value. Returns "" for error.
LogicalToXSD
ClassMethod LogicalToXSD(%val As %Double) As %String [ CodeMode = generator, ServerOnly = 1 ]
Converts the ObjectScript IEEE floating point value to the canonical SOAP encoded double value. In particular, the values NaN, -INF and +INF are used with that case.
JSONToLogical
ClassMethod JSONToLogical(%val As %String) As %Double [ CodeMode = generator, ServerOnly = 1 ]
Converts the JSON input decimal value into a Objectscript IEEE floating point value. Returns "" for error.
LogicalToJSON
ClassMethod LogicalToJSON(%val As %Double) As %String [ CodeMode = generator, ServerOnly = 1 ]
Converts the Objectscript IEEE floating point value to the JSON double value. In particular, the values NaN, -INF and +INF are used with that case.
DisplayToLogical
ClassMethod DisplayToLogical(%val As %String) As %Double [ CodeMode = generator, ServerOnly = 0 ]
Converts the input value %val, which is a string representing a floating point value, into a logical floating point value.
Returns the logical floating point value of the input string %val.
Normalize
ClassMethod Normalize(%val As %RawString) As %Double [ CodeMode = expression, ServerOnly = 1 ]
Converts %val to a normalized value.
IsValid
ClassMethod IsValid(%val As %RawString) As %Status [ CodeMode = generator, ServerOnly = 0 ]
Tests if the logical value %val, which is a floating point value, is valid. The validation is based on the class parameter settings used for the class attribute this data type is associated with. In this case, MAXVAL and MINVAL.
LogicalToDisplay
ClassMethod LogicalToDisplay(%val As %Double) As %String [ CodeMode = generator, ServerOnly = 0 ]
Converts the value of %val, which is in logical floating point format, into a display string. The formatting is based on the value of the FORMAT parameter.
Returns the formatted value of %val.
OdbcToLogical
ClassMethod OdbcToLogical(%val As %RawString) As %Double [ ServerOnly = 1 ]
Converts %val to a normalized value upon conversion from Odbc to Logical mode