when i print the sql generated in connection.queries:
i found some sql like this:
SELECT (1) AS `a` FROM `auth_user` WHERE `auth_user`.`id` = 2
what's that mean?
It's used to check if that row exists, without actually fetching any data (constructed by django.db.models.sql.query.BaseQuery.has_results, called by e.g. QuerySet.exists).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With