| @@ 781-796 (lines=16) @@ | ||
| 778 | * @param string $procedureName Name of procedure to export |
|
| 779 | * @return null |
|
| 780 | */ |
|
| 781 | private function getProcedureStructure($procedureName) |
|
| 782 | { |
|
| 783 | if (!$this->dumpSettings['skip-comments']) { |
|
| 784 | $ret = "--" . PHP_EOL . |
|
| 785 | "-- Dumping routines for database '" . $this->dbName . "'" . PHP_EOL . |
|
| 786 | "--" . PHP_EOL . PHP_EOL; |
|
| 787 | $this->compressManager->write($ret); |
|
| 788 | } |
|
| 789 | $stmt = $this->typeAdapter->show_create_procedure($procedureName); |
|
| 790 | foreach ($this->dbHandler->query($stmt) as $r) { |
|
| 791 | $this->compressManager->write( |
|
| 792 | $this->typeAdapter->create_procedure($r) |
|
| 793 | ); |
|
| 794 | return; |
|
| 795 | } |
|
| 796 | } |
|
| 797 | ||
| 798 | /** |
|
| 799 | * Event structure extractor |
|
| @@ 804-819 (lines=16) @@ | ||
| 801 | * @param string $eventName Name of event to export |
|
| 802 | * @return null |
|
| 803 | */ |
|
| 804 | private function getEventStructure($eventName) |
|
| 805 | { |
|
| 806 | if (!$this->dumpSettings['skip-comments']) { |
|
| 807 | $ret = "--" . PHP_EOL . |
|
| 808 | "-- Dumping events for database '" . $this->dbName . "'" . PHP_EOL . |
|
| 809 | "--" . PHP_EOL . PHP_EOL; |
|
| 810 | $this->compressManager->write($ret); |
|
| 811 | } |
|
| 812 | $stmt = $this->typeAdapter->show_create_event($eventName); |
|
| 813 | foreach ($this->dbHandler->query($stmt) as $r) { |
|
| 814 | $this->compressManager->write( |
|
| 815 | $this->typeAdapter->create_event($r) |
|
| 816 | ); |
|
| 817 | return; |
|
| 818 | } |
|
| 819 | } |
|
| 820 | ||
| 821 | /** |
|
| 822 | * Escape values with quotes when needed |
|