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