Mysqli.hx 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. * Copyright (C)2005-2019 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. package php.db;
  23. import haxe.extern.*;
  24. import php.*;
  25. import haxe.Constraints.Function;
  26. /**
  27. @see http://php.net/manual/en/class.mysqli.php
  28. **/
  29. @:native('Mysqli')
  30. extern class Mysqli {
  31. var affected_rows(default, null):Int;
  32. var client_info(default, null):String;
  33. var client_version(default, null):Int;
  34. var connect_errno(default, null):Int;
  35. var connect_error(default, null):String;
  36. var errno(default, null):Int;
  37. var error_list(default, null):NativeAssocArray<Scalar>;
  38. var error(default, null):String;
  39. var field_count(default, null):Int;
  40. var host_info(default, null):String;
  41. var protocol_version(default, null):String;
  42. var server_info(default, null):String;
  43. var server_version(default, null):Int;
  44. var info(default, null):String;
  45. var insert_id(default, null):EitherType<Int, String>;
  46. var sqlstate(default, null):String;
  47. var thread_id(default, null):Int;
  48. var warning_count(default, null):Int;
  49. static function poll(read:Ref<NativeArray>, error:Ref<NativeArray>, reject:Ref<NativeArray>, sec:Int, ?usec:Int):Int;
  50. function new(?host:String, ?username:String, ?passwd:String, dbname:String = "", ?port:Int, ?socket:String):Void;
  51. function autocommit(mode:Bool):Bool;
  52. function begin_transaction(?flags:Int, ?name:String):Bool;
  53. function change_user(user:String, password:String, database:String):Bool;
  54. function character_set_name():String;
  55. function close():Bool;
  56. function commit(?flags:Int, ?name:String):Bool;
  57. function debug(message:String):Bool;
  58. function dump_debug_info():Bool;
  59. function get_charset():{
  60. charset:String,
  61. collation:String,
  62. dir:String,
  63. min_length:Int,
  64. number:Int,
  65. state:Int
  66. };
  67. function get_client_info():String;
  68. function get_connection_stats():Bool;
  69. function get_warnings():Mysqli_warning;
  70. function init():Mysqli;
  71. function kill(processid:Int):Bool;
  72. function more_results():Bool;
  73. function multi_query(query:String):Bool;
  74. function next_result():Bool;
  75. function options(option:Int, value:Scalar):Bool;
  76. function ping():Bool;
  77. function prepare(query:String):Mysqli_stmt;
  78. function query(query:String, ?resultmode:Int):EitherType<Bool, Mysqli_result>;
  79. function real_connect(?host:String, ?username:String, ?passwd:String, ?dbname:String, ?port:Int, ?socket:String, ?flags:Int):Bool;
  80. function escape_string(escapestr:String):String;
  81. function real_query(query:String):Bool;
  82. function reap_async_query():Mysqli_result;
  83. function refresh(options:Int):Bool;
  84. function rollback(?flags:Int, ?name:String):Bool;
  85. function rpl_query_type(query:String):Int;
  86. function select_db(dbname:String):Bool;
  87. function send_query(query:String):Bool;
  88. function set_charset(charset:String):Bool;
  89. function set_local_infile_handler(read_func:Function):Bool;
  90. function ssl_set(key:String, cert:String, ca:String, capath:String, cipher:String):Bool;
  91. function stat():String;
  92. function stmt_init():Mysqli_stmt;
  93. function store_result(?option:Int):Mysqli_result;
  94. function use_result():Mysqli_result;
  95. }