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