sqlda.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Licensed Materials - Property of IBM and/or HCL
  3. *
  4. * IBM Informix Dynamic Server
  5. * (c) Copyright IBM Corporation 1996, 2004 All rights reserved.
  6. * (c) Copyright HCL Technologies Ltd. 2017. All Rights Reserved.
  7. *
  8. ***************************************************************************
  9. *
  10. * Title: sqlda.h
  11. * Description:
  12. * SQL Data Description Area
  13. *
  14. ***************************************************************************
  15. */
  16. #ifndef _SQLDA
  17. #define _SQLDA
  18. #include "ifxtypes.h"
  19. typedef struct sqlvar_struct
  20. {
  21. int2 sqltype; /* variable type */
  22. int4 sqllen; /* length in bytes */
  23. char *sqldata; /* pointer to data */
  24. int2 *sqlind; /* pointer to indicator */
  25. char *sqlname; /* variable name */
  26. char *sqlformat; /* reserved for future use */
  27. int2 sqlitype; /* ind variable type */
  28. int2 sqlilen; /* ind length in bytes */
  29. char *sqlidata; /* ind data pointer */
  30. int4 sqlxid; /* extended id type */
  31. char *sqltypename; /* extended type name */
  32. int2 sqltypelen; /* length of extended type name */
  33. int2 sqlownerlen; /* length of owner name */
  34. int2 sqlsourcetype; /* source type for distinct of built-ins */
  35. char *sqlownername; /* owner name */
  36. int4 sqlsourceid; /* extended id of source type */
  37. /*
  38. * sqlilongdata is new. It supports data that exceeds the 32k
  39. * limit. sqlilen and sqlidata are for backward compatibility
  40. * and they have maximum value of <32K.
  41. */
  42. char *sqlilongdata; /* for data field beyond 32K */
  43. int4 sqlflags; /* for internal use only */
  44. void *sqlreserved; /* reserved for future use */
  45. } ifx_sqlvar_t;
  46. typedef struct sqlda
  47. {
  48. int2 sqld;
  49. ifx_sqlvar_t *sqlvar;
  50. char desc_name[19]; /* descriptor name */
  51. int2 desc_occ; /* size of sqlda structure */
  52. struct sqlda *desc_next; /* pointer to next sqlda struct */
  53. void *reserved; /* reserved for future use */
  54. } ifx_sqlda_t;
  55. #endif /* _SQLDA */