Skip to content

Conversation

@prolic
Copy link
Contributor

@prolic prolic commented Sep 15, 2018

resolves #15

* @return int Number of fields in each row.
*/
public function numFields(): int
public function getNumFields(): int
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably be getFieldCount()?

*
* @throws \Error If the field number does not exist in the result.
*/
public function fieldName(int $fieldNum): string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to getFieldName()?

* @return int
*/
public function numFields(): int;
public function getNumFields(): int;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be added to Amp\Sql\ResultSet or does MySQL not provide this information upfront?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amp\Mysql has this: public function getFields(): Promise

But it's written with Amp\Socket, so we can probably refactor it.

@trowski trowski merged commit 90fae70 into amphp:master Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Need fix after amphp/sql update

3 participants