(1 of 3)
ifx_lo_alter()
Alters the storage characteristics of an existing smart large object
ifx_lo_close()
Closes an open smart large object
ifx_lo_col_info()
Retrieves column-level storage characteristics in an LO-specification structure
ifx_lo_copy_to_file()
Copies a smart large object into an operating-system file
ifx_lo_copy_to_lo()
Copies an operating-system file into an open smart large object
ifx_lo_create()
Creates an LO-pointer structure for a smart large object
ifx_lo_def_create_spec()
Allocates an LO-specification structure and initializes its fields to null values
ifx_lo_filename()
Returns the generated filename, given an LO-pointer structure and a file specification
ifx_lo_from_buffer()
Copies a specified number of bytes from a user-defined buffer into a smart large object
ifx_lo_open()
Opens an existing smart large object
ifx_lo_read()
Reads a specified number of bytes from an open smart large object
ifx_lo_readwithseek()
Seeks to a specified position in an open smart large object and reads a specified number of bytes
ifx_lo_release()
Releases resources committed to a temporary smart large object
ifx_lo_seek()
Sets the seek position for the next read or write on an open smart large object
ifx_lo_spec_free()
Frees the resources allocated to an LO-specification structure
ifx_lo_specget_estbytes()
Gets the estimated size, in bytes, of the smart large object
ifx_lo_specget_extsz()
Gets the allocation extent size for the smart large object
ifx_lo_specget_flags()
Gets the create-time flags for the smart large object
ifx_lo_specget_maxbytes()
Gets the maximum size for the smart large object
ifx_lo_specset_sbspace()
Gets the sbspace name for the smart large object
ifx_lo_specset_estbytes()
Sets the estimated size, in bytes, of the smart large object
ifx_lo_specset_extsz()
Sets the allocation extent size for the smart large object
ifx_lo_specset_flags()
Sets the create-time flags for the smart large object
ifx_lo_specset_maxbytes()
Sets the maximum size for the smart large object
Sets the sbspace name for the smart large object
ifx_lo_stat()
Obtains status information for an open smart large object
ifx_lo_stat_atime()
Returns the last access time for a smart large object
ifx_lo_stat_cspec()
Returns the storage characteristics for a smart large object
ifx_lo_stat_ctime()
Returns the last change-in-status time for the smart large object
ifx_lo_stat_free()
Frees the resources allocated to an LO-status structure
ifx_lo_stat_mtime_sec()
Returns the last modification time, in seconds, for the smart large object
ifx_lo_stat_refcnt()
Returns the reference count for the smart large object
ifx_lo_stat_size()
Returns the size of the smart large object
ifx_lo_tell()
Returns the current seek position of an open smart large object
ifx_lo_to_buffer()
Copies a specified number of bytes from a smart large object into a user-defined buffer
ifx_lo_truncate()
Truncates a smart large object to a specific offset
ifx_lo_write()
Writes a specified number of bytes to an open smart large object
ifx_lo_writewithseek()
Seeks to a specified position in an open smart large object and writes a specified number of bytes
The following pages describe each of these functions in more detail. ifx_lo_alter() The ifx_lo_alter() function alters the storage characteristics of an existing smart large object. Syntax
LO_ptr
is a pointer to an LO-pointer structure that identifies the smart large object whose storage characteristics are altered. For more information on LO-pointer structures, see page 7-16.
LO_spec
is a pointer to the LO-specification structure that contains the storage characteristics that ifx_lo_alter() saves for the smart large object that LO_ptr indicates. For more information on the LO-specification structure, see page 7-7.
0
The function was successful.
<0
The function was not successful and the return value indicates the cause of the failure.
LO_fd
is the LO file descriptor of the smart large object to close. For more information on an LO file descriptor, see page 7-23.
column_name
is a pointer to a buffer that contains the name of the database column whose column-level storage characteristics you wish to use.
is a pointer to the LO-specification structure in which to store the column-level storage characteristics for column_name. For more information on the LO-specification structure, see page 7-7.
The column_name buffer must specify the column name in the following format:
is a pointer to the LO-pointer structure that you provide to identify the smart large object to copy. For more information on LO-pointer structures, see page 7-16.
fname
is the full pathname of the target file to hold the data.
flags
is an integer that specifies the location of the fname file.
result
is a pointer to a buffer that contains the filename that ifx_lo_copy_to_file() generates.
LO_CLIENT_FILE
The fna5me file is on the client computer.
LO_SERVER_FILE
The fname file is on the server computer.
If you do not specify a value for flags, the default location is the client computer (LO_CLIENT_FILE). By default, the ifx_lo_copy_to_file() function generates a filename of the form:
is the LO file descriptor for the open smart large object in which to write the file contents. For more information on an LO file descriptor, see page 7-23.
is the full pathname of the source file that contains the data to copy.
The fname file is on the client computer.
LO_APPEND
Append the data in fname to the end of the specified smart large object. This flag can be masked with one of the preceding flags.
Return Values
is a pointer to the LO-specification structure that contains the storage characteristics for new smart large objects. For information on the LO-specification structure, see page 7-7.
is an integer that specifies the mode in which to open the new smart large object. For more information, see "Access Modes".
is a pointer to the LO-pointer structure for the new smart large object. For more information on LO-pointer structures, see page 7-16.
error
is a pointer to an integer that contains the error code that ifx_lo_create() sets.
1. It creates a new LO-pointer structure and assigns a pointer to this structure to the LO_ptr argument.
2. It assigns the storage characteristics for the smart large object from the LO-specification structure, LO_spec.
3. It opens the new smart large object in the access mode that the flags argument specifies.
4. It returns an LO file descriptor that identifies the open smart large object.
Each ifx_lo_create() call is implicitly associated with the current connection. When this connection closes, the database server deallocates any smart large objects that are not referenced by any columns (those with a reference count of zero). If the ifx_lo_create() function is successful, it returns a pointer to a valid LO file descriptor. You can then use this file descriptor, LO_fd, to identify which smart large object to access in subsequent function calls such as ifx_lo_read() and ifx_lo_write(). However, this LO_fd file descriptor is only valid within the current database connection. Return Values
A valid LO file descriptor
The function successfully created and opened the new smart large object and returned a valid LO file descriptor.
-1
The function was not successful; examine the error for a detailed error code.
is a pointer that points to a pointer to a new LO-specification structure that contains initialized fields. For information on the LO-specification structure, see page 7-7.
is a pointer to the LO-pointer structure that identifies the smart large object to copy. For more information on LO-pointer structures, see page 7-16.
is a pointer to a buffer that contains the filename that ifx_lo_copy_to_file() would generate.
result_len
is the size, in bytes, of the result character buffer.
is the LO-pointer structure for the smart large object into which you want to copy the data.
size
is an integer that identifies the number of bytes to copy to the smart large object.
buffer
is a pointer to a user-defined buffer from which you want to copy the data.
contains the address of the integer that holds the error code that ifx_lo_from_buffer() sets
The function was not successful.
is a pointer to the LO-pointer structure that identifies the smart large object to open. For more information on LO-pointer structures, see page 7-16.
is an integer that specifies the mode in which to open the smart large object that LO_ptr identifies. For more information, see "Access Modes".
is a pointer to an integer that contains the error code that ifx_lo_open() sets.
Universal Server uses the default parameters that the call to ifx_lo_open() (or ifx_lo_create()) has established to determine whether subsequent operations result in locking and/or logging of the corresponding smart large object. For more information, see "Lightweight I/O".
Each ifx_lo_open() call is implicitly associated with the current connection. When this connection closes, the database server deallocates any smart large objects that are not referenced by any columns (those with a reference count of zero). If the ifx_lo_open() function is successful, it returns a pointer to a valid LO file descriptor. You can then use this file descriptor, LO_fd, to identify which smart large object to access in subsequent function calls such as ifx_lo_read() and ifx_lo_write(). However, this LO_fd file descriptor is only valid within the current database connection. Once ifx_lo_open() has opened the smart large object, it sets the seek position in the returned LO file descriptor to byte zero (0). It also obtains a lock on the entire smart large object. The type of lock depends on the access mode in which the smart large object is opened, as follows:
The function has successfully opened the smart large object and returned a valid LO file descriptor.
is the LO file descriptor for the smart large object from which to read. For more information on an LO file descriptor, see page 7-23.
buf
is a pointer to a character buffer that contains the data that ifx_lo_read() reads from the smart large object.
nbytes
is the size, in bytes, of the buf character buffer. This value cannot exceed 2 gigabytes.
is a pointer to an integer that contains the error code that ifx_lo_read() sets.
>=0
The number of bytes that the function has read from the smart large object into the buf character buffer.
is a pointer to a character buffer that contains the data that ifx_lo_readwithseek() reads from the smart large object.
offset
is a pointer to the 8-byte integer (INT8) offset from the starting seek position.
whence
is an integer value that identifies the starting seek position.
is a pointer to an integer that contains the error code that ifx_lo_readwithseek() sets.
LO_SEEK_SET
The start of the smart large object
LO_SEEK_CUR
The current seek position in the smart large object
LO_SEEK_END
The end of the smart large object
is the LO-pointer structure for the smart large object for which you want to release resources.
< 0
is the LO file descriptor for the smart large object whose seek position you wish to change. For more information on an LO file descriptor, see page 7-23.
is a pointer to the 8-byte integer offset from the starting seek position.
seek_pos
is a pointer to the 8-byte integer that identifies the new seek position.
is a pointer to the LO-specification structure to free. For information on the LO-specification structure, see page 7-7.
is a pointer to the LO-specification structure from which to obtain the estimated size. For information on the LO-specification structure, see page 7-7.
estbytes
is a pointer to an ifx_int8_t structure into which ifx_lo_specget_estbytes() puts the estimated number of bytes for the smart large object.
is a pointer to the LO-specification structure from which to obtain the extent size. For information on the LO-specification structure, see page 7-7.
The function was successful and the return value indicates the extent size.
is a pointer to the LO-specification structure from which to obtain the flag value. For information on the LO-specification structure, see page 7-7.
The function was successful and the return value is the value of the create-time flags.
is a pointer to the LO-specification structure from which to obtain the maximum size. For information on the LO-specification structure, see page 7-7.
maxbytes
is a pointer to an int8 value into which ifx_lo_specget_maxbytes() puts the maximum size, in bytes, of the smart large object.
is a pointer to the LO-specification structure from which to obtain the sbspace name. For information on the LO-specification structure, see page 7-7.
sbspace_name
is a character buffer into which ifx_lo_specget_sbspace() puts the name of the sbspace for the smart large object.
length
is an integer value that specifies the size, in bytes, of the sbspace_name buffer.
is a pointer to the LO-specification structure in which to save the estimated size. For information on the LO-specification structure, see page 7-7.
is a pointer to an ifx_int8_t structure that contains the estimated number of bytes for the smart large object.
If you do not specify an estbytes value when you create a new smart large object, Universal Server obtains the value from the inheritance hierarchy of storage characteristics. For more information on the inheritance hierarchy, see "Obtaining Storage Characteristics".
Do not change this system value unless you know the estimated size for the smart large object. If you do set the estimated size for a smart large object, do not specify a value much higher than the final size of the smart large object. Otherwise, the database server might allocated unused storage. Return Values
is a pointer to the LO-specification structure in which to save the extent size. For information on the LO-specification structure, see page 7-7.
extsz
is an integer value for the size of the allocation extent of a smart large object.
If you do not specify an extsz value when you create a new smart large object, Universal Server attempts to optimize the extent size based on past operations on the smart large object and other storage characteristics (such as maximum bytes) that it obtains from the inheritance hierarchy of storage characteristics. For more information on the inheritance hierarchy, see "Obtaining Storage Characteristics".
Do not change this system value unless you know the allocation extent size for the smart large object. Only applications that encounter severe storage fragmentation should ever set the allocation extent size. For such applications, make sure you know exactly the number of bytes by which to extend the smart large object. Return Values
is a pointer to the LO-specification structure in which to save the flags value. For information on the LO-specification structure, see page 7-7.
is an integer value for the create-time flags of the smart large object.
If you do not specify a flags value when you create a new smart large object, Universal Server obtains the value from the inheritance hierarchy of storage characteristics. For more information on the inheritance hierarchy, see "Obtaining Storage Characteristics".
is a pointer to the LO-specification structure in which to save the maximum size. For information on the LO-specification structure, see page 7-7.
is a pointer to an ifx_int8_t structure that contains the maximum number of bytes for the smart large object.
is a pointer to a buffer that contains the name of the sbspace in which to store the smart large object.
is a pointer to the LO-specification structure in which to save the sbspace name. For information on the LO-specification structure, see page 7-7.
is the LO file descriptor for the open smart large object whose status information you wish to obtain. For more information on an LO file descriptor, see page 7-23.
LO_stat
is a pointer that points to a pointer to an LO-status structure that ifx_lo_stat() allocates and fills in with status information. For more information on the LO-status structure, see page 7-30.
Use the ifx_lo_stat_free() function to deallocate an LO-status structure. Return Values
is a pointer to an LO-status structure that ifx_lo_stat() allocates and fills in with status information. For more information on the LO-status structure, see page 7-30.
The last-access time for the smart large object that LO_stat identifies.
The status information for the smart large object is in the LO-status structure to which LO_stat points. The ifx_lo_stat() function allocates this structure and fills it with the status information for a particular smart large object. Therefore, you must precede a call to ifx_lo_stat_cspec() with a call to ifx_lo_stat(). Return Values
A valid pointer to an LO-specification (ifx_lo_create_spec_t) structure
The last-change time for the smart large object that LO_stat identifies.
is a pointer to an LO-status structure that the ifx_lo_stat() function has allocated. For more information on the LO-status structure, see page 7-30.
The last-modification time for the smart large object that LO_stat identifies.
The reference count for the smart large object that LO_stat identifies.
is a pointer to an ifx_int8_t structure that ifx_lo_stat_size() fills with the size in bytes, of the smart large object.
is the LO file descriptor for the open smart large object whose seek position you wish to determine. For more information on an LO file descriptor, see page 7-23.
is a pointer to the 8-byte integer that identifies the current seek position.
is the LO-pointer structure for the smart large object from which you want to copy the data.
is an integer that identifies the number of bytes to copy from the smart large object
buf_ptr
is a doubly indirect pointer to a user-defined buffer to which you want to copy the data.
contains the address of the integer that holds the error code that ifx_lo_to_buffer() sets
The number of bytes copied from the smart large object to the user-defined buffer that buf_ptr identifies.
is the LO file descriptor for the open smart large object whose value you wish to truncate. For more information on an LO file descriptor, see page 7-23.
is a pointer to the 8-byte integer that identifies the offset at which the truncation of the smart large object begins.
is the LO file descriptor for the smart large object to which to write. For more information on an LO file descriptor, see page 7-23.
is a pointer to a buffer that contains the data that the function writes to the smart large object.
is the number of bytes to write to the smart large object. This value cannot exceed 2 gigabytes.
is a pointer to an integer that contains the error code that ifx_lo_write() sets.
The number of bytes that the function has written from the buf character buffer to open the smart large object.
is a pointer to an integer that contains the error code that ifx_lo_writewithseek() sets.
The number of bytes that the function has written from the buf character buffer to the smart large object.