The function bool get_last_insert_id(std::string const &sequence, long long &value) has the unpleasant argument type long long &. This disallows passing even std::int64_t & because it equals to long &.
I prefer fixed width integers whose usage is not possible here.
clang-tidy also disencourages the usage of long long, https://releases.llvm.org/11.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/google-runtime-int.html.
GCC does so to with -Wlong-long, https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wlong-long.