| 1 | <?php |
||
| 17 | class InsertQuery extends Query |
||
| 18 | { |
||
| 19 | use Executable; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var FromStatement |
||
| 23 | */ |
||
| 24 | protected $table; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var ValuesStatement |
||
| 28 | */ |
||
| 29 | protected $insertValues; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var array |
||
| 33 | */ |
||
| 34 | protected $values = []; |
||
| 35 | |||
| 36 | public function __construct() |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Sets the table for the query. |
||
| 44 | * |
||
| 45 | * @param string $table table name |
||
| 46 | * |
||
| 47 | * @return self |
||
| 48 | */ |
||
| 49 | public function into($table) |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Sets the values for the query. |
||
| 58 | * |
||
| 59 | * @param array $values |
||
| 60 | * |
||
| 61 | * @return self |
||
| 62 | */ |
||
| 63 | public function values(array $values) |
||
| 69 | |||
| 70 | /** |
||
| 71 | * Gets the table for the query. |
||
| 72 | * |
||
| 73 | * @return string |
||
| 74 | */ |
||
| 75 | public function getInto() |
||
| 79 | |||
| 80 | /** |
||
| 81 | * Gets the insert values for the query. |
||
| 82 | * |
||
| 83 | * @return InsertStatement |
||
| 84 | */ |
||
| 85 | public function getInsertValues() |
||
| 89 | |||
| 90 | /** |
||
| 91 | * Generates the raw SQL string for the query. |
||
| 92 | * |
||
| 93 | * @return string |
||
| 94 | */ |
||
| 95 | public function build() |
||
| 107 | } |
||
| 108 |