php_odbc.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 7 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2018 The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 3.01 of the PHP license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available through the world-wide-web at the following url: |
  10. | http://www.php.net/license/3_01.txt |
  11. | If you did not receive a copy of the PHP license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@php.net so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Authors: Stig Sæther Bakken <ssb@php.net> |
  16. | Andreas Karajannis <Andreas.Karajannis@gmd.de> |
  17. | Kevin N. Shallow <kshallow@tampabay.rr.com> |
  18. +----------------------------------------------------------------------+
  19. */
  20. #ifndef PHP_ODBC_H
  21. #define PHP_ODBC_H
  22. #if HAVE_UODBC
  23. #ifdef ZTS
  24. #include "TSRM.h"
  25. #endif
  26. extern zend_module_entry odbc_module_entry;
  27. #define odbc_module_ptr &odbc_module_entry
  28. #include "php_version.h"
  29. #define PHP_ODBC_VERSION PHP_VERSION
  30. #if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) || defined(HAVE_UNIXODBC) || defined(HAVE_IODBC)
  31. # define PHP_ODBC_HAVE_FETCH_HASH 1
  32. #endif
  33. /* user functions */
  34. PHP_MINIT_FUNCTION(odbc);
  35. PHP_MSHUTDOWN_FUNCTION(odbc);
  36. PHP_RINIT_FUNCTION(odbc);
  37. PHP_RSHUTDOWN_FUNCTION(odbc);
  38. PHP_MINFO_FUNCTION(odbc);
  39. PHP_FUNCTION(odbc_error);
  40. PHP_FUNCTION(odbc_errormsg);
  41. PHP_FUNCTION(odbc_setoption);
  42. PHP_FUNCTION(odbc_autocommit);
  43. PHP_FUNCTION(odbc_close);
  44. PHP_FUNCTION(odbc_close_all);
  45. PHP_FUNCTION(odbc_commit);
  46. PHP_FUNCTION(odbc_connect);
  47. PHP_FUNCTION(odbc_pconnect);
  48. PHP_FUNCTION(odbc_cursor);
  49. #ifdef HAVE_SQLDATASOURCES
  50. PHP_FUNCTION(odbc_data_source);
  51. #endif
  52. PHP_FUNCTION(odbc_do);
  53. PHP_FUNCTION(odbc_exec);
  54. PHP_FUNCTION(odbc_execute);
  55. #ifdef PHP_ODBC_HAVE_FETCH_HASH
  56. PHP_FUNCTION(odbc_fetch_array);
  57. PHP_FUNCTION(odbc_fetch_object);
  58. #endif
  59. PHP_FUNCTION(odbc_fetch_into);
  60. PHP_FUNCTION(odbc_fetch_row);
  61. PHP_FUNCTION(odbc_field_len);
  62. PHP_FUNCTION(odbc_field_scale);
  63. PHP_FUNCTION(odbc_field_name);
  64. PHP_FUNCTION(odbc_field_type);
  65. PHP_FUNCTION(odbc_field_num);
  66. PHP_FUNCTION(odbc_free_result);
  67. #if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30)
  68. PHP_FUNCTION(odbc_next_result);
  69. #endif
  70. PHP_FUNCTION(odbc_num_fields);
  71. PHP_FUNCTION(odbc_num_rows);
  72. PHP_FUNCTION(odbc_prepare);
  73. PHP_FUNCTION(odbc_result);
  74. PHP_FUNCTION(odbc_result_all);
  75. PHP_FUNCTION(odbc_rollback);
  76. PHP_FUNCTION(odbc_binmode);
  77. PHP_FUNCTION(odbc_longreadlen);
  78. PHP_FUNCTION(odbc_tables);
  79. PHP_FUNCTION(odbc_columns);
  80. #if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_35) /* not supported now */
  81. PHP_FUNCTION(odbc_columnprivileges);
  82. PHP_FUNCTION(odbc_tableprivileges);
  83. #endif
  84. #if !defined(HAVE_SOLID) || !defined(HAVE_SOLID_35) /* not supported */
  85. PHP_FUNCTION(odbc_foreignkeys);
  86. PHP_FUNCTION(odbc_procedures);
  87. PHP_FUNCTION(odbc_procedurecolumns);
  88. #endif
  89. PHP_FUNCTION(odbc_gettypeinfo);
  90. PHP_FUNCTION(odbc_primarykeys);
  91. PHP_FUNCTION(odbc_specialcolumns);
  92. PHP_FUNCTION(odbc_statistics);
  93. #ifdef PHP_WIN32
  94. # define PHP_ODBC_API __declspec(dllexport)
  95. #elif defined(__GNUC__) && __GNUC__ >= 4
  96. # define PHP_ODBC_API __attribute__ ((visibility("default")))
  97. #else
  98. # define PHP_ODBC_API
  99. #endif
  100. #else
  101. #define odbc_module_ptr NULL
  102. #endif /* HAVE_UODBC */
  103. #define phpext_odbc_ptr odbc_module_ptr
  104. #endif /* PHP_ODBC_H */
  105. /*
  106. * Local variables:
  107. * tab-width: 4
  108. * c-basic-offset: 4
  109. * End:
  110. */