1 # mixed pq\Gateway\Table::create([array $data = NULL[, string $returning = "*"]])
3 Create a row in the table.
7 * Optional array $data = NULL
9 * Optional string $returning = "*"
10 What the INSERT should return.
14 * a [deferred promise of React/Promise](https://github.com/reactphp/promise#deferred-1), when using pq\Query\AsyncExecutor, the asynchronous executor.
16 * pq\Result, if pq\Result::$status != pq\Result::TUPLES_OK.
17 * pq\Result, if the rowset prototype pq\Gateway\Table::$rowset is empty.
18 * pq\Gateway\Rowset, an instance of the rowset prototype.
27 $accounts = new Table("account");
28 $mike = $accounts->create(["name" => "mike"])->current();