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