Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an alias for count in Trilogy::Result #209

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

nickborromeo
Copy link
Contributor

It was reported in #206 that size was not defined.

Looking at the mysql2 implementation size is just an alias to count

  rb_define_method(cMysql2Result, "count", rb_mysql_result_count, 0);
  rb_define_alias(cMysql2Result, "size", "count");

source

This adds an alias for count called size

It was reported in trilogy-libraries#206 that `size` was not defined.

Looking at the mysql2 implementation `size` is just an alias to `count`

```
  rb_define_method(cMysql2Result, "count", rb_mysql_result_count, 0);
  rb_define_alias(cMysql2Result, "size", "count");
```

[source](https://github.com/brianmario/mysql2/blob/f6a9b68b42a51d1a370403f11eb88527dcb42dc6/ext/mysql2/result.c#L1241-L1242)

This adds an alias for `count` called `size`
@jhawthorn jhawthorn merged commit 857c167 into trilogy-libraries:main Dec 6, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants