uinfo
Supplies Uniface with basic information about the DBMS and the connector.
Description
The uinfo
structure must be used
by the connector to supply Uniface with basic information about the DBMS and the connector. The
connector fills the uinfo
structure in the Info call. The uinfo
structure cannot be used for any other purpose.
Uniface defines and initializes the structure. The initial value of every element of the structure is zero (unless stated otherwise), which is by definition an appropriate default for all non-mandatory elements.
If incorrect or inconsistent information is
stored in the uinfo
structure, very obscure errors can occur in further
processing.
To access the uinfo
structure,
the connector must define and initialize a pointer to it. In the Info mode 0 connector request, the
address of the uinfo
structure can be obtained as follows:
struct uinfo *info;
info = (struct uinfo *)ControlBlock->umisc;
where ControlBlock is the name of the parameter with the top-level connector function. For more information, see Integrate a User-Defined Database Connector with Uniface.
Members
Member |
Description |
---|---|
long (*SPEntry) (int Major, int
Minor, void ** funcs)
|
Name of the ICC normal connector entry point used for service stored procedures. |
unsigned char aldate
|
If non-zero, Uniface aligns values of model type Date (irrespective of the packing code or storage format) on a multiple of this value, counted from the start of the record. |
unsigned char aldoub
|
If non-zero, Uniface aligns values of connector-level packing code F8 (double-precision eight-byte float) on a multiple of this value, counted from the start of the record. |
unsigned char ale9
|
If non-zero, Uniface aligns values of connector-level packing code E9 on a multiple of this value, counted from the start of the record. |
unsigned char alfloat
|
If non-zero, Uniface aligns values of connector-level packing code F4 (single-precision four-byte float) on a multiple of this value, counted from the start of the record. |
unsigned char ali2
|
If non-zero, Uniface aligns values of connector-level packing code I2 (two-byte integers) on a multiple of this value, counted from the start of the record. |
unsigned char ali4
|
If non-zero, Uniface aligns values of connector-level packing code I4 (four-byte integers) on a multiple of this value, counted from the start of the record. |
unsigned char alm6
|
If non-zero, Uniface aligns values of connector-level packing code M6 on a multiple of this value, counted from the start of the record. |
unsigned char alrec
|
If non-zero, Uniface pads each record up to a multiple of this value, counted from the start of the record. |
unsigned char alseg
|
If non-zero, Uniface aligns a segmented field on a multiple of this value, counted from the start of the record. |
unsigned char altime
|
If non-zero, Uniface aligns values of model type Time (irrespective of the packing code or storage format) on a multiple of this value, counted from the start of the record. |
unsigned char
autovarsiz
|
If non-zero, Uniface sets the
variable-length attributes flag (mask value 4) in ufldlst->ufbits for fields
with connector-level packing code pC, pU or pR when the maximum field length is greater than this
value. Some DBMSs perform better on fixed-length
fields than on variable-length fields, up to a certain length. For these DBMSs, the connector can
support both fixed and variable-length fields. Specify the maximum length to use fixed-length
fields in |
unsigned char bound
|
If non-zero, Uniface aligns values of any fixed-length field on a multiple of this value, counted from the start of the record. |
unsigned char boundv
|
If non-zero, Uniface aligns values of any
variable-length field on a multiple of this value, counted from the start of the record. If the
DBMS does not impose special alignment requirements on variable-length fields,
uinfo->boundv must have the same value as uinfo->bound .
|
unsigned char dbms[3]
|
If the first character is not zero,
Uniface presents the table name in uctrl->uname with a period (.) and the three
characters appended. |
long dbmsmaxrecsiz
|
If nonzero, this is the maximum record size supported by the DBMS for entities that do not contain any fields with a variable length packing code, such as C*, VW*, VR*, and so on. If it is zero it defaults to the value of recsiz . |
unsigned char dbtyp
|
This field describes the type of DBMS and
connector:
With field-level connectors, Uniface sets
and reads the field length of every individual field in With record-level connectors, Uniface
assumes that the actual length of every field in the fixed part of the record equals the maximum
field length in |
unsigned char drvnum
|
Connector sequence number as assigned by Uniface. The user-defined connectors UD0 through UD9 have sequence numbers 10 through 19. |
short drvsiz
|
Amount of workspace in bytes needed by the
connector per open table. The total amount of workspace Uniface allocates for the connector is the
sum of the following (in bytes):
( ( NumberOfIndexes is the number of indexes associated with the table. For more infromation, see uidxlst. If this expression evaluates to a number
greater than zero, Uniface allocates one workspace area of this size per control block
( See also the description of
|
short fields
|
Amount of workspace in bytes needed by the
connector per field in the table. See also the description of uinfo->drvsiz .
|
unsigned char filll
|
Number of bytes Uniface allocates as leading fill characters for all fixed-length fields. |
unsigned char fillt
|
Number of bytes Uniface allocates as trailing fill characters for all fixed-length fields. |
unsigned char filltv
|
Number of bytes Uniface allocates as trailing fill characters for all variable-length fields. |
unsigned char fillv
|
Number of bytes Uniface allocates as leading fill characters for all variable-length fields. |
unsigned char fixrec
|
If non-zero, the DBMS supports only fixed nonzero-length records. |
short indexes
|
Amount of workspace in bytes needed by the
connector per index associated with a table. See also the description of
uinfo->drvsiz . |
unsigned char lenseg
|
If zero, the DBMS does not support segmented fields. Otherwise, it is the length of the segment ‘pointer’ of the DBMS. |
unsigned char like
|
Indicates whether like
must be used in the uiflist . If this field equals zero, the like
operator is not used and the connector must scan pC, pR or pU field data for possible wildcard
characters. If this field is equal to one, the like operator will be used and the
connector needs to scan only the field data of type pR, pU or pC and wildcard characters must be
replaced. See also uinfo->profil . |
unsigned char limkey
|
If non-zero, Uniface automatically converts
the fields of primary and candidate keys to printable characters from the ASCII character set. Caution: It is not recommended to use this option. |
unsigned char link
|
If nonzero, Uniface maintains the field
uctrl->ulink . This can be used with hierarchical DBMSs to gain access to the
current occurrence of the parent table, when the connector is called for a child table. For more
information, see
ugethit. |
unsigned char mapmode
|
Field used by the connector to indicate
the desired behavior of Uniface with respect to the packing code table:
Note: In future releases, the new packing
code table will be mandatory. This means that the value 0 will be illegal for
|
short maxcur
|
If the number of open cursors is greater
than this number, Uniface does not call the connector, except for the Close connector request.
Uniface first tries to close one or more tables temporarily to release resources. The connector can use
Uniface maintains a global count for the DBMS, but it does not maintain a count per logon path. |
short maxfield
|
If nonzero, this is the maximum allowed
length of the DBMS variable-length type that is used to implement the variable part of the Uniface
record. The variable part of the record can have
packing code pC, pR or pU, with the ‘variable-length’ flag (mask value 4) in
Uniface uses
|
short maxhits
|
If nonzero, this is the size of one step
of the Uniface stepped hitlist the connector advises to use. Zero indicates that the DBMS cannot
support a stepped hitlist. If there is no clearly optimal value, a value of ten is recommended. |
unsigned char mode
|
Indicates what kind of logon information
the DBMS requires. The value of mode must be the bitwise inclusive OR of the
applicable values from:
The |
unsigned char noconst
|
Indicates how the DBMS handles referential
integrity. The value of noconst must be the bitwise inclusive OR of the applicable
values from:
Specifying option 1 or 2 implies that relationship information from the Uniface Repository must be used to create the constraints in the database. For most field-level DBMS connectors maintained by Uniface, this is implemented using the Open modes 4, 5 and 6. For more information, see
Database Connector Requests. User-defined connectors can simply avoid this implication by setting
For some connectors maintained by
Uniface, this is implemented via the Create Table facility. User-defined connectors can simply
avoid this implication by setting |
unsigned char opnfil
|
Maximum number of operating system files the connector can have open simultaneously for one open table. |
unsigned char optlock
|
If nonzero, Uniface uses optimistic instead of cautious locking as the default locking strategy for this DBMS. |
unsigned char osegm
|
If zero, Uniface uses the default method
for overflow tables. In the default method, overflow tables contain two fields SEGM and DATA. SEGM
contains the concatenated primary key of the primary table and a four-byte segment identification.
If nonzero, Uniface will use an alternative method for overflow tables. In this method, overflow tables contain the primary key fields of the primary table and the fields SEGM and DATA. In this case, only SEGM contains the four-byte segment identification. For field-level connectors, the alternative is recommended. |
unsigned char
profil[2]
|
If profil[0] is nonzero,
Uniface uses this character instead of binary 1 in the where structure data to represent the
wildcard ‘*’ (any pattern of any number of characters). If Note: This service is of limited use when the connector uses the if list. After Uniface has performed the substitution, it is not possible to distinguish between the mapped wildcard character and an identical character which is present in the data. |
unsigned char ralen
|
If nonzero, this is the length of the PRA of the DBMS. Zero indicates that the DBMS does not support PRAs. If
The connector must either provide the PRA with every request mentioned above, or give no support at all to the PRA. |
short recsiz
|
If nonzero, this is the maximum record size supported by the DBMS for entities that contain any fields with a variable length packing code, such as C*, VW*, VR*, and so on. The maximum record size used by Uniface is 8192 bytes. For entities that do not contain any fields with a variable length, see the description of |
short sizmod
|
If nonzero, Uniface rounds record sizes up to the nearest multiple of this value. |
unsigned char supzero
|
If nonzero, Uniface uses leading spaces instead of zeros with connector-level packing codes pN1-pN32. |
unsigned char tabname
|
The following indicates the way Uniface
treats the names of the overflow tables:
|
unsigned char
TMCapable
|
If one, the connector supports global transactions and can be transaction management controlled. |
unsigned char
twophase
|
If zero, the DBMS does not support the
two-phase commit protocol. The value 3 indicates that the DBMS supports the two-phase commit protocol. In this case, the connector must be capable of handling Commit mode 1 and Commit mode 2 connector requests, for the first and second phases of the Commit, respectively. The effect of other values is currently undefined. |
unsigned char
txtsearch
|
If nonzero, Uniface allows retrieve
profiles in fields in the variable part of the record. Uniface assumes in this case that the DBMS
is capable of performing the requested selection (the service function uhitchk is
not capable of performing selections on fields in the variable part of the record). Generally, |
short updef[16]
|
An array of default model-level packing
codes that Uniface will use when no packing code is explicitly specified in the application model.
Note that there is no default for Uniface data type ‘S’ (String), as Uniface itself sets this
default to C40. See
Default Model-Level Packing Codes
. If any of the values is not specified, Uniface uses a DBMS-independent default. |
short
upfmt[pMAXPACKING]
|
An array with redefinitions of
connector-level packing codes. Each entry defines how Uniface presents a specific connector-level
packing code to the connector. Each entry in table 3-7 must be set to a connector-level packing code that is supported by the connector. Uniface does not check the validity of connector-level packing code redefinitions.
For more information on connector-level packing codes, see Connector-Level Packing Codes and Connector-Level Packing Codes. |
Entry | Uniface data type |
---|---|
0 | Reserved |
1 | Reserved |
2 | Reserved |
3 | N (Number) |
4 | F (Float) |
5 | D (Date) |
6 | T (Time) |
7 | E (Datetime) |
8 | B (Boolean) |
9-15 | Reserved |