Insert.php from cycle/orm
// Source: https://github.com/cycle/orm | License: MIT | Copyright 2023 Spiral Scout
// Provided via justclaw.it.com; keep this notice with the code.
<?php
declare(strict_types=1);
namespace Cycle\ORM\Command\Database;
use Cycle\Database\DatabaseInterface;
use Cycle\Database\Query\ReturningInterface;
use Cycle\ORM\Command\StoreCommand;
use Cycle\ORM\Command\Traits\ErrorTrait;
use Cycle\ORM\Command\Traits\MapperTrait;
use Cycle\ORM\Heap\State;
use Cycle\ORM\MapperInterface;
use Cycle\ORM\Schema\GeneratedField;
/**
* Insert data into associated table and provide lastInsertID promise.
*/
final class Insert extends StoreCommand
{
use ErrorTrait;
use MapperTrait;
/**
* @param non-empty-string $table
* @param string[] $primaryKeys
* @param non-empty-string|null
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key