The mi_lo_specget_flags() function

The mi_lo_specget_flags() function obtains from an LO-specification structure the attributes flag for a smart large object.

Syntax

mi_integer mi_lo_specget_flags(LO_spec)
   MI_LO_SPEC *LO_spec;
LO_spec
A pointer to the LO-specification structure from which to obtain the flag value.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_lo_specget_flags() function is the LO-specification accessor function that returns the attributes flag from a set of storage characteristics. The attributes flag provides the following information about a smart large object:
  • Whether to use logging on the smart large object
  • Whether to store the time of last access for the smart large object
  • Which data integrity to use for pages of the sbspace
Constants for these attributes are masked together into the single attributes-flag value. Therefore, to obtain a particular attribute, you must use the bitwise AND operator (&) to mask the attributes flag, as the following code fragment shows:
create_flags = mi_lo_specget_flags(LO_spec)
if ( create_flags & MI_LO_ATTR_LOG )
   /* logging is on */
Important: Before you call mi_lo_specget_flags(), you must put storage characteristics into an LO-specification structure.
You can use any of the following functions to initialize the LO-specification structure:
  • The mi_lo_colinfo_by_ids() or mi_lo_colinfo_by_name() function puts storage characteristics that are associated with a particular CLOB or BLOB column in an LO-specification structure.
  • The mi_lo_stat_cspec() function puts storage characteristics of an existing smart large object in an LO-specification.
  • The mi_lo_specset_flags() function sets the attributes flag in an LO-specification structure.

The mi_lo_specget_flags() function obtains the current value for the attributes flag from the LO-specification structure that LO_spec references.

For more information about the attributes flag of a smart large object or about how to use the mi_lo_specget_flags() function, see the Informix® DataBlade® API Programmer's Guide.

Return values

>=0
The bit mask for the attributes flags from the LO-specification structure that LO_spec references.
MI_ERROR
The function was not successful; the LO-specification structure might be invalid.