Should we check nil pointer query in dataselect #9262
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
What would you like to be added?
The
dataselect
is well designed to filter、sort、paginate datacells. I want to reuse thedataselect
module in my project. But I metioned thatFilterQuery
、SortQuery
、PaginationQuery
may be nil and cause panic error, for examplewhen we iterate
self.DataSelectQuery.FilterQuery.FilterByList
, if theFilterQuery
is nil, it will panic.The use-case of my code is following:
Apart from QueryFilter, the
DataSelectQuery
should also be checked to avoid nil pointer error.Why is this needed?
For more robust, when the
dataselect
pkg is resued by other project.Tasks
The text was updated successfully, but these errors were encountered: