Object Management Extension User Guide
Introduction
Audience
In This Guide
System-specific Text in This Guide
Terminology Use in This Guide
Syntax Conventions Used in This Guide
Introducing Object Management Extension
In This Chapter
What Is Object Management Extension?
Structure and Symbol Definitions
Demonstration Data Types
How You Add Data Types and Functions
Required Contents of the Code
Data Type Definitions
Function Definitions
Function Instance Definitions
Coercion Routines
Installation and Testing of the New Code
Object Management Extension Restrictions
Understanding DBMS Server Requirements for User-Defined Data Types
In This Chapter
How the DBMS Server Uses the Code
Requirements for User-written Code
Requirements for Data Type Coercion
IDs for Data Types and Functions
User-defined Data Types and the Copy Statement
Large Objects
Defining Data Types
In This Chapter
Data Type Definition
Structure IIADD_DT_DFN Fields
Required Routines for Data Type Definition
Function Parameters
Structure scb_error
Structure II_DATA VALUE
The Structure of db_data
Internal Structure of a Decimal Value
compare Routine--Compare Two Data Elements
Inputs
Outputs
Returns
dbtoev Routine--Determine External Data Type
Inputs
Outputs
Returns
dhmax Routine--Create Default Maximum Histogram Value
Inputs
Outputs
Returns
dhmin Routine--Create Default Minimum Histogram Value
Inputs
Outputs
Returns
getempty Routine--Get an Empty Value
Inputs
Outputs
Returns
hashprep Routine--Prepare Value for Hash Key
Inputs
Outputs
Returns
helem Routine--Create a Histogram Element for Data Value
Inputs
Outputs
Returns
hg_dtln Routine--Provide Type and Length for Histogram Value
Inputs
Outputs
Returns
hmax Routine--Create Histogram Value for Maximum Value
Inputs
Outputs
Returns
hmin Routine--Create Histogram Value for Minimum Value
Inputs
Outputs
Returns
keybuild Routine--Build a Key from the Value
Inputs
Outputs
Returns
length_check Routine--Check for Valid Length
Inputs
Outputs
Returns
minmaxdv Routine--Provide Min/Max Values and Lengths
Inputs
Outputs
Returns
seglen Routine--Determine Length of Each Long Segment
Inputs
Outputs
Returns
tmcvt Routine--Convert Data Type to Displayable Format
Inputs
Outputs
Returns
tmlen Routine--Determine Display Length
Inputs
Outputs
Returns
value_check Routine--Check for Valid Values
Inputs
Outputs
Returns
xform Routine--Transform Long Types into Segments
Inputs
Outputs
Returns
Defining Functions
Required Definitions
Structure IIADD_FO_DFN
Defining Function Instances
Function Instance Definition
Structure IIADD_FI_DFN
Length Definition of Result Data Type
External Lenspec Routine--Return Result Length of Specified Value
Complementary Function Instances
Sorting of the Function Instance Definition Array
Methods for Defining Function Instances for Large Objects
Ingres-supplied Filter Functions
Direct Manipulation of Large Objects
II_INFORMATION Operation--Return Maximum Length of Peripheral Object Segments
Inputs
Outputs
Returns
II_GET Operation--Get Next Segment
Inputs
Outputs
Returns
II_PUT Operation--Add a New Segment
Inputs
Outputs
Returns
II_COPY Operation--Move a Peripheral Object
Inputs
Outputs
Returns
Passing Definitions to the DBMS Server
IIudadt_register Routine
Structure IIADD_DEFINITION Fields
Server Routines Provided
The ii_cb_trace Routine--Output Provided Trace Messages
The ii_error_fcn Routine--Place Error Information in Status Control Block
The ii_lo_handler_fcn Routine--Move Through Large Object Segments
The ii_init_filter_fcn Routine--Set Up Filter Function
The ii_filter_fcn Routine--Perform Operation by Calling a User Routine
Installing and Testing Data Types
In This Chapter
How You Install New Data Types in a Windows Environment
How You Install New Data Types in a Linux Environment
Testing the New Data Type Code
Writing Aggregate Functions
In This Chapter
Aggregate Function
Function Definitions for Aggregates
Code for an Aggregate Function
A. Checklist for Creating Data Types
How You Create Data Types in Windows
How You Create Data Types in Linux
Object Management Extension User Guide
How You Create Data Types in Linux