DbSchemaReaderInterface.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Setup\Declaration\Schema\Db;
  7. /**
  8. * This class is responsible for read different schema
  9. * structural elements: indexes, constraints, table names and columns.
  10. */
  11. interface DbSchemaReaderInterface
  12. {
  13. /**
  14. * Read indexes from Magento tables.
  15. *
  16. * @param string $tableName
  17. * @param string $resource
  18. * @return array
  19. */
  20. public function readIndexes($tableName, $resource);
  21. /**
  22. * Read constraints from Magento tables.
  23. *
  24. * @param string $tableName
  25. * @param string $resource
  26. * @return array
  27. */
  28. public function readConstraints($tableName, $resource);
  29. /**
  30. * Read columns from Magento tables.
  31. *
  32. * @param string $tableName
  33. * @param string $resource
  34. * @return array
  35. */
  36. public function readColumns($tableName, $resource);
  37. /**
  38. * Show table options like engine, partitioning, etc.
  39. *
  40. * @param string $tableName
  41. * @param string $resource
  42. * @return array
  43. */
  44. public function getTableOptions($tableName, $resource);
  45. /**
  46. * Read references (foreign keys) from Magento tables.
  47. *
  48. * @param string $tableName
  49. * @param string $resource
  50. * @return array
  51. */
  52. public function readReferences($tableName, $resource);
  53. /**
  54. * Read table names from Magento tables.
  55. *
  56. * @param string $resource
  57. * @return array
  58. */
  59. public function readTables($resource);
  60. }