gooderp18绿色标准版
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

95 lines
2.4KB

  1. /*
  2. * this is a small part of c.h since we don't want to leak all postgres
  3. * definitions into ecpg programs
  4. * src/interfaces/ecpg/include/ecpglib.h
  5. */
  6. #ifndef _ECPGLIB_H
  7. #define _ECPGLIB_H
  8. #include "libpq-fe.h"
  9. #include "ecpgtype.h"
  10. #include "sqlca.h"
  11. #include <string.h>
  12. #ifndef __cplusplus
  13. #ifndef bool
  14. #define bool char
  15. #endif /* ndef bool */
  16. #ifndef true
  17. #define true ((bool) 1)
  18. #endif /* ndef true */
  19. #ifndef false
  20. #define false ((bool) 0)
  21. #endif /* ndef false */
  22. #endif /* not C++ */
  23. #ifndef TRUE
  24. #define TRUE 1
  25. #endif /* TRUE */
  26. #ifndef FALSE
  27. #define FALSE 0
  28. #endif /* FALSE */
  29. #ifdef __cplusplus
  30. extern "C"
  31. {
  32. #endif
  33. void ECPGdebug(int, FILE *);
  34. bool ECPGstatus(int, const char *);
  35. bool ECPGsetcommit(int, const char *, const char *);
  36. bool ECPGsetconn(int, const char *);
  37. bool ECPGconnect(int, int, const char *, const char *, const char *, const char *, int);
  38. bool ECPGdo(const int, const int, const int, const char *, const bool, const int, const char *,...);
  39. bool ECPGtrans(int, const char *, const char *);
  40. bool ECPGdisconnect(int, const char *);
  41. bool ECPGprepare(int, const char *, const bool, const char *, const char *);
  42. bool ECPGdeallocate(int, int, const char *, const char *);
  43. bool ECPGdeallocate_all(int, int, const char *);
  44. char *ECPGprepared_statement(const char *, const char *, int);
  45. PGconn *ECPGget_PGconn(const char *);
  46. PGTransactionStatusType ECPGtransactionStatus(const char *);
  47. char *ECPGerrmsg(void);
  48. /* print an error message */
  49. void sqlprint(void);
  50. /* define this for simplicity as well as compatibility */
  51. #define SQLCODE sqlca.sqlcode
  52. #define SQLSTATE sqlca.sqlstate
  53. /* dynamic SQL */
  54. bool ECPGdo_descriptor(int, const char *, const char *, const char *);
  55. bool ECPGdeallocate_desc(int, const char *);
  56. bool ECPGallocate_desc(int, const char *);
  57. bool ECPGget_desc_header(int, const char *, int *);
  58. bool ECPGget_desc(int, const char *, int,...);
  59. bool ECPGset_desc_header(int, const char *, int);
  60. bool ECPGset_desc(int, const char *, int,...);
  61. void ECPGset_noind_null(enum ECPGttype, void *);
  62. bool ECPGis_noind_null(enum ECPGttype, const void *);
  63. bool ECPGdescribe(int, int, bool, const char *, const char *,...);
  64. void ECPGset_var(int, void *, int);
  65. void *ECPGget_var(int number);
  66. /* dynamic result allocation */
  67. void ECPGfree_auto_mem(void);
  68. #ifdef ENABLE_THREAD_SAFETY
  69. void ecpg_pthreads_init(void);
  70. #endif
  71. #ifdef __cplusplus
  72. }
  73. #endif
  74. #endif /* _ECPGLIB_H */
上海开阖软件有限公司 沪ICP备12045867号-1