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
countSelect返回的data.count应该为int型,现在是string型
OS Platform: windows 10 Node.js Version: 12.0 ThinkJS Version: 3.23
// your code here
const list = await model .where(where) .field('*') .order('id DESC') .page(page, pagesize) .countSelect();
// your error message here
// your detail description
The text was updated successfully, but these errors were encountered:
https://github.com/thinkjs/think-model/blob/master/src/model.js#L644 count 是使用 SQL count() 查询出来的数量结果,SQL 由于可能存在大数小数的可能,所以很多数字都返回的是字符串类型。不过这种情况比较小,可以对其进行优化,欢迎提 PR 呀~
count()
Sorry, something went wrong.
No branches or pull requests
DESC
countSelect返回的data.count应该为int型,现在是string型
ENV
OS Platform:
windows 10
Node.js Version:
12.0
ThinkJS Version:
3.23
code
// your code here
const list = await model
.where(where)
.field('*')
.order('id DESC')
.page(page, pagesize)
.countSelect();
error message
more description
// your detail description
The text was updated successfully, but these errors were encountered: