|
| const | CREATE = 'CREATE VIEW %s AS %s' |
| |
| const | DROP = 'DROP VIEW %s' |
| |
| const | SELECT = 'SELECT * FROM %s' |
| |
Definition at line 35 of file View.php.
constructor
- Parameters
-
Definition at line 82 of file View.php.
{
$this->_name = $viewName;
$this->_query = $query;
$this->_dql = $query->
getDql();
}
| Doctrine_View::create |
( |
| ) |
|
creates this view
- Exceptions
-
- Returns
- void
Definition at line 128 of file View.php.
{
$sql = sprintf(self::CREATE, $this->_name, $this->_query->getSqlQuery());
try {
$this->_conn->execute($sql, $this->_query->getFlattenedParams());
}
}
drops this view from the database
- Exceptions
-
- Returns
- void
Definition at line 144 of file View.php.
{
try {
$this->_conn->execute(sprintf(self::DROP, $this->_name));
}
}
| Doctrine_View::execute |
( |
| ) |
|
| Doctrine_View::getConnection |
( |
| ) |
|
| Doctrine_View::getName |
( |
| ) |
|
returns the name of this view
- Returns
- string
Definition at line 107 of file View.php.
| Doctrine_View::getQuery |
( |
| ) |
|
returns the associated query object
- Returns
- Doctrine_Query
Definition at line 97 of file View.php.
{
return $this->_query;
}
| Doctrine_View::getSelectSql |
( |
| ) |
|
returns the select sql for this view
- Returns
- string
Definition at line 168 of file View.php.
{
return sprintf(self::SELECT, $this->_name);
}
| Doctrine_View::getViewDql |
( |
| ) |
|
Get the view dql string
- Returns
- string $dql
Definition at line 188 of file View.php.
| Doctrine_View::getViewSql |
( |
| ) |
|
Get the view sql string
- Returns
- string $sql
Definition at line 178 of file View.php.
| const Doctrine_View::CREATE = 'CREATE VIEW %s AS %s' |
SQL CREATE constant
Definition at line 45 of file View.php.
| const Doctrine_View::DROP = 'DROP VIEW %s' |
SQL DROP constant
Definition at line 40 of file View.php.
| const Doctrine_View::SELECT = 'SELECT * FROM %s' |
SQL SELECT constant
Definition at line 50 of file View.php.
The documentation for this class was generated from the following file: