We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@adonisjs/lucid 21.1.0
Hello 👋,
For a count('*', alias) query, the result cannot be retrieved directly with the alias. You have to use the $extras field.
count('*', alias)
$extras
Database engine : MySQL 8.0.39 (Homebrew) OS : macos14.4 (arm64) MySQL Client NodeJS : mysql2 3.10.3
const users = await db .from('users') .count('*', 'total') console.log(users[0].total) // undefined console.log(users[0].$extras.total) // work correctly
Thanks 😀
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Package version
@adonisjs/lucid 21.1.0
Describe the bug
Hello 👋,
For a
count('*', alias)
query, the result cannot be retrieved directly with the alias. You have to use the$extras
field.Database engine : MySQL 8.0.39 (Homebrew)
OS : macos14.4 (arm64)
MySQL Client NodeJS : mysql2 3.10.3
Thanks 😀
Reproduction repo
No response
The text was updated successfully, but these errors were encountered: