Skip to main content

Common Property Parameters

This page discusses common property parameters.

Introduction

Depending on the property, you can specify parameters of that property, to affect its behavior. For example, parameters can specify minimum and maximum values, formatting for use in display, collation, delimiters for use in specific scenarios, and so on. You can specify parameters within the class definition. The following shows an example:

Property MyProperty as MyType (MYPARAMETER="some value");

Core Property Parameters

Some parameters are available for all properties, of any type. These parameters are as follows:

  • CALCSELECTIVITY — Controls whether the Tune Table facility calculates the selectivity for a property. Usually it is best to leave this parameter as the default (1). For details, see “Tune Table” in the SQL Optimization Guide.

  • CAPTION — Caption to use for this property in client applications.

  • EXTERNALSQLNAME — Used in linked tables, this parameter specifies the name of the field in the external table to which this property is linked. The Link Table wizard specifies this parameter for each property when it generates a class. The name of the SQL field on the remote database may need to differ from property name on the InterSystems IRIS server for various reason, such as because the remote database field name is a reserved word in InterSystems IRIS. For information on linked tables, see The Link Table Wizard.

    Note that the property parameter EXTERNALSQLNAME has a different purpose than the SQLFieldName compiler keyword, and these items can have different values. SQLFieldName specifies the projected SQL field name in the InterSystems IRIS database, and EXTERNALSQLNAME is the field name in the remote database.

  • EXTERNALSQLTYPE — Used in linked tables, this parameter specifies the SQL type of the field in the external table to which this property is linked. The Link Table wizard specifies this parameter for each property when it generates a class. See EXTERNALSQLNAME.

  • JAVATYPE — The Java data type to which this property is projected.

Most property parameters are defined in data type classes and thus are class-specific; see the next section.

Class-Specific Property Parameters

Most of this page has discussed parameters that are available for all properties. The other available parameters depend on the class used by the property. The following table lists the parameters supported by the data type classes listed in this topic. The parameters are grouped into three columns: 1) parameters that are found in many data type classes or that are otherwise commonly encountered, 2) parameters that have meaning only in XML and SOAP contexts, and 3) parameters that occur in only a few data type classes and that are rarely encountered.

Supported Parameters for System Data Type Classes
Data Type Class Common Parameters Parameters for XML and SOAP Less Common Parameters
%BigIntOpens in a new tab DISPLAYLIST, FORMAT, MAXVAL, MINVAL, VALUELIST XSDTYPE  
%BinaryOpens in a new tab MAXLEN, MINLEN CANONICALXML, MTOM, XSDTYPE  
%BooleanOpens in a new tab   XSDTYPE  
%CharOpens in a new tab COLLATION, CONTENT, DISPLAYLIST, ESCAPE, MAXLEN, MINLEN, PATTERN, TRUNCATE, VALUELIST XMLLISTPARAMETER, XSDTYPE  
%CounterOpens in a new tab DISPLAYLIST, FORMAT, MAXVAL, MINVAL, VALUELIST XSDTYPE  
%CurrencyOpens in a new tab* DISPLAYLIST, FORMAT, MAXVAL, MINVAL, SCALE, VALUELIST XSDTYPE  
%DateOpens in a new tab DISPLAYLIST, FORMAT, MAXVAL, MINVAL, VALUELIST XSDTYPE  
%DateTimeOpens in a new tab DISPLAYLIST, MAXVAL, MINVAL, VALUELIST XMLDEFAULTVALUE, XMLTIMEZONE, XSDTYPE DATEFORMAT
%DecimalOpens in a new tab DISPLAYLIST, FORMAT, MAXVAL, MINVAL, SCALE, VALUELIST XSDTYPE  
%DoubleOpens in a new tab DISPLAYLIST, FORMAT, MAXVAL, MINVAL, SCALE, VALUELIST XSDTYPE  
%EnumStringOpens in a new tab COLLATION, CONTENT, DISPLAYLIST, ESCAPE, MAXLEN, MINLEN, PATTERN, TRUNCATE, VALUELIST XSDTYPE  
%ExactStringOpens in a new tab COLLATION, CONTENT, DISPLAYLIST, ESCAPE, MAXLEN, MINLEN, PATTERN, TRUNCATE, VALUELIST XSDLISTPARAMETER, XSDTYPE  
%IntegerOpens in a new tab DISPLAYLIST, FORMAT, MAXVAL, MINVAL, VALUELIST XSDTYPE STRICT
%ListOpens in a new tab ODBCDELIMITER XSDTYPE  
%ListOfBinaryOpens in a new tab ODBCDELIMITER XSDTYPE  
%NameOpens in a new tab COLLATION,MAXLEN XSDTYPE INDEXSUBSCRIPTS
%NumericOpens in a new tab DISPLAYLIST, FORMAT, MAXVAL, MINVAL, SCALE, VALUELIST XSDTYPE  
%PosixTimeOpens in a new tab MAXVAL, MINVAL XMLDEFAULTVALUE, XMLTIMEZONE, XSDTYPE DATEFORMAT, INDEXNULLMARKER
%SmallIntOpens in a new tab DISPLAYLIST, FORMAT, MAXVAL, MINVAL, VALUELIST XSDTYPE  
%StatusOpens in a new tab   XSDTYPE  
%StringOpens in a new tab COLLATION, CONTENT, DISPLAYLIST, ESCAPE, MAXLEN, MINLEN, PATTERN, TRUNCATE, VALUELIST XMLLISTPARAMETER, XSDTYPE  
%TimeOpens in a new tab DISPLAYLIST, FORMAT, MAXVAL, MINVAL, VALUELIST XMLTIMEZONE, XSDTYPE PRECISION
%TimeStampOpens in a new tab DISPLAYLIST, MAXVAL, MINVAL, VALUELIST XMLDEFAULTVALUE, XMLTIMEZONE, XSDTYPE  
%TinyIntOpens in a new tab DISPLAYLIST, FORMAT, MAXVAL, MINVAL, VALUELIST XSDTYPE  

*This special-purpose class is only for use in migrations to InterSystems IRIS.

Note:

The term constraint refers to any keyword that applies a constraint on a property value. For example, MAXVAL, MINVAL, DISPLAYLIST, VALUELIST, and PATTERN are all constraints.

Common Parameters

The common parameters from the preceding table are as follows:

  • COLLATION — Specifies the manner in which property values are transformed for indexing.

    The allowable values for collation are discussed in SQL Introduction.

  • CONTENT — Specifies the contents of the string, when the string is used in a context where it might be interpreted as XML or HTML. Specify "STRING" (the default), "ESCAPE", or "MIXED".

    For details, see Projecting Objects to XML.

  • DISPLAYLIST — Used in conjunction with the VALUELIST parameter for enumerated (multiple-choice) properties. For more information, see Defining Enumerated Properties

  • ESCAPE — Specifies the type of escaping to be done, if the string is used in certain contexts. Use either "XML" (the default) or "HTML".

    By default, the less than, greater than, and ampersand characters are interpreted as < > and & respectively. For further details on "XML", see Projecting Objects to XML.

  • FORMAT — Specifies the format for the display value. For the value of FORMAT, use a format string as specified in the format argument of the $FNUMBER function. For properties of type %NumericOpens in a new tab or %DecimalOpens in a new tab, you can also use the option "AUTO", which suppresses any trailing zeroes.

  • MAXLEN — Specifies the maximum number of characters the string can contain. The default is 50, and if this parameter is "", the length is unlimited. As with many other parameters, this parameter affects how InterSystems IRIS validates data. Note that it also affects how the field is projected over a database driver.

  • MAXVAL — Specifies the maximum allowed logical value for the data type.

  • MINLEN — Specifies the minimum number of characters the string can contain.

  • MINVAL — Specifies the minimum allowed logical value for the data type.

  • ODBCDELIMITER — Specifies the delimiter character used to construct a %List value when it is projected via ODBC.

  • PATTERN — Specifies a pattern that the string must match. The value of PATTERN must be a valid InterSystems IRIS pattern-matching expression. For an overview of pattern matching, see Pattern Matching.

  • SCALE — Specifies the number of digits following the decimal point.

  • TRUNCATE — Specifies whether to truncate the string to MAXLEN characters, where 1 is TRUE and 0 is FALSE. This parameter is used by the Normalize() and IsValid() methods but is not used by database drivers.

  • VALUELIST — Used for enumerated (multiple-choice) properties. For more information, see Defining Enumerated Properties

Parameters for XML and SOAP

For information on parameters in the column Parameters for XML and SOAP, see Projecting Objects to XML. Also see Creating Web Services and Web Clients.

Less Common Parameters

The less common parameters in the preceding table are as follows:

  • STRICT (for %IntegerOpens in a new tab) requires that value be an integer. By default, if a property is of type %IntegerOpens in a new tab, and you specify a non-integer numeric value, InterSystems IRIS converts the value to an integer. If STRICT is 1 for a property, in such a case, InterSystems IRIS does not convert the value; instead validation fails.

  • DATEFORMAT.

    • For %DateTimeOpens in a new tab, this parameter specifies the order of the date parts when a numeric date format is specified for the display or ODBC input value. Valid parameters are mdy, dmy, ymd, ydm, myd, and dym. The default DATEFORMAT is mdy.

    • For %PosixTimeOpens in a new tab, this parameter specifies the format for the display value. For allowed values, see the fformat parameter of the $zdatetime and $zdatetimeh functions.

  • PRECISION (for %TimeOpens in a new tab) specifies the number of decimal places to retain. If the value is "" (the default), the system retains the number of decimal places that are provided in the source value. If the value is 0, InterSystems IRIS rounds the provided value to the nearest second.

  • INDEXNULLMARKER (only for %PosixTimeOpens in a new tab) declares the default null marker value to use in index subscripts for properties of type %PosixTimeOpens in a new tab. The default is –1E19. See Indexing a NULL.

  • INDEXSUBSCRIPTS (for %NameOpens in a new tab) specifies the number of subscripts used by the property in indexes, using a comma as a delimiter in the property value; the %Storage.Persistent class uses this number. A value of 2 specifies that the first comma piece of the property value is stored as the first subscript and the second comma piece of the property value is stored as the second subscript.

See Also

FeedbackOpens in a new tab