index.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. 'use strict';
  2. class AbstractDialect {}
  3. AbstractDialect.prototype.supports = {
  4. 'DEFAULT': true,
  5. 'DEFAULT VALUES': false,
  6. 'VALUES ()': false,
  7. 'LIMIT ON UPDATE': false,
  8. 'ORDER NULLS': false,
  9. 'UNION': true,
  10. 'UNION ALL': true,
  11. 'RIGHT JOIN': true,
  12. /* does the dialect support returning values for inserted/updated fields */
  13. returnValues: false,
  14. /* features specific to autoIncrement values */
  15. autoIncrement: {
  16. /* does the dialect require modification of insert queries when inserting auto increment fields */
  17. identityInsert: false,
  18. /* does the dialect support inserting default/null values for autoincrement fields */
  19. defaultValue: true,
  20. /* does the dialect support updating autoincrement fields */
  21. update: true
  22. },
  23. /* Do we need to say DEFAULT for bulk insert */
  24. bulkDefault: false,
  25. schemas: false,
  26. transactions: true,
  27. settingIsolationLevelDuringTransaction: true,
  28. transactionOptions: {
  29. type: false
  30. },
  31. migrations: true,
  32. upserts: true,
  33. inserts: {
  34. ignoreDuplicates: '', /* dialect specific words for INSERT IGNORE or DO NOTHING */
  35. updateOnDuplicate: false, /* whether dialect supports ON DUPLICATE KEY UPDATE */
  36. onConflictDoNothing: '' /* dialect specific words for ON CONFLICT DO NOTHING */
  37. },
  38. constraints: {
  39. restrict: true,
  40. addConstraint: true,
  41. dropConstraint: true,
  42. unique: true,
  43. default: false,
  44. check: true,
  45. foreignKey: true,
  46. primaryKey: true
  47. },
  48. index: {
  49. collate: true,
  50. length: false,
  51. parser: false,
  52. concurrently: false,
  53. type: false,
  54. using: true,
  55. functionBased: false,
  56. operator: false
  57. },
  58. joinTableDependent: true,
  59. groupedLimit: true,
  60. indexViaAlter: false,
  61. JSON: false,
  62. deferrableConstraints: false
  63. };
  64. module.exports = AbstractDialect;
  65. module.exports.AbstractDialect = AbstractDialect;
  66. module.exports.default = AbstractDialect;