1
0
mirror of https://github.com/danog/postgres.git synced 2024-12-13 18:07:31 +01:00
postgres/lib/TupleResult.php

27 lines
546 B
PHP
Raw Normal View History

2016-12-30 06:21:17 +01:00
<?php
2016-09-14 16:27:39 +02:00
namespace Amp\Postgres;
2017-05-16 06:14:02 +02:00
use Amp\Iterator;
use Amp\Promise;
2017-11-16 16:43:18 +01:00
interface TupleResult extends Iterator {
const FETCH_ARRAY = 0;
const FETCH_ASSOC = 1;
const FETCH_OBJECT = 2;
2017-05-16 06:14:02 +02:00
/**
* {@inheritdoc}
2017-05-26 05:47:49 +02:00
*
2017-11-16 16:43:18 +01:00
* @param int $type Next row fetch type. Use the FETCH_* constants provided by this interface.
2017-05-16 06:14:02 +02:00
*/
2017-11-16 16:43:18 +01:00
public function advance(int $type = self::FETCH_ASSOC): Promise;
2016-09-14 16:27:39 +02:00
/**
* Returns the number of fields (columns) in each row.
*
* @return int
*/
2017-11-16 16:43:18 +01:00
public function numFields(): int;
2016-09-14 16:27:39 +02:00
}