Insert
- Full name:
\Qubus\Expressive\Insert
Methods
returning
Returning (Postgres etc.)
Parameters:
| Parameter | Type | Description |
|---|---|---|
$cols | string |
upsert
Upsert (basic support)
public upsert(list<string> $conflictCols, array<string,mixed> $updateData): \Qubus\Expressive\Database
Parameters:
| Parameter | Type | Description |
|---|---|---|
$conflictCols | list | |
$updateData | array |
lastInsertId
Retrieves the ID of the last record inserted.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$pk | string|null |
insert
Insert one or more rows. Bulk rows must contain identical columns in identical order.
If a single row is inserted, its row instance is returned. Bulk inserts return the affected row count.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$data | array | Data to insert. |
Throws:
When the payload is empty or bulk rows have inconsistent columns. - QueryBuilderException