just another orm...
View the Project on GitHub tflori/orm
» API Reference » ORM\BulkInsert
public function __construct(
\ORM\Dbal\Dbal $dbal,
string $class,
int $limit = 20,
)
Parameter | Type | Description |
---|---|---|
$dbal |
ORM\Dbal\Dbal | |
$class |
string | |
$limit |
int |
ORM\BulkInsert::__construct
public function add(\ORM\Entity $entities): mixed
Returns | mixed | |
Throws | ORM\Exception\InvalidArgument |
Parameter | Type | Description |
---|---|---|
$entities |
ORM\Entity |
ORM\BulkInsert::add
public function finish(): \ORM\Entity[]
Returns | ORM\Entity[] |
ORM\BulkInsert::finish
public function getLimit(): int
Returns | int |
ORM\BulkInsert::getLimit
public function limit(int $limit): $this
Returns | $this |
Parameter | Type | Description |
---|---|---|
$limit |
int |
ORM\BulkInsert::limit
public function noAutoIncrement(): $this
Caution: If this is disabled updating could cause a IncompletePrimaryKey exception.
Returns | $this |
ORM\BulkInsert::noAutoIncrement
public function noUpdates(): $this
Returns | $this |
ORM\BulkInsert::noUpdates
public function onSync(callable $callback = null): $this
Provides an array of the just inserted entities in first argument.
Returns | $this |
Parameter | Type | Description |
---|---|---|
$callback |
callable |
ORM\BulkInsert::onSync
public function updateEntities(): $this
Caution: This option will need to update the primary key by autoincrement which maybe is not supported by your db access layer (DBAL).
Returns | $this |
ORM\BulkInsert::updateEntities
public function useAutoincrement(): $this
Caution: Your db access layer (DBAL) may not support this feature.
Returns | $this |
ORM\BulkInsert::useAutoincrement