public function setMode(int $mode = PGSQL_ASSOC): self
    {
        if (PGSQL_ASSOC !== $mode && PGSQL_NUM !== $mode) {
            throw new exceptions\InvalidArgumentException(
                __METHOD__ . ' accepts either of PGSQL_ASSOC or PGSQL_NUM constants'
            );
        }
        $this->mode = $mode;

        return $this;
    }
public function setMode(int $mode = PGSQL_ASSOC): self
    {
        if (PGSQL_ASSOC !== $mode && PGSQL_NUM !== $mode) {
            throw new exceptions\InvalidArgumentException(
                __METHOD__ . ' accepts either of PGSQL_ASSOC or PGSQL_NUM constants'
            );
        }
        $this->mode = $mode;

        return $this;
    }
public function setMode ( int $ mode = PGSQL_ASSOC ) : self { if ( PGSQL_ASSOC !== $ mode && PGSQL_NUM !== $ mode ) { throw new exceptions \ InvalidArgumentException ( __METHOD__ . ' accepts either of PGSQL_ASSOC or PGSQL_NUM constants' ) ; } $ this -> mode = $ mode ; return $ this ; }
Sets how the returned rows are indexed

@param int $mode either PGSQL_ASSOC or PGSQL_NUM constants. PGSQL_BOTH is not
accepted, since it will lead to double the type conversion
work for questionable benefits.
@return $this
@throws exceptions\InvalidArgumentException
Sets how the returned rows are indexed