PageRenderTime 45ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/Crystal/Manipulation/Postgres/Rename.php

http://github.com/martinrusev/Crystal
PHP | 48 lines | 14 code | 21 blank | 13 comment | 0 complexity | 8d2adb8ff1513f3350759cdb09e1c860 MD5 | raw file
Possible License(s): LGPL-2.1
  1. <?php
  2. /**
  3. * Crystal DBAL
  4. *
  5. * An open source application for database manipulation
  6. *
  7. * @package Crystal DBAL
  8. * @author Martin Rusev
  9. * @link http://crystal.martinrusev.net
  10. * @since Version 0.1
  11. * @version 0.1
  12. */
  13. // ------------------------------------------------------------------------
  14. class Crystal_Manipulation_Postgres_Rename
  15. {
  16. function __construct($method, $params)
  17. {
  18. $this->rename = "RENAME TABLE" . Crystal_Helper_Postgres::add_single_quote($params[0]);
  19. $this-> rename .= "TO";
  20. $this->rename .= Crystal_Helper_Postgres::add_single_quote($params[1]);
  21. }
  22. public function __toString()
  23. {
  24. return $this->rename;
  25. }
  26. }
  27. //RENAME TABLE current_db.tbl_name TO other_db.tbl_name;