Ruckusing_Adapter_Sqlite3_Base::rename_table PHP 메소드

rename_table() 공개 메소드

public rename_table ( string $name, string $new_name ) : boolean
$name string
$new_name string
리턴 boolean
    public function rename_table($name, $new_name)
    {
        if (empty($name)) {
            throw new Ruckusing_Exception("Missing original column name parameter", Ruckusing_Exception::INVALID_ARGUMENT);
        }
        if (empty($new_name)) {
            throw new Ruckusing_Exception("Missing new column name parameter", Ruckusing_Exception::INVALID_ARGUMENT);
        }
        $sql = sprintf("ALTER TABLE %s RENAME TO %s", $this->identifier($name), $this->identifier($new_name));
        return $this->execute_ddl($sql);
    }

Usage Example

예제 #1
0
 /**
  * Rename a table
  *
  * @param string $name     the name of the table
  * @param string $new_name the new name of the table
  *
  * @return boolean
  */
 public function rename_table($name, $new_name)
 {
     return $this->_adapter->rename_table($name, $new_name);
 }