Skip to main content

%Library.SmallInt

Class %Library.SmallInt Extends %Integer [ OdbcType = SMALLINT, System = 2 ]

The %SmallInt represents a small integer value. This implements the SmallInt ODBC datatype

Parameters

MAXVAL

Parameter MAXVAL As INTEGER = 32767;

The maximum allowed logical value for the data type.

MINVAL

Parameter MINVAL As INTEGER = -32768;

The minimum allowed logical value for the data type.

XSDTYPE

Parameter XSDTYPE = "short";

Declares the XSD type used when projecting XML Schemas.

Methods

XSDToLogical

ClassMethod XSDToLogical(%val As %String) As %SmallInt [ CodeMode = generator ]

Converts the SOAP encoded input decimal value into a %SmallInt value. Returns "" for error.

Normalize

ClassMethod Normalize(%val As %RawString) As %Integer [ 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 an integer 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.