@@ 797-812 (lines=16) @@ | ||
794 | * @param string $procedureName Name of procedure to export |
|
795 | * @return null |
|
796 | */ |
|
797 | private function getProcedureStructure($procedureName) |
|
798 | { |
|
799 | if (!$this->dumpSettings['skip-comments']) { |
|
800 | $ret = "--" . PHP_EOL . |
|
801 | "-- Dumping routines for database '" . $this->dbName . "'" . PHP_EOL . |
|
802 | "--" . PHP_EOL . PHP_EOL; |
|
803 | $this->compressManager->write($ret); |
|
804 | } |
|
805 | $stmt = $this->typeAdapter->show_create_procedure($procedureName); |
|
806 | foreach ($this->dbHandler->query($stmt) as $r) { |
|
807 | $this->compressManager->write( |
|
808 | $this->typeAdapter->create_procedure($r, $this->dumpSettings) |
|
809 | ); |
|
810 | return; |
|
811 | } |
|
812 | } |
|
813 | ||
814 | /** |
|
815 | * Event structure extractor |
|
@@ 820-835 (lines=16) @@ | ||
817 | * @param string $eventName Name of event to export |
|
818 | * @return null |
|
819 | */ |
|
820 | private function getEventStructure($eventName) |
|
821 | { |
|
822 | if (!$this->dumpSettings['skip-comments']) { |
|
823 | $ret = "--" . PHP_EOL . |
|
824 | "-- Dumping events for database '" . $this->dbName . "'" . PHP_EOL . |
|
825 | "--" . PHP_EOL . PHP_EOL; |
|
826 | $this->compressManager->write($ret); |
|
827 | } |
|
828 | $stmt = $this->typeAdapter->show_create_event($eventName); |
|
829 | foreach ($this->dbHandler->query($stmt) as $r) { |
|
830 | $this->compressManager->write( |
|
831 | $this->typeAdapter->create_event($r, $this->dumpSettings) |
|
832 | ); |
|
833 | return; |
|
834 | } |
|
835 | } |
|
836 | ||
837 | /** |
|
838 | * Escape values with quotes when needed |