MySQL.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?php
  2. namespace Swoole;
  3. class MySQL
  4. {
  5. const STATE_QUERY = 0;
  6. const STATE_READ_START = 1;
  7. const STATE_READ_FIELD = 2;
  8. const STATE_READ_ROW = 3;
  9. const STATE_READ_END = 5;
  10. const STATE_CLOSED = 6;
  11. public $serverInfo = null;
  12. public $sock = -1;
  13. public $connected = false;
  14. public $errno = 0;
  15. public $connect_errno = 0;
  16. public $error = null;
  17. public $connect_error = null;
  18. public $insert_id = null;
  19. public $affected_rows = null;
  20. public $onConnect = null;
  21. public $onClose = null;
  22. public function __construct()
  23. {
  24. }
  25. public function __destruct()
  26. {
  27. }
  28. /**
  29. * @return mixed
  30. */
  31. public function connect(array $server_config, $callback)
  32. {
  33. }
  34. /**
  35. * @return mixed
  36. */
  37. public function begin($callback)
  38. {
  39. }
  40. /**
  41. * @return mixed
  42. */
  43. public function commit($callback)
  44. {
  45. }
  46. /**
  47. * @return mixed
  48. */
  49. public function rollback($callback)
  50. {
  51. }
  52. /**
  53. * @return mixed
  54. */
  55. public function escape($string, $flags = null)
  56. {
  57. }
  58. /**
  59. * @return mixed
  60. */
  61. public function query($sql, $callback)
  62. {
  63. }
  64. /**
  65. * @return mixed
  66. */
  67. public function close()
  68. {
  69. }
  70. /**
  71. * @return mixed
  72. */
  73. public function getState()
  74. {
  75. }
  76. /**
  77. * @return mixed
  78. */
  79. public function on($event_name, $callback)
  80. {
  81. }
  82. }