DBQueryInsert Class Reference
[Model]
An Insert Query. More...
Inheritance diagram for DBQueryInsert:
Public Member Functions |
|
get_select () | |
Return select query. |
|
get_sql () | |
Return SQL fragment. |
|
set_select (DBQuerySelect $query) | |
Set optional select query. |
|
Public Attributes |
|
const | DELAYED = 1 |
Delayed Insert Policy. |
|
const | IGNORE = 2 |
Ignore Errors Policy. |
|
Protected Attributes |
|
$select_query = null |
Detailed Description
An Insert Query.
Definition at line 8 of file dbquery.insert.cls.php.
Member Function Documentation
DBQueryInsert::get_select | ( | ) |
DBQueryInsert::get_sql | ( | ) |
Return SQL fragment.
- Returns:
- string
Implements IDBSqlBuilder.
Reimplemented in DBQueryReplace.
Definition at line 47 of file dbquery.insert.cls.php.
00047 { 00048 $params = array(); 00049 if ($this->policy & self::DELAYED) { 00050 $params['delayed'] = true; 00051 } 00052 if ($this->policy & self::IGNORE) { 00053 $params['ignore'] = true; 00054 } 00055 if (!empty($this->select_query)) { 00056 $params['select'] = $this->select_query; 00057 } 00058 $params['fields'] = $this->fields; 00059 $builder = DBSqlBuilderFactory::create_builder(DBSqlBuilderFactory::INSERT, $this, $params); 00060 return $builder->get_sql(); 00061 }
DBQueryInsert::set_select | ( | DBQuerySelect $ | query | ) |
Set optional select query.
- Parameters:
-
DBQuerySelect $query
Definition at line 29 of file dbquery.insert.cls.php.
Member Data Documentation
DBQueryInsert::$select_query = null
[protected] |
Definition at line 22 of file dbquery.insert.cls.php.
const DBQueryInsert::DELAYED = 1 |
Delayed Insert Policy.
Definition at line 12 of file dbquery.insert.cls.php.
const DBQueryInsert::IGNORE = 2 |
Ignore Errors Policy.
Definition at line 16 of file dbquery.insert.cls.php.
The documentation for this class was generated from the following file:
- gyro/core/model/base/queries/dbquery.insert.cls.php