Make COUNT
returns error if there is no result, show warnings if there are too many parameters #2139
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#2139
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
Developers may make mistakes about
COUNT
, eg:SELECT COUNT(*) FROM table LIMIT 10
, which produces unexpected result. A simpleCOUNT
should already have one row result. If not, there must be something wrong.Databases have limitations about the number of preparted statement parameters.
Solution
To handle all similar problems gracefully in future, some improvements from XORM side: