123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- /***************************************************************************
- *
- * INFORMIX SOFTWARE, INC.
- *
- * PROPRIETARY DATA
- *
- * THIS DOCUMENT CONTAINS TRADE SECRET DATA WHICH IS THE PROPERTY OF
- * INFORMIX SOFTWARE, INC. THIS DOCUMENT IS SUBMITTED TO RECIPIENT IN
- * CONFIDENCE. INFORMATION CONTAINED HEREIN MAY NOT BE USED, COPIED OR
- * DISCLOSED IN WHOLE OR IN PART EXCEPT AS PERMITTED BY WRITTEN AGREEMENT
- * SIGNED BY AN OFFICER OF INFORMIX SOFTWARE, INC.
- *
- * THIS MATERIAL IS ALSO COPYRIGHTED AS AN UNPUBLISHED WORK UNDER
- * SECTIONS 104 AND 408 OF TITLE 17 OF THE UNITED STATES CODE.
- * UNAUTHORIZED USE, COPYING OR OTHER REPRODUCTION IS PROHIBITED BY LAW.
- *
- *
- * Title: lldesqlc.h
- * CCid: %W% %E% %U%
- * Author: Craig Freedman
- * Created: Mon Aug 19 1996
- * Description: External include file for the ESQL/C interface
- * of the LOB Locator DataBlade
- *
- ***************************************************************************/
- EXEC SQL ifndef IXIlldesqlc_h;
- EXEC SQL define IXIlldesqlc_h;
- /* ESQL/C macro for the LLD_Locator row type */
- /* add lo_reserved field to LLD_Locator_EC! */
- EXEC SQL define LLD_Locator_EC (lo_protocol char(LLD_PROTOCOL_LEN), lo_pointer LLD_Lob, lo_location lvarchar(LLD_LOCATOR_LEN));
- /* values for the type field of lld_lob_t */
- #define LLD_BLOB 0
- #define LLD_CLOB 1
- /* values for the lld_open flags argument */
- #define LLD_RDONLY 1 /* open LOB for read-only access */
- #define LLD_WRONLY 2 /* open LOB for write-only access */
- #define LLD_RDWR 4 /* open LOB for read-write access */
- #define LLD_TRUNC 8 /* truncate LOB to zero length */
- #define LLD_APPEND 16 /* open LOB for appending (seek to end) */
- #define LLD_SEQ 32 /* open LOB for sequential access only */
- #define LLD_NOBUFFER 64 /* open LOB for lite io */
- /* values for the lld_seek whence argument */
- #define LLD_SEEK_CUR LO_SEEK_CUR /* seek relative to current position */
- #define LLD_SEEK_SET LO_SEEK_SET /* seek relative to beginning of LOB */
- #define LLD_SEEK_END LO_SEEK_END /* seek relative to end of LOB */
- /* LLD_Locator field sizes */
- EXEC SQL define LLD_PROTOCOL_LEN 18;
- EXEC SQL define LLD_LOCATOR_LEN 1024;
- /* error codes */
- #define LLD_E_OK 0 /* no error */
- #define LLD_E_SQL -1 /* SQL error (ESQL/C only) */
- #define LLD_E_INTERNAL -2 /* internal LLD error */
- #define LLD_E_ERRNO -3 /* OS error */
- #define LLD_E_ROW -4 /* invalid ROW type */
- #define LLD_E_PROTOCOL -5 /* invalid lo_protocol value */
- #define LLD_E_LOCATION -6 /* invalid lo_location value */
- #define LLD_E_EXISTS -7 /* attempt to (re)create an existing LOB */
- #define LLD_E_NOTEXIST -8 /* attempt to open a non-existing LOB */
- #define LLD_E_FLAGS -9 /* invalid open flags combination */
- #define LLD_E_LLDIO -10 /* corrupted LLD_IO structure */
- #define LLD_E_RDONLY -11 /* attempt to write a read-only LOB */
- #define LLD_E_WRONLY -12 /* attempt to read a write-only LOB */
- #define LLD_E_SEQ -13 /* attempt to seek a sequential-only LOB */
- #define LLD_E_WHENCE -14 /* invalid whence (seek) value */
- #define LLD_E_OFFSET -15 /* attempt to seek to an invalid offset */
- #define LLD_E_MEMORY -101 /* out of memory */
- #define LLD_E_SERRNO -102 /* server OS error */
- /* IFXLOB user defined base type */
- typedef struct
- {
- ifx_lo_t lo; /* smartblob pointer */
- int type; /* LLD_BLOB or LLD_CLOB */
- } lld_lob_t;
- /* the LLD_IO structure is opaque */
- typedef struct LLD_IO LLD_IO;
- /* function prototypes */
- /* ROW LLD_Locator_EC */ ifx_collection_t* lld_create
- (/* ROW LLD_Locator_EC */ ifx_collection_t* lob,
- int* error);
- int lld_create_client (char* path,
- int* error);
- LLD_IO* lld_open (/* ROW LLD_Locator_EC */ ifx_collection_t* lob,
- int flags,
- int* error);
- LLD_IO* lld_open_client (char* path,
- int flags,
- int* error);
- int lld_read (LLD_IO* io,
- void* buffer,
- int bytes,
- int* error);
- int lld_write (LLD_IO* io,
- void* buffer,
- int bytes,
- int* error);
- int lld_seek (LLD_IO* io,
- ifx_int8_t* offset,
- int whence,
- ifx_int8_t* new_offset,
- int* error);
- int lld_tell (LLD_IO* io,
- ifx_int8_t* new_offset,
- int* error);
- int lld_close (LLD_IO* io,
- int* error);
- int lld_delete (/* ROW LLD_Locator_EC */ ifx_collection_t* lob,
- int* error);
- int lld_delete_client (char* path,
- int* error);
- /* ROW LLD_Locator_EC */ ifx_collection_t* lld_copy
- (/* ROW LLD_Locator_EC */ ifx_collection_t* src,
- /* ROW LLD_Locator_EC */ ifx_collection_t* dest,
- int* error);
- /* row LLD_Locator_EC */ ifx_collection_t* lld_from_client
- (char* src,
- /* ROW LLD_Locator_EC */ ifx_collection_t* dest,
- int* error);
- int lld_to_client (/* ROW LLD_Locator_EC */ ifx_collection_t* src,
- char* dest,
- int* error);
- char* lld_sqlstate (int error);
- EXEC SQL endif;
|