[db] Move get_long from DB_BASE to DB_CONN

Merged
QI
2d ago
+6-6

Fixes #6972

Description of the Change

Move arbitrary scalar integer queries to DB_CONN alongside get_double. Update DB_BASE::max_id and DB_BASE::count to use their connection, keeping their public behavior and the scalar conversion unchanged.

Alternate Designs

Move the existing implementation rather than adding a second query helper or retaining table-specific ownership.

Release Notes

N/A

Validation

  • Repository source-code and trailing-whitespace checks passed.
  • git diff --check passed.
  • Repository call sites were checked for references to the moved method. Autotools generation, server configuration, and make -j2 -C db passed in a Debian container. A complete server build and live database integration test have not been verified.

AI assistance

Codex assisted with implementation review, fixes, validation, and preparation of this description. The submitter has confirmed personal review and verification of the complete changes. Validation limits are stated above.


Summary by cubic

Fixes #6972. Moves get_long from DB_BASE to DB_CONN so arbitrary scalar integer queries live alongside get_double. Updates DB_BASE::max_id and DB_BASE::count to call db->get_long, preserving their public behavior. get_long is no longer available on DB_BASE; any external callers must use db->get_long instead.