capabilities.js 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /**
  2. * Capabilities list ( with 'CLIENT_' removed)
  3. * see : https://mariadb.com/kb/en/library/1-connecting-connecting/#capabilities
  4. */
  5. /* mysql/old mariadb server/client */
  6. module.exports.MYSQL = BigInt(1);
  7. /* Found instead of affected rows */
  8. module.exports.FOUND_ROWS = BigInt(2);
  9. /* get all column flags */
  10. module.exports.LONG_FLAG = BigInt(4);
  11. /* one can specify db on connect */
  12. module.exports.CONNECT_WITH_DB = BigInt(8);
  13. /* don't allow database.table.column */
  14. module.exports.NO_SCHEMA = BigInt(1) << BigInt(4);
  15. /* can use compression protocol */
  16. module.exports.COMPRESS = BigInt(1) << BigInt(5);
  17. /* odbc client */
  18. module.exports.ODBC = BigInt(1) << BigInt(6);
  19. /* can use LOAD DATA LOCAL */
  20. module.exports.LOCAL_FILES = BigInt(1) << BigInt(7);
  21. /* ignore spaces before '' */
  22. module.exports.IGNORE_SPACE = BigInt(1) << BigInt(8);
  23. /* new 4.1 protocol */
  24. module.exports.PROTOCOL_41 = BigInt(1) << BigInt(9);
  25. /* this is an interactive client */
  26. module.exports.INTERACTIVE = BigInt(1) << BigInt(10);
  27. /* switch to ssl after handshake */
  28. module.exports.SSL = BigInt(1) << BigInt(11);
  29. /* IGNORE sigpipes */
  30. module.exports.IGNORE_SIGPIPE = BigInt(1) << BigInt(12);
  31. /* client knows about transactions */
  32. module.exports.TRANSACTIONS = BigInt(1) << BigInt(13);
  33. /* old flag for 4.1 protocol */
  34. module.exports.RESERVED = BigInt(1) << BigInt(14);
  35. /* new 4.1 authentication */
  36. module.exports.SECURE_CONNECTION = BigInt(1) << BigInt(15);
  37. /* enable/disable multi-stmt support */
  38. module.exports.MULTI_STATEMENTS = BigInt(1) << BigInt(16);
  39. /* enable/disable multi-results */
  40. module.exports.MULTI_RESULTS = BigInt(1) << BigInt(17);
  41. /* multi-results in ps-protocol */
  42. module.exports.PS_MULTI_RESULTS = BigInt(1) << BigInt(18);
  43. /* client supports plugin authentication */
  44. module.exports.PLUGIN_AUTH = BigInt(1) << BigInt(19);
  45. /* permits connection attributes */
  46. module.exports.CONNECT_ATTRS = BigInt(1) << BigInt(20);
  47. /* Enable authentication response packet to be larger than 255 bytes. */
  48. module.exports.PLUGIN_AUTH_LENENC_CLIENT_DATA = BigInt(1) << BigInt(21);
  49. /* Don't close the connection for a connection with expired password. */
  50. module.exports.CAN_HANDLE_EXPIRED_PASSWORDS = BigInt(1) << BigInt(22);
  51. /* Capable of handling server state change information. Its a hint to the
  52. server to include the state change information in Ok packet. */
  53. module.exports.SESSION_TRACK = BigInt(1) << BigInt(23);
  54. /* Client no longer needs EOF packet */
  55. module.exports.DEPRECATE_EOF = BigInt(1) << BigInt(24);
  56. module.exports.SSL_VERIFY_SERVER_CERT = BigInt(1) << BigInt(30);
  57. /* MariaDB extended capabilities */
  58. /* Permit bulk insert*/
  59. module.exports.MARIADB_CLIENT_STMT_BULK_OPERATIONS = BigInt(1) << BigInt(34);
  60. /* Clients supporting extended metadata */
  61. module.exports.MARIADB_CLIENT_EXTENDED_TYPE_INFO = BigInt(1) << BigInt(35);